summaryrefslogtreecommitdiff
path: root/drivers/acpi/tables
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-11-12 15:34:52 +0800
committerLen Brown <len.brown@intel.com>2008-12-29 22:38:37 -0500
commit009c4cbe99bea2da53f29ad685975a36f38c001c (patch)
tree170887ee9986ae84792200abd3f3022df01630ce /drivers/acpi/tables
parentc87609f31a8641009641fc1d19dac75e6de06fd4 (diff)
downloadlinux-3.10-009c4cbe99bea2da53f29ad685975a36f38c001c.tar.gz
linux-3.10-009c4cbe99bea2da53f29ad685975a36f38c001c.tar.bz2
linux-3.10-009c4cbe99bea2da53f29ad685975a36f38c001c.zip
ACPICA: Add global pointer for FACS table to simplify FACS access
Use a global pointer instead of using AcpiGetTableByIndex for each FACS access. This simplifies the code for the Global Lock and the Firmware Waking Vector(s). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r--drivers/acpi/tables/tbutils.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 0cc92ef5236..50e677711e5 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -113,6 +113,30 @@ acpi_tb_check_xsdt(acpi_physical_address address)
/*******************************************************************************
*
+ * FUNCTION: acpi_tb_initialize_facs
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Create a permanent mapping for the FADT and save it in a global
+ * for accessing the Global Lock and Firmware Waking Vector
+ *
+ ******************************************************************************/
+
+acpi_status acpi_tb_initialize_facs(void)
+{
+ acpi_status status;
+
+ status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+ ACPI_CAST_INDIRECT_PTR(struct
+ acpi_table_header,
+ &acpi_gbl_FACS));
+ return status;
+}
+
+/*******************************************************************************
+ *
* FUNCTION: acpi_tb_tables_loaded
*
* PARAMETERS: None