From ccba77eb45c36cf1d8b22f241eb8a4a292c1362e Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 31 May 2010 09:23:22 +0800 Subject: ACPICA: Update version to 20100528 Version 20100528. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 1371cc997393..8aaa596e1208 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100428 +#define ACPI_CA_VERSION 0x20100528 #include "actypes.h" #include "actbl.h" -- cgit v1.2.3 From e8b6f970107cfc9c00cdcdb12ec6c7e135cf379f Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 25 Jun 2010 01:18:39 +0200 Subject: ACPICA: Introduce acpi_gpe_wakeup() ACPICA uses reference counters to avoid disabling GPEs too early in case they have been enabled for many times. This is done separately for runtime and for wakeup, but the wakeup GPE reference counter is not really necessary, because GPEs are only enabled to wake up the system at the hardware level by acpi_enter_sleep_state(). Thus it only is necessary to set the corresponding bits in the wakeup enable masks of these GPEs' registers right before the system enters a sleep state. Moreover, the GPE wakeup enable bits can only be set when the target sleep state of the system is known and they need to be cleared immediately after wakeup regardless of how many wakeup devices are associated with a given GPE. On the basis of the above observations, introduce function acpi_gpe_wakeup() to be used for setting or clearing the enable bit corresponding to a given GPE in its enable register's enable_for_wake mask. Modify the ACPI suspend and wakeup code the use acpi_gpe_wakeup() instead of acpi_{enable|disable}_gpe() to set and clear GPE enable bits in their registers' enable_for_wake masks during system transitions to a sleep state and back to the working state, respectively. [This will allow us to drop the third argument of acpi_{enable|disable}_gpe() and simplify the GPE handling code.] Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 8aaa596e1208..17396e83e1a4 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -292,6 +292,8 @@ acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type); acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); +acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action); + acpi_status acpi_get_gpe_status(acpi_handle gpe_device, u32 gpe_number, acpi_event_status *event_status); -- cgit v1.2.3 From a44061aa8b5d58b2729faca4c155a94a5bea2a09 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 1 Jul 2010 10:11:45 +0800 Subject: ACPICA: Remove wakeup GPE reference counting which is not used After the previous patch that introduced acpi_gpe_wakeup() and modified the ACPI suspend and wakeup code to use it, the third argument of acpi_{enable|disable}_gpe() and the GPE wakeup reference counter are not necessary any more. Remove them and modify all of the users of acpi_{enable|disable}_gpe() accordingly. Also drop GPE type constants that aren't used any more. Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 17396e83e1a4..354d785e80cb 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -284,11 +284,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); */ acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action); -acpi_status -acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type); +acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); -acpi_status -acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 gpe_type); +acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); -- cgit v1.2.3 From 546eb57695875712f676e5f729159b0779f1c0af Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 1 Jul 2010 11:07:20 +0800 Subject: ACPICA: Drop acpi_set_gpe The acpi_set_gpe() function is a little awkward, because it doesn't really work as advertised in the "disable" case. Namely, if a GPE has been enabled with acpi_enable_gpe() and triggered a notification to occur, and if acpi_set_gpe() is used to disable it before acpi_ev_asynch_enable_gpe() runs, the GPE will be immediately enabled by the latter as though the acpi_set_gpe() had no effect. Thus, since it's been possible to make all of its callers use alternative operations to disable or enable GPEs, acpi_set_gpe() can be dropped. Signed-off-by: Rafael J. Wysocki Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 354d785e80cb..e0a53e4616df 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -282,8 +282,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); /* * GPE Interfaces */ -acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action); - acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); -- cgit v1.2.3 From 9e6c3e996e3c80d00cf931538e17126efe45f45c Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 6 Jul 2010 10:39:01 +0800 Subject: ACPICA: Update version to 20100702 Version 20100702. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index e0a53e4616df..ba94a889afd1 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100528 +#define ACPI_CA_VERSION 0x20100702 #include "actypes.h" #include "actbl.h" -- cgit v1.2.3 From 9874647ba1bdf3e1af25e079070a00676f60f2f0 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 8 Jul 2010 00:43:36 +0200 Subject: 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 Signed-off-by: Len Brown --- include/acpi/acpixf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/acpi/acpixf.h') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index ba94a889afd1..81d4f3d4b9fd 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -63,7 +63,6 @@ extern u32 acpi_dbg_layer; extern u8 acpi_gbl_enable_interpreter_slack; extern u8 acpi_gbl_all_methods_serialized; extern u8 acpi_gbl_create_osi_method; -extern u8 acpi_gbl_leave_wake_gpes_disabled; extern u8 acpi_gbl_use_default_register_widths; extern acpi_name acpi_gbl_trace_method_name; extern u32 acpi_gbl_trace_flags; @@ -286,6 +285,8 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); +acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number); + acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action); -- cgit v1.2.3