aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-07-07 18:43:36 -0400
committerLen Brown <len.brown@intel.com>2010-07-12 14:17:39 -0400
commit9874647ba1bdf3e1af25e079070a00676f60f2f0 (patch)
tree655caf5c08b5c882ee9a8cf14766faa24f7f1a8a /drivers/acpi/osl.c
parente8e18c956152ec9c26c94c6401c174691a8f04e7 (diff)
ACPI / ACPICA: Do not execute _PRW methods during initialization
Currently, during initialization ACPICA walks the entire ACPI namespace in search of any device objects with assciated _PRW methods. All of the _PRW methods found are executed in the process to extract the GPE information returned by them, so that the GPEs in question can be marked as "able to wakeup" (more precisely, the ACPI_GPE_CAN_WAKE flag is set for them). The only purpose of this exercise is to avoid enabling the CAN_WAKE GPEs automatically, even if there are _Lxx/_Exx methods associated with them. However, it is both costly and unnecessary, because the host OS has to execute the _PRW methods anyway to check which devices can wake up the system from sleep states. Moreover, it then uses full information returned by _PRW, including the GPE information, so it can take care of disabling the GPEs if necessary. Remove the code that walks the namespace and executes _PRW from ACPICA and modify comments to reflect that change. Make acpi_bus_set_run_wake_flags() disable GPEs for wakeup devices so that they don't cause spurious wakeup events to be signaled. This not only reduces the complexity of the ACPICA initialization code, but in some cases it should reduce the kernel boot time as well. Unfortunately, for this purpose we need a new ACPICA function, acpi_gpe_can_wake(), to be called by the host OS in order to disable the GPEs that can wake up the system and were previously enabled by acpi_ev_initialize_gpe_block() or acpi_ev_update_gpes() (such a GPE should be disabled only once, because the initialization code enables it only once, but it may be pointed to by _PRW for multiple devices and that's why the additional function is necessary). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 78418ce4fc78..44bddc5bc6ad 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1064,26 +1064,6 @@ static int __init acpi_serialize_setup(char *str)
1064 1064
1065__setup("acpi_serialize", acpi_serialize_setup); 1065__setup("acpi_serialize", acpi_serialize_setup);
1066 1066
1067/*
1068 * Wake and Run-Time GPES are expected to be separate.
1069 * We disable wake-GPEs at run-time to prevent spurious
1070 * interrupts.
1071 *
1072 * However, if a system exists that shares Wake and
1073 * Run-time events on the same GPE this flag is available
1074 * to tell Linux to keep the wake-time GPEs enabled at run-time.
1075 */
1076static int __init acpi_wake_gpes_always_on_setup(char *str)
1077{
1078 printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
1079
1080 acpi_gbl_leave_wake_gpes_disabled = FALSE;
1081
1082 return 1;
1083}
1084
1085__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
1086
1087/* Check of resource interference between native drivers and ACPI 1067/* Check of resource interference between native drivers and ACPI
1088 * OperationRegions (SystemIO and System Memory only). 1068 * OperationRegions (SystemIO and System Memory only).
1089 * IO ports and memory declared in ACPI might be used by the ACPI subsystem 1069 * IO ports and memory declared in ACPI might be used by the ACPI subsystem