diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-09-15 18:30:43 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-09-24 16:55:47 -0400 |
commit | a210080195c95ebca2a517ee3057d71607aa65e0 (patch) | |
tree | 96aa2aee4b9bdbc747b7a0d7150d0b41650ebe90 /drivers/acpi/scan.c | |
parent | 2422084a94fcd5038406261b331672a13c92c050 (diff) |
ACPI / ACPICA: Defer enabling of runtime GPEs (v3)
The current ACPI GPEs initialization code has a problem that it
enables some GPEs pointed to by device _PRW methods, generally
intended for signaling wakeup events (system or device wakeup).
These GPEs are then almost immediately disabled by the ACPI namespace
scanning code with the help of acpi_gpe_can_wake(), but it would be
better not to enable them at all until really necessary.
Modify the initialization of GPEs so that the ones that have
associated _Lxx or _Exx methods and are not pointed to by any _PRW
methods will be enabled after the namespace scan is complete.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b23825ecfa37..f87f04603b68 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1431,6 +1431,7 @@ EXPORT_SYMBOL(acpi_bus_add); | |||
1431 | int acpi_bus_start(struct acpi_device *device) | 1431 | int acpi_bus_start(struct acpi_device *device) |
1432 | { | 1432 | { |
1433 | struct acpi_bus_ops ops; | 1433 | struct acpi_bus_ops ops; |
1434 | int result; | ||
1434 | 1435 | ||
1435 | if (!device) | 1436 | if (!device) |
1436 | return -EINVAL; | 1437 | return -EINVAL; |
@@ -1438,7 +1439,11 @@ int acpi_bus_start(struct acpi_device *device) | |||
1438 | memset(&ops, 0, sizeof(ops)); | 1439 | memset(&ops, 0, sizeof(ops)); |
1439 | ops.acpi_op_start = 1; | 1440 | ops.acpi_op_start = 1; |
1440 | 1441 | ||
1441 | return acpi_bus_scan(device->handle, &ops, NULL); | 1442 | result = acpi_bus_scan(device->handle, &ops, NULL); |
1443 | |||
1444 | acpi_update_gpes(); | ||
1445 | |||
1446 | return result; | ||
1442 | } | 1447 | } |
1443 | EXPORT_SYMBOL(acpi_bus_start); | 1448 | EXPORT_SYMBOL(acpi_bus_start); |
1444 | 1449 | ||
@@ -1552,6 +1557,8 @@ int __init acpi_scan_init(void) | |||
1552 | 1557 | ||
1553 | if (result) | 1558 | if (result) |
1554 | acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL); | 1559 | acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL); |
1560 | else | ||
1561 | acpi_update_gpes(); | ||
1555 | 1562 | ||
1556 | return result; | 1563 | return result; |
1557 | } | 1564 | } |