aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-12-01 08:24:54 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-12-01 08:24:54 -0500
commitd0ab6714c53c9d7f3e42b7ea2e108afbd7449305 (patch)
treecbc41759898f3e29f58564e6eff48e58aa94217c
parente2174b0c24caca170ca61eda2ae49c9561ff8896 (diff)
parent69d4e425d218e866e4cf3d34099691e9bcde0209 (diff)
Merge back earlier ACPICA material for v4.10.
-rw-r--r--drivers/acpi/acpica/acglobal.h5
-rw-r--r--drivers/acpi/acpica/aclocal.h19
-rw-r--r--drivers/acpi/acpica/tbxfload.c6
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acpixf.h9
-rw-r--r--tools/power/acpi/os_specific/service_layers/osunixxf.c13
6 files changed, 36 insertions, 18 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 750fa824d42c..edbb42e251a6 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -240,10 +240,6 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);
240 240
241ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list); 241ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
242 242
243/* Maximum number of While() loop iterations before forced abort */
244
245ACPI_GLOBAL(u16, acpi_gbl_max_loop_iterations);
246
247/* Control method single step flag */ 243/* Control method single step flag */
248 244
249ACPI_GLOBAL(u8, acpi_gbl_cm_single_step); 245ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
@@ -318,6 +314,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
318ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE); 314ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE);
319ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_opt_verbose, TRUE); 315ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_opt_verbose, TRUE);
320ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_emit_external_opcodes, FALSE); 316ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_emit_external_opcodes, FALSE);
317ACPI_INIT_GLOBAL(u8, acpi_gbl_do_disassembler_optimizations, TRUE);
321 318
322ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm); 319ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm);
323ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing); 320ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing);
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index dff1207a6078..792660054992 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -765,7 +765,7 @@ union acpi_parse_value {
765 union acpi_parse_value value; /* Value or args associated with the opcode */\ 765 union acpi_parse_value value; /* Value or args associated with the opcode */\
766 u8 arg_list_length; /* Number of elements in the arg list */\ 766 u8 arg_list_length; /* Number of elements in the arg list */\
767 ACPI_DISASM_ONLY_MEMBERS (\ 767 ACPI_DISASM_ONLY_MEMBERS (\
768 u8 disasm_flags; /* Used during AML disassembly */\ 768 u16 disasm_flags; /* Used during AML disassembly */\
769 u8 disasm_opcode; /* Subtype used for disassembly */\ 769 u8 disasm_opcode; /* Subtype used for disassembly */\
770 char *operator_symbol;/* Used for C-style operator name strings */\ 770 char *operator_symbol;/* Used for C-style operator name strings */\
771 char aml_op_name[16]) /* Op name (debug only) */ 771 char aml_op_name[16]) /* Op name (debug only) */
@@ -868,14 +868,15 @@ struct acpi_parse_state {
868 868
869/* Parse object disasm_flags */ 869/* Parse object disasm_flags */
870 870
871#define ACPI_PARSEOP_IGNORE 0x01 871#define ACPI_PARSEOP_IGNORE 0x0001
872#define ACPI_PARSEOP_PARAMETER_LIST 0x02 872#define ACPI_PARSEOP_PARAMETER_LIST 0x0002
873#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 873#define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004
874#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08 874#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008
875#define ACPI_PARSEOP_CLOSING_PAREN 0x10 875#define ACPI_PARSEOP_CLOSING_PAREN 0x0010
876#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20 876#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020
877#define ACPI_PARSEOP_ASSIGNMENT 0x40 877#define ACPI_PARSEOP_ASSIGNMENT 0x0040
878#define ACPI_PARSEOP_ELSEIF 0x80 878#define ACPI_PARSEOP_ELSEIF 0x0080
879#define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100
879 880
880/***************************************************************************** 881/*****************************************************************************
881 * 882 *
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 5569f637f669..2599e8314d94 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -239,7 +239,7 @@ acpi_status acpi_tb_load_namespace(void)
239 } 239 }
240 240
241 if (!tables_failed) { 241 if (!tables_failed) {
242 ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded\n", tables_loaded)); 242 ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded", tables_loaded));
243 } else { 243 } else {
244 ACPI_ERROR((AE_INFO, 244 ACPI_ERROR((AE_INFO,
245 "%u table load failures, %u successful", 245 "%u table load failures, %u successful",
@@ -250,6 +250,10 @@ acpi_status acpi_tb_load_namespace(void)
250 status = AE_CTRL_TERMINATE; 250 status = AE_CTRL_TERMINATE;
251 } 251 }
252 252
253#ifdef ACPI_APPLICATION
254 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "\n"));
255#endif
256
253unlock_and_exit: 257unlock_and_exit:
254 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 258 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
255 return_ACPI_STATUS(status); 259 return_ACPI_STATUS(status);
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 12c2882bf647..d25da936750e 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -146,7 +146,7 @@
146 146
147/* Maximum number of While() loops before abort */ 147/* Maximum number of While() loops before abort */
148 148
149#define ACPI_MAX_LOOP_COUNT 0xFFFF 149#define ACPI_MAX_LOOP_COUNT 0x000FFFFF
150 150
151/****************************************************************************** 151/******************************************************************************
152 * 152 *
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index c7b3a132dbe7..5c7356adc10b 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
46 46
47/* Current ACPICA subsystem version in YYYYMMDD format */ 47/* Current ACPICA subsystem version in YYYYMMDD format */
48 48
49#define ACPI_CA_VERSION 0x20160831 49#define ACPI_CA_VERSION 0x20160930
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
@@ -259,6 +259,13 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
259ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); 259ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
260 260
261/* 261/*
262 * Maximum number of While() loop iterations before forced method abort.
263 * This mechanism is intended to prevent infinite loops during interpreter
264 * execution within a host kernel.
265 */
266ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_COUNT);
267
268/*
262 * This mechanism is used to trace a specified AML method. The method is 269 * This mechanism is used to trace a specified AML method. The method is
263 * traced each time it is executed. 270 * traced each time it is executed.
264 */ 271 */
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c
index 8d8003c919d4..10648aaf6164 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixxf.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c
@@ -646,8 +646,12 @@ acpi_os_create_semaphore(u32 max_units,
646 } 646 }
647#ifdef __APPLE__ 647#ifdef __APPLE__
648 { 648 {
649 char *semaphore_name = tmpnam(NULL); 649 static int semaphore_count = 0;
650 char semaphore_name[32];
650 651
652 snprintf(semaphore_name, sizeof(semaphore_name), "acpi_sem_%d",
653 semaphore_count++);
654 printf("%s\n", semaphore_name);
651 sem = 655 sem =
652 sem_open(semaphore_name, O_EXCL | O_CREAT, 0755, 656 sem_open(semaphore_name, O_EXCL | O_CREAT, 0755,
653 initial_units); 657 initial_units);
@@ -692,10 +696,15 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
692 if (!sem) { 696 if (!sem) {
693 return (AE_BAD_PARAMETER); 697 return (AE_BAD_PARAMETER);
694 } 698 }
695 699#ifdef __APPLE__
700 if (sem_close(sem) == -1) {
701 return (AE_BAD_PARAMETER);
702 }
703#else
696 if (sem_destroy(sem) == -1) { 704 if (sem_destroy(sem) == -1) {
697 return (AE_BAD_PARAMETER); 705 return (AE_BAD_PARAMETER);
698 } 706 }
707#endif
699 708
700 return (AE_OK); 709 return (AE_OK);
701} 710}