aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-04 00:39:11 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-20 16:59:39 -0400
commita94e88cdd8057fe8ea84bbb6d9a89a823c7bc49b (patch)
treeb18cb3ba8912b3c6266a4560d77ce2e2eb33546d
parent8a216d7f6aa94c3e252bbfdb2c422e2d0380084e (diff)
ACPICA: Tables: Avoid SSDT installation with acpi_gbl_disable_ssdt_table_load.
It is reported that when acpi_gbl_disable_ssdt_table_load is specified, user still can see it installed into /sys/firmware/acpi/tables on Linux boxes. This is because the option only stops table "loading", but doesn't stop table "installing", thus it is still in the acpi_gbl_root_table_list. With previous cleanups, it is possible to prevent SSDT installations to make it not such confusing. The global variable is also renamed. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> [rjw: Subject] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/kernel-parameters.txt10
-rw-r--r--drivers/acpi/acpica/acglobal.h4
-rw-r--r--drivers/acpi/acpica/tbinstal.c12
-rw-r--r--drivers/acpi/acpica/tbxfload.c13
-rw-r--r--drivers/acpi/osl.c11
-rw-r--r--include/acpi/acpixf.h2
6 files changed, 29 insertions, 23 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 03e50b4883a8..fbb58d790ec7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -237,7 +237,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
237 This feature is enabled by default. 237 This feature is enabled by default.
238 This option allows to turn off the feature. 238 This option allows to turn off the feature.
239 239
240 acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT 240 acpi_no_static_ssdt [HW,ACPI]
241 Disable installation of static SSDTs at early boot time
242 By default, SSDTs contained in the RSDT/XSDT will be
243 installed automatically and they will appear under
244 /sys/firmware/acpi/tables.
245 This option turns off this feature.
246 Note that specifying this option does not affect
247 dynamic table installation which will install SSDT
248 tables to /sys/firmware/acpi/tables/dynamic.
241 249
242 acpica_no_return_repair [HW, ACPI] 250 acpica_no_return_repair [HW, ACPI]
243 Disable AML predefined validation mechanism 251 Disable AML predefined validation mechanism
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 71bb5b50c656..0cac564ffe93 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -160,10 +160,10 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
160ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE); 160ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
161 161
162/* 162/*
163 * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. 163 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
164 * This can be useful for debugging ACPI problems on some machines. 164 * This can be useful for debugging ACPI problems on some machines.
165 */ 165 */
166ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_load, FALSE); 166ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
167 167
168/* 168/*
169 * We keep track of the latest version of Windows that has been requested by 169 * We keep track of the latest version of Windows that has been requested by
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index cf1ccc576629..de10d3245d9c 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -580,6 +580,18 @@ acpi_tb_install_non_fixed_table(acpi_physical_address address,
580 return_ACPI_STATUS(status); 580 return_ACPI_STATUS(status);
581 } 581 }
582 582
583 /*
584 * Optionally do not load any SSDTs from the RSDT/XSDT. This can
585 * be useful for debugging ACPI problems on some machines.
586 */
587 if (!reload && acpi_gbl_disable_ssdt_table_install &&
588 ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
589 ACPI_INFO((AE_INFO, "Ignoring installation of %4.4s at %p",
590 new_table_desc.signature.ascii, ACPI_CAST_PTR(void,
591 address)));
592 goto release_and_exit;
593 }
594
583 /* Validate and verify a table before installation */ 595 /* Validate and verify a table before installation */
584 596
585 status = acpi_tb_verify_table(&new_table_desc, NULL); 597 status = acpi_tb_verify_table(&new_table_desc, NULL);
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 62bbd384ac49..3f9eaf5c9fb7 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -179,19 +179,6 @@ static acpi_status acpi_tb_load_namespace(void)
179 continue; 179 continue;
180 } 180 }
181 181
182 /*
183 * Optionally do not load any SSDTs from the RSDT/XSDT. This can
184 * be useful for debugging ACPI problems on some machines.
185 */
186 if (acpi_gbl_disable_ssdt_table_load) {
187 ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p",
188 acpi_gbl_root_table_list.tables[i].signature.
189 ascii, ACPI_CAST_PTR(void,
190 acpi_gbl_root_table_list.
191 tables[i].address)));
192 continue;
193 }
194
195 /* Ignore errors while loading tables, get as many as possible */ 182 /* Ignore errors while loading tables, get as many as possible */
196 183
197 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 184 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 6776c599816f..9aeae41e22fb 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1770,16 +1770,15 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
1770} 1770}
1771#endif 1771#endif
1772 1772
1773static int __init acpi_no_auto_ssdt_setup(char *s) 1773static int __init acpi_no_static_ssdt_setup(char *s)
1774{ 1774{
1775 printk(KERN_NOTICE PREFIX "SSDT auto-load disabled\n"); 1775 acpi_gbl_disable_ssdt_table_install = TRUE;
1776 pr_info("ACPI: static SSDT installation disabled\n");
1776 1777
1777 acpi_gbl_disable_ssdt_table_load = TRUE; 1778 return 0;
1778
1779 return 1;
1780} 1779}
1781 1780
1782__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); 1781early_param("acpi_no_static_ssdt", acpi_no_static_ssdt_setup);
1783 1782
1784static int __init acpi_disable_return_repair(char *s) 1783static int __init acpi_disable_return_repair(char *s)
1785{ 1784{
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 44f5e9749601..2280c190536d 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -75,7 +75,7 @@ extern u8 acpi_gbl_auto_serialize_methods;
75extern u8 acpi_gbl_copy_dsdt_locally; 75extern u8 acpi_gbl_copy_dsdt_locally;
76extern u8 acpi_gbl_create_osi_method; 76extern u8 acpi_gbl_create_osi_method;
77extern u8 acpi_gbl_disable_auto_repair; 77extern u8 acpi_gbl_disable_auto_repair;
78extern u8 acpi_gbl_disable_ssdt_table_load; 78extern u8 acpi_gbl_disable_ssdt_table_install;
79extern u8 acpi_gbl_do_not_use_xsdt; 79extern u8 acpi_gbl_do_not_use_xsdt;
80extern u8 acpi_gbl_enable_aml_debug_object; 80extern u8 acpi_gbl_enable_aml_debug_object;
81extern u8 acpi_gbl_enable_interpreter_slack; 81extern u8 acpi_gbl_enable_interpreter_slack;