diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-06-07 20:58:48 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-15 18:55:40 -0400 |
commit | b75dd2977fc3c5848f739681fc799f27b1322e44 (patch) | |
tree | fbe91dd6fad27e0d6c311e873340e05e51eda48e /drivers | |
parent | 1d1ea1b723d9f239f736b8cf284327cbbf9d15d1 (diff) |
ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
Optionally do not load any SSDTs from the RSDT/XSDT during
initialization. This can be useful for overriding SSDTs
using DSDT overriding, thus useful for debugging ACPI
problems on some machines. Lv Zheng. ACPICA BZ 1005.
References: https://bugs.acpica.org/show_bug.cgi?id=1005
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxfload.c | 25 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 11 |
3 files changed, 27 insertions, 15 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 07160928ca25..b8d38117a20c 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -132,6 +132,12 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE); | |||
132 | */ | 132 | */ |
133 | u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE); | 133 | u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE); |
134 | 134 | ||
135 | /* | ||
136 | * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. | ||
137 | * This can be useful for debugging ACPI problems on some machines. | ||
138 | */ | ||
139 | u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_ssdt_table_load, FALSE); | ||
140 | |||
135 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ | 141 | /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ |
136 | 142 | ||
137 | struct acpi_table_fadt acpi_gbl_FADT; | 143 | struct acpi_table_fadt acpi_gbl_FADT; |
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index 67e046ec8f0a..0ba9e328d5d7 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c | |||
@@ -53,8 +53,6 @@ ACPI_MODULE_NAME("tbxfload") | |||
53 | /* Local prototypes */ | 53 | /* Local prototypes */ |
54 | static acpi_status acpi_tb_load_namespace(void); | 54 | static acpi_status acpi_tb_load_namespace(void); |
55 | 55 | ||
56 | static int no_auto_ssdt; | ||
57 | |||
58 | /******************************************************************************* | 56 | /******************************************************************************* |
59 | * | 57 | * |
60 | * FUNCTION: acpi_load_tables | 58 | * FUNCTION: acpi_load_tables |
@@ -180,8 +178,16 @@ static acpi_status acpi_tb_load_namespace(void) | |||
180 | continue; | 178 | continue; |
181 | } | 179 | } |
182 | 180 | ||
183 | if (no_auto_ssdt) { | 181 | /* |
184 | printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); | 182 | * Optionally do not load any SSDTs from the RSDT/XSDT. This can |
183 | * be useful for debugging ACPI problems on some machines. | ||
184 | */ | ||
185 | if (acpi_gbl_disable_ssdt_table_load) { | ||
186 | ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p", | ||
187 | acpi_gbl_root_table_list.tables[i].signature. | ||
188 | ascii, ACPI_CAST_PTR(void, | ||
189 | acpi_gbl_root_table_list. | ||
190 | tables[i].address))); | ||
185 | continue; | 191 | continue; |
186 | } | 192 | } |
187 | 193 | ||
@@ -376,14 +382,3 @@ acpi_status acpi_unload_parent_table(acpi_handle object) | |||
376 | } | 382 | } |
377 | 383 | ||
378 | ACPI_EXPORT_SYMBOL(acpi_unload_parent_table) | 384 | ACPI_EXPORT_SYMBOL(acpi_unload_parent_table) |
379 | |||
380 | static int __init acpi_no_auto_ssdt_setup(char *s) { | ||
381 | |||
382 | printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); | ||
383 | |||
384 | no_auto_ssdt = 1; | ||
385 | |||
386 | return 1; | ||
387 | } | ||
388 | |||
389 | __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); | ||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index e72186340fec..da6b6634e5b3 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1715,6 +1715,17 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) | |||
1715 | } | 1715 | } |
1716 | #endif | 1716 | #endif |
1717 | 1717 | ||
1718 | static int __init acpi_no_auto_ssdt_setup(char *s) | ||
1719 | { | ||
1720 | printk(KERN_NOTICE PREFIX "SSDT auto-load disabled\n"); | ||
1721 | |||
1722 | acpi_gbl_disable_ssdt_table_load = TRUE; | ||
1723 | |||
1724 | return 1; | ||
1725 | } | ||
1726 | |||
1727 | __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); | ||
1728 | |||
1718 | acpi_status __init acpi_os_initialize(void) | 1729 | acpi_status __init acpi_os_initialize(void) |
1719 | { | 1730 | { |
1720 | acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); | 1731 | acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); |