Bug 6328
Summary: | loop in acpi initialisation code | ||
---|---|---|---|
Product: | ACPI | Reporter: | Xavier Bru (xavier.bru) |
Component: | ACPICA-Core | Assignee: | Robert Moore (Robert.Moore) |
Status: | CLOSED CODE_FIX | ||
Severity: | high | CC: | acpi-bugzilla, trenn |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.16 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
result of command "acpidump -t DSDT -o DSDT"
partial traces of called methods |
Description
Xavier Bru
2006-04-04 07:10:40 UTC
Created attachment 7757 [details]
result of command "acpidump -t DSDT -o DSDT"
Created attachment 7758 [details]
partial traces of called methods
I think the problem is that we execute methods on the hot plug controler for an unexisting bus. There is a method that loops on a particular field: Method (WSOB, 0, NotSerialized) { While (SOBO) { Noop } } I checked that the following patch fixes the problem: --- linux-2.6.16-old/drivers/acpi/namespace/nsinit.c 2006-03-31 18:26:23.000000000 +0200 +++ linux-2.6.16-new/drivers/acpi/namespace/nsinit.c 2006-04-03 14:57:28.000000000 +0200 @@ -362,19 +362,6 @@ acpi_ns_init_one_device(acpi_handle obj_ info->device_count++; /* - * Check if the _INI method exists for this device - - * if _INI does not exist, there is no need to run _STA - * No _INI means device requires no initialization - */ - status = acpi_ns_search_node(*ACPI_CAST_PTR(u32, METHOD_NAME__INI), - device_node, ACPI_TYPE_METHOD, &ini_node); - if (ACPI_FAILURE(status)) { - /* No _INI method found - move on to next device */ - - return_ACPI_STATUS(AE_OK); - } - - /* * Run _STA to determine if we can run _INI on the device - * the device must be present before _INI can be run. * However, _STA is not required - assume device present if no _STA @@ -405,6 +392,17 @@ acpi_ns_init_one_device(acpi_handle obj_ } /* + * Check if the _INI method exists for this device - + * No _INI means device requires no initialization + */ + status = acpi_ns_search_node(*ACPI_CAST_PTR(u32, METHOD_NAME__INI), + device_node, ACPI_TYPE_METHOD, &ini_node); + if (ACPI_FAILURE(status)) { + /* No _INI method found - move on to next device */ + return_ACPI_STATUS(AE_OK); + } + + /* * The device is present and _INI exists. Run the _INI method. * (We already have the _INI node from above) */ I think I've got a handle on this. By making this "optimization" and not running _STA if there is no _INI, we are violating the ACPI spec by continuing to walk the device tree underneath parent devices that are not present (in the case where the parent device has no _INI.) We need to always run _STA before _INI for an additional reason: in order to determine whether or not to examine the subtree underneath the device. The fix to this would be to back off to the original code and add additional comments to avoid this again in the future. Does this sound correct? It sounds OK for me (But I am not an ACPI expert :-) An other solution could have been looking for _STA on parent bus to not execute the _INI method on the device (In our DSDT, the _STA method is only present at the bus level). BTW, it should be probably better not to run method for devices on not present bus. Thanks for your quick answer. Should be fixed in ACPICA version 20060421 20060421 shipped before linux-2.6.18-rc1. closed. |