From 4461cf546ec8c97b6b997b8e533d6de1960499d3 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 31 May 2010 09:22:12 +0800 Subject: ACPICA: Add signatures for undefined tables: ATKG, GSCI, IEIT These ACPI tables have been seen in the field, but the actual table definitions are unkown at this time. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/actbl2.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 95f4d0ef4819..0a600b8e53f4 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -79,6 +79,15 @@ #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ +#ifdef ACPI_UNDEFINED_TABLES +/* + * These tables have been seen in the field, but no definition has been found + */ +#define ACPI_SIG_ATKG "ATKG" +#define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */ +#define ACPI_SIG_IEIT "IEIT" +#endif + /* * All tables must be byte-packed to match the ACPI specification, since * the tables are provided by the system BIOS. -- cgit v1.2.3 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') 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 ++ include/acpi/actypes.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/acpi') 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); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d55f4a7b824d..6a65a94897bf 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -663,7 +663,7 @@ typedef u32 acpi_event_status; #define ACPI_GPE_MAX 0xFF #define ACPI_NUM_GPE 256 -/* Actions for acpi_set_gpe and acpi_hw_low_set_gpe */ +/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ #define ACPI_GPE_ENABLE 0 #define ACPI_GPE_DISABLE 1 -- 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 ++---- include/acpi/actypes.h | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'include/acpi') 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); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 6a65a94897bf..a42513ded3a4 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -669,12 +669,6 @@ typedef u32 acpi_event_status; #define ACPI_GPE_DISABLE 1 #define ACPI_GPE_COND_ENABLE 2 -/* gpe_types for acpi_enable_gpe and acpi_disable_gpe */ - -#define ACPI_GPE_TYPE_WAKE (u8) 0x01 -#define ACPI_GPE_TYPE_RUNTIME (u8) 0x02 -#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x03 - /* * GPE info flags - Per GPE * +-------+---+-+-+ -- 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 -- include/acpi/actypes.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'include/acpi') 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); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index a42513ded3a4..5db8f472fec9 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -663,7 +663,7 @@ typedef u32 acpi_event_status; #define ACPI_GPE_MAX 0xFF #define ACPI_NUM_GPE 256 -/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ +/* Actions for acpi_gpe_wakeup, acpi_hw_low_set_gpe */ #define ACPI_GPE_ENABLE 0 #define ACPI_GPE_DISABLE 1 -- cgit v1.2.3 From 9d8b5e7b28179784e2c6250086a44021fbb9c5a0 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 6 Jul 2010 09:58:11 +0800 Subject: ACPICA: Add support for WDDT - Watchdog Descriptor Table Header file support. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/actbl2.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 0a600b8e53f4..d4136b28011f 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -77,6 +77,7 @@ #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ +#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ #ifdef ACPI_UNDEFINED_TABLES @@ -916,6 +917,44 @@ enum acpi_wdat_instructions { ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ }; +/******************************************************************************* + * + * WDDT - Watchdog Descriptor Table + * Version 1 + * + * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", + * Version 001, September 2002 + * + ******************************************************************************/ + +struct acpi_table_wddt { + struct acpi_table_header header; /* Common ACPI table header */ + u16 spec_version; + u16 table_version; + u16 pci_vendor_id; + struct acpi_generic_address address; + u16 max_count; /* Maximum counter value supported */ + u16 min_count; /* Minimum counter value supported */ + u16 period; + u16 status; + u16 capability; +}; + +/* Flags for Status field above */ + +#define ACPI_WDDT_AVAILABLE (1) +#define ACPI_WDDT_ACTIVE (1<<1) +#define ACPI_WDDT_TCO_OS_OWNED (1<<2) +#define ACPI_WDDT_USER_RESET (1<<11) +#define ACPI_WDDT_WDT_RESET (1<<12) +#define ACPI_WDDT_POWER_FAIL (1<<13) +#define ACPI_WDDT_UNKNOWN_RESET (1<<14) + +/* Flags for Capability field above */ + +#define ACPI_WDDT_AUTO_RESET (1) +#define ACPI_WDDT_ALERT_SUPPORT (1<<1) + /******************************************************************************* * * WDRT - Watchdog Resource Table -- cgit v1.2.3 From ddcc6a037c0f9378f29658636a2c2b54c4238ec4 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 6 Jul 2010 10:02:16 +0800 Subject: ACPICA: Update debug output components Add data table compiler output component Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- include/acpi/acoutput.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 5e952262d6ee..bc4a6deb73b0 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -71,8 +71,9 @@ #define ACPI_TOOLS 0x00002000 #define ACPI_EXAMPLE 0x00004000 #define ACPI_DRIVER 0x00008000 +#define DT_COMPILER 0x00010000 -#define ACPI_ALL_COMPONENTS 0x0000FFFF +#define ACPI_ALL_COMPONENTS 0x0001FFFF #define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS) /* Component IDs reserved for ACPI drivers */ -- 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') 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') 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