Bug 9535

Summary: pnpacpi: exceeded the max number of IO resources: 24
Product: ACPI Reporter: Laurent Bigonville (bigon)
Component: Config-HotplugAssignee: ykzhao (yakui.zhao)
Severity: normal CC: acpi-bugzilla, akpm, bjorn.helgaas, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24 Tree: Mainline
Subsystem: Regression: ---
Attachments: dmesg log
lspci -nnvv output
acpi dump
patch vs 2.6.24-rc6 to increase PNP_MAX_PORT to 40
patch vs 2.6.24-rc7 to limit warning printout to 1 line
patch vs 2.6.24-rc8 to fix previous patch
patch vs 2.6.25-rc6

Description Laurent Bigonville 2007-12-10 12:35:21 UTC

During boot I get these error: pnpacpi: exceeded the max number of IO resources: 24

I have an Acer TravelMate 8000
Running under Ubuntu hardy (dev version)

This is a regression since I don't get these warning with 2.6.22
Comment 1 Laurent Bigonville 2007-12-10 12:36:46 UTC
Created attachment 13950 [details]
dmesg log
Comment 2 Laurent Bigonville 2007-12-10 12:37:14 UTC
Created attachment 13951 [details]
lspci -nnvv output
Comment 3 Laurent Bigonville 2007-12-10 12:37:47 UTC
Created attachment 13952 [details]
acpi dump
Comment 4 Len Brown 2007-12-14 15:20:00 UTC
does anything actually break,
or is the problem the new error message?
Comment 5 Laurent Bigonville 2007-12-15 15:28:54 UTC
I don't see anything broken so far
Comment 6 ykzhao 2007-12-17 22:03:05 UTC
  The problem is the new error message. And the root cause is that the IO port definition for some PNP device exceeds the predefined PNP constant(24).  

  In the previous kernel the PNP constant is 8 and the error message is suppressed. From the 2.6.24-rc4 the PNP constant is changed from 8 to 24 and error message will be printed when the resource defintion for PNP device exceeds the PNP constant.  Unfortunately the IO/Mem resource definition for PNP device on some systems often exceeds the predefined PNP constant.  The problem can be fixed by increasing the PNP constant but it is inappropriate to increase the PNP constant to bigger value . To do so will waste a lot of memory.

  Of course the error message won't break anything.
Comment 7 Len Brown 2007-12-27 20:31:19 UTC
> pnpacpi: exceeded the max number of IO resources: 24

(PNP: increase the maximum number of resources)
increased PNP_MAX_PORT to 24 from 8 and added this warning.

So I don't believe that this falls in the "regression" category,
even though there is an additional line in dmesg.
Indeed, it is easier to argue that the new line is a feature,
as it is pointing out a potential problem that Linux
was too ignorant to complain about before...
Comment 8 Len Brown 2007-12-27 20:41:26 UTC
Created attachment 14212 [details]
patch vs 2.6.24-rc6 to increase PNP_MAX_PORT to 40

The 15 dmesg lines were presumably from the 39 - 24 = 15
IO resources here:

               Device (MBRD)
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_UID, 0x1F)
                    Name (_CRS, ResourceTemplate ()
                        IO (Decode16,
                            0x0010,             // Range Minimum
                            0x0010,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                        IO (Decode16,
                            0x0024,             // Range Minimum
                            0x0024,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length

Please confirm that this patch to up PNP_MAX_PORT to 40
makes the messages go away and causes no additional
issues on the Acer.

The alternatives to this patch are:
1. delete the message (and ignore the issue) like we did before 2.6.24
2. change pnp to use resource lists rather than arrays

I do not advocate #1 -- hiding a potentially serious problem
would be a mistake.  Rather, I'm inclined to ship this simple fix now
and look for #2 (a memory size optimization) in a future release.
Comment 9 Len Brown 2008-01-12 14:46:22 UTC
*** Bug 9740 has been marked as a duplicate of this bug. ***
Comment 10 Len Brown 2008-01-12 15:05:44 UTC
Created attachment 14429 [details]
patch vs 2.6.24-rc7 to limit warning printout to 1 line

commit 66a21736defda339cd93a0e70c1120ab813640f6
Author: Len Brown <len.brown@intel.com>
Date:   Sat Jan 12 17:56:36 2008 -0500

    pnpacpi: print resource shortage message only once

    pnpacpi: exceeded the max number of IO resources: 40

    While this message is a real error and should thus
    remain KERN_ERR (even a new dmesg line is seen as a regression
    by some, since it was not printed in 2.6.23...) it is certainly
    impolite to print this warning 50 times should you happen to
    have the oddball system with 90 io resources under a device...

    So print the warning just once.

    In 2.6.25 we'll get rid of the limits altogether
    and these warnings will vanish with them.
Comment 11 Len Brown 2008-01-13 23:06:01 UTC
patch in comment #8
patch in comment #10
shipped in 2.6.24-rc7-git5

Comment 12 Len Brown 2008-01-23 19:12:15 UTC
Created attachment 14552 [details]
patch vs 2.6.24-rc8 to fix previous patch

note that this tweak to the previous patch is present in 2.6.24-rc8-git6
Comment 13 Len Brown 2008-03-26 09:37:27 UTC
Created attachment 15450 [details]
patch vs 2.6.25-rc6

just for the record, linux-2.6.25-rc7
includes this change to include/linux/pnp.h

-#define PNP_MAX_MEM            12
+#define PNP_MAX_MEM            24