From 29a241cc02110b8b2259fd72719b8cadc03909be Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Thu, 30 May 2013 10:00:01 +0800 Subject: ACPICA: Add argument typechecking for all predefined ACPI names Fully implements typechecking on all incoming arguments for all predefined names. This ensures that ACPI-related drivers are passing the correct number of arguments, each of the correct object type. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki --- include/acpi/acconfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 14ceff788c40..1c16f821434f 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -219,8 +219,8 @@ * *****************************************************************************/ -#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ -#define ACPI_DB_LINE_BUFFER_SIZE 512 +#define ACPI_DEBUGGER_MAX_ARGS ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */ +#define ACPI_DB_LINE_BUFFER_SIZE 512 #define ACPI_DEBUGGER_COMMAND_PROMPT '-' #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' -- cgit v1.2.3 From d835e7f4f87e783575a44b1322f8a3d95f52ef5e Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Thu, 30 May 2013 10:01:05 +0800 Subject: ACPICA: Remove unused macros, no functional change Remove several unused/duplicated macros in acoutput.h Lv Zheng. Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki --- include/acpi/acoutput.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 4f52ea795c7a..4607b027a657 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -428,27 +428,21 @@ * This is the non-debug case -- make everything go away, * leaving no executable debug code! */ -#define ACPI_FUNCTION_NAME(a) #define ACPI_DEBUG_PRINT(pl) #define ACPI_DEBUG_PRINT_RAW(pl) #define ACPI_DEBUG_EXEC(a) #define ACPI_DEBUG_ONLY_MEMBERS(a) +#define ACPI_FUNCTION_NAME(a) #define ACPI_FUNCTION_TRACE(a) #define ACPI_FUNCTION_TRACE_PTR(a, b) #define ACPI_FUNCTION_TRACE_U32(a, b) #define ACPI_FUNCTION_TRACE_STR(a, b) -#define ACPI_FUNCTION_EXIT -#define ACPI_FUNCTION_STATUS_EXIT(s) -#define ACPI_FUNCTION_VALUE_EXIT(s) #define ACPI_FUNCTION_ENTRY() #define ACPI_DUMP_STACK_ENTRY(a) #define ACPI_DUMP_OPERANDS(a, b, c) #define ACPI_DUMP_ENTRY(a, b) -#define ACPI_DUMP_TABLES(a, b) #define ACPI_DUMP_PATHNAME(a, b, c, d) #define ACPI_DUMP_BUFFER(a, b) -#define ACPI_DEBUG_PRINT(pl) -#define ACPI_DEBUG_PRINT_RAW(pl) #define ACPI_IS_DEBUG_ENABLED(level, component) 0 /* Return macros must have a return statement at the minimum */ -- cgit v1.2.3 From 67a9277496d8e674f27bb2a62c995eb79801d555 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Thu, 30 May 2013 10:01:19 +0800 Subject: ACPICA: Update version to 20130418 Version 20130418. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki --- 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 454881e6450a..156126449bf0 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20130328 +#define ACPI_CA_VERSION 0x20130418 #include #include -- cgit v1.2.3 From b75dd2977fc3c5848f739681fc799f27b1322e44 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Sat, 8 Jun 2013 00:58:48 +0000 Subject: 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 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/acglobal.h | 6 ++++++ drivers/acpi/acpica/tbxfload.c | 25 ++++++++++--------------- drivers/acpi/osl.c | 11 +++++++++++ include/acpi/acpixf.h | 1 + 4 files changed, 28 insertions(+), 15 deletions(-) (limited to 'include/acpi') 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); */ u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE); +/* + * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. + * This can be useful for debugging ACPI problems on some machines. + */ +u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_ssdt_table_load, FALSE); + /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */ 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") /* Local prototypes */ static acpi_status acpi_tb_load_namespace(void); -static int no_auto_ssdt; - /******************************************************************************* * * FUNCTION: acpi_load_tables @@ -180,8 +178,16 @@ static acpi_status acpi_tb_load_namespace(void) continue; } - if (no_auto_ssdt) { - printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); + /* + * Optionally do not load any SSDTs from the RSDT/XSDT. This can + * be useful for debugging ACPI problems on some machines. + */ + if (acpi_gbl_disable_ssdt_table_load) { + ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p", + acpi_gbl_root_table_list.tables[i].signature. + ascii, ACPI_CAST_PTR(void, + acpi_gbl_root_table_list. + tables[i].address))); continue; } @@ -376,14 +382,3 @@ acpi_status acpi_unload_parent_table(acpi_handle object) } ACPI_EXPORT_SYMBOL(acpi_unload_parent_table) - -static int __init acpi_no_auto_ssdt_setup(char *s) { - - printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); - - no_auto_ssdt = 1; - - return 1; -} - -__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) } #endif +static int __init acpi_no_auto_ssdt_setup(char *s) +{ + printk(KERN_NOTICE PREFIX "SSDT auto-load disabled\n"); + + acpi_gbl_disable_ssdt_table_load = TRUE; + + return 1; +} + +__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); + acpi_status __init acpi_os_initialize(void) { acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 156126449bf0..5d9bf46f2ab7 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -80,6 +80,7 @@ extern bool acpi_gbl_enable_aml_debug_object; extern u8 acpi_gbl_copy_dsdt_locally; extern u8 acpi_gbl_truncate_io_addresses; extern u8 acpi_gbl_disable_auto_repair; +extern u8 acpi_gbl_disable_ssdt_table_load; /* * Hardware-reduced prototypes. All interfaces that use these macros will -- cgit v1.2.3 From 069189a1c8e897be8c9d8f2365c30a6497100519 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Sat, 8 Jun 2013 09:01:37 +0800 Subject: ACPICA: Update version to 20130517 Version 20130517. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki --- 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 5d9bf46f2ab7..1b09300810e6 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20130418 +#define ACPI_CA_VERSION 0x20130517 #include #include -- cgit v1.2.3