aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2017-04-26 04:18:40 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-04-26 18:31:00 -0400
commit9ff5a21a50301ef16aeb2e3937867de7eb0af030 (patch)
tree0d118587bd0ca6817aa591c16e538aaf96f60e6a
parent069f9bf454a61d6fafa415dc2a8713938196d650 (diff)
ACPICA: Cleanup AML opcode definitions, no functional change
ACPICA commit ec969d38fef3be95358e65f0dd071b5f2c045b6b This change is a cleanup and further standardization of the AML opcode defines in amlcode.h Improves the readability and maintainability of the source code. Link: https://github.com/acpica/acpica/commit/ec969d38 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/amlcode.h97
-rw-r--r--drivers/acpi/acpica/dbxface.c2
-rw-r--r--drivers/acpi/acpica/dscontrol.c2
-rw-r--r--drivers/acpi/acpica/dsmthdat.c3
-rw-r--r--drivers/acpi/acpica/dsobject.c15
-rw-r--r--drivers/acpi/acpica/dsopcode.c4
-rw-r--r--drivers/acpi/acpica/dsutils.c8
-rw-r--r--drivers/acpi/acpica/dswexec.c2
-rw-r--r--drivers/acpi/acpica/dswload2.c2
-rw-r--r--drivers/acpi/acpica/exmisc.c16
-rw-r--r--drivers/acpi/acpica/exnames.c4
-rw-r--r--drivers/acpi/acpica/exoparg1.c17
-rw-r--r--drivers/acpi/acpica/exoparg2.c4
-rw-r--r--drivers/acpi/acpica/exoparg6.c16
-rw-r--r--drivers/acpi/acpica/exresolv.c3
-rw-r--r--drivers/acpi/acpica/exstore.c5
-rw-r--r--drivers/acpi/acpica/exstoren.c2
-rw-r--r--drivers/acpi/acpica/nsaccess.c2
-rw-r--r--drivers/acpi/acpica/nsutils.c6
-rw-r--r--drivers/acpi/acpica/psargs.c6
-rw-r--r--drivers/acpi/acpica/psloop.c2
-rw-r--r--drivers/acpi/acpica/psopcode.c10
-rw-r--r--drivers/acpi/acpica/psparse.c6
-rw-r--r--drivers/acpi/acpica/pstree.c2
24 files changed, 114 insertions, 122 deletions
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h
index b536fd471292..7e2b369487ae 100644
--- a/drivers/acpi/acpica/amlcode.h
+++ b/drivers/acpi/acpica/amlcode.h
@@ -48,11 +48,8 @@
48 48
49/* primary opcodes */ 49/* primary opcodes */
50 50
51#define AML_NULL_CHAR (u16) 0x00
52
53#define AML_ZERO_OP (u16) 0x00 51#define AML_ZERO_OP (u16) 0x00
54#define AML_ONE_OP (u16) 0x01 52#define AML_ONE_OP (u16) 0x01
55#define AML_UNASSIGNED (u16) 0x02
56#define AML_ALIAS_OP (u16) 0x06 53#define AML_ALIAS_OP (u16) 0x06
57#define AML_NAME_OP (u16) 0x08 54#define AML_NAME_OP (u16) 0x08
58#define AML_BYTE_OP (u16) 0x0a 55#define AML_BYTE_OP (u16) 0x0a
@@ -63,17 +60,15 @@
63#define AML_SCOPE_OP (u16) 0x10 60#define AML_SCOPE_OP (u16) 0x10
64#define AML_BUFFER_OP (u16) 0x11 61#define AML_BUFFER_OP (u16) 0x11
65#define AML_PACKAGE_OP (u16) 0x12 62#define AML_PACKAGE_OP (u16) 0x12
66#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */ 63#define AML_VARIABLE_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
67#define AML_METHOD_OP (u16) 0x14 64#define AML_METHOD_OP (u16) 0x14
68#define AML_EXTERNAL_OP (u16) 0x15 /* ACPI 6.0 */ 65#define AML_EXTERNAL_OP (u16) 0x15 /* ACPI 6.0 */
69#define AML_DUAL_NAME_PREFIX (u16) 0x2e 66#define AML_DUAL_NAME_PREFIX (u16) 0x2e
70#define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f 67#define AML_MULTI_NAME_PREFIX (u16) 0x2f
71#define AML_NAME_CHAR_SUBSEQ (u16) 0x30 68#define AML_EXTENDED_PREFIX (u16) 0x5b
72#define AML_NAME_CHAR_FIRST (u16) 0x41
73#define AML_EXTENDED_OP_PREFIX (u16) 0x5b
74#define AML_ROOT_PREFIX (u16) 0x5c 69#define AML_ROOT_PREFIX (u16) 0x5c
75#define AML_PARENT_PREFIX (u16) 0x5e 70#define AML_PARENT_PREFIX (u16) 0x5e
76#define AML_LOCAL_OP (u16) 0x60 71#define AML_FIRST_LOCAL_OP (u16) 0x60 /* Used for Local op # calculations */
77#define AML_LOCAL0 (u16) 0x60 72#define AML_LOCAL0 (u16) 0x60
78#define AML_LOCAL1 (u16) 0x61 73#define AML_LOCAL1 (u16) 0x61
79#define AML_LOCAL2 (u16) 0x62 74#define AML_LOCAL2 (u16) 0x62
@@ -82,7 +77,7 @@
82#define AML_LOCAL5 (u16) 0x65 77#define AML_LOCAL5 (u16) 0x65
83#define AML_LOCAL6 (u16) 0x66 78#define AML_LOCAL6 (u16) 0x66
84#define AML_LOCAL7 (u16) 0x67 79#define AML_LOCAL7 (u16) 0x67
85#define AML_ARG_OP (u16) 0x68 80#define AML_FIRST_ARG_OP (u16) 0x68 /* Used for Arg op # calculations */
86#define AML_ARG0 (u16) 0x68 81#define AML_ARG0 (u16) 0x68
87#define AML_ARG1 (u16) 0x69 82#define AML_ARG1 (u16) 0x69
88#define AML_ARG2 (u16) 0x6a 83#define AML_ARG2 (u16) 0x6a
@@ -93,7 +88,7 @@
93#define AML_STORE_OP (u16) 0x70 88#define AML_STORE_OP (u16) 0x70
94#define AML_REF_OF_OP (u16) 0x71 89#define AML_REF_OF_OP (u16) 0x71
95#define AML_ADD_OP (u16) 0x72 90#define AML_ADD_OP (u16) 0x72
96#define AML_CONCAT_OP (u16) 0x73 91#define AML_CONCATENATE_OP (u16) 0x73
97#define AML_SUBTRACT_OP (u16) 0x74 92#define AML_SUBTRACT_OP (u16) 0x74
98#define AML_INCREMENT_OP (u16) 0x75 93#define AML_INCREMENT_OP (u16) 0x75
99#define AML_DECREMENT_OP (u16) 0x76 94#define AML_DECREMENT_OP (u16) 0x76
@@ -110,7 +105,7 @@
110#define AML_FIND_SET_LEFT_BIT_OP (u16) 0x81 105#define AML_FIND_SET_LEFT_BIT_OP (u16) 0x81
111#define AML_FIND_SET_RIGHT_BIT_OP (u16) 0x82 106#define AML_FIND_SET_RIGHT_BIT_OP (u16) 0x82
112#define AML_DEREF_OF_OP (u16) 0x83 107#define AML_DEREF_OF_OP (u16) 0x83
113#define AML_CONCAT_RES_OP (u16) 0x84 /* ACPI 2.0 */ 108#define AML_CONCATENATE_TEMPLATE_OP (u16) 0x84 /* ACPI 2.0 */
114#define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */ 109#define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */
115#define AML_NOTIFY_OP (u16) 0x86 110#define AML_NOTIFY_OP (u16) 0x86
116#define AML_SIZE_OF_OP (u16) 0x87 111#define AML_SIZE_OF_OP (u16) 0x87
@@ -122,18 +117,18 @@
122#define AML_CREATE_BIT_FIELD_OP (u16) 0x8d 117#define AML_CREATE_BIT_FIELD_OP (u16) 0x8d
123#define AML_OBJECT_TYPE_OP (u16) 0x8e 118#define AML_OBJECT_TYPE_OP (u16) 0x8e
124#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */ 119#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */
125#define AML_LAND_OP (u16) 0x90 120#define AML_LOGICAL_AND_OP (u16) 0x90
126#define AML_LOR_OP (u16) 0x91 121#define AML_LOGICAL_OR_OP (u16) 0x91
127#define AML_LNOT_OP (u16) 0x92 122#define AML_LOGICAL_NOT_OP (u16) 0x92
128#define AML_LEQUAL_OP (u16) 0x93 123#define AML_LOGICAL_EQUAL_OP (u16) 0x93
129#define AML_LGREATER_OP (u16) 0x94 124#define AML_LOGICAL_GREATER_OP (u16) 0x94
130#define AML_LLESS_OP (u16) 0x95 125#define AML_LOGICAL_LESS_OP (u16) 0x95
131#define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */ 126#define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */
132#define AML_TO_DECSTRING_OP (u16) 0x97 /* ACPI 2.0 */ 127#define AML_TO_DECIMAL_STRING_OP (u16) 0x97 /* ACPI 2.0 */
133#define AML_TO_HEXSTRING_OP (u16) 0x98 /* ACPI 2.0 */ 128#define AML_TO_HEX_STRING_OP (u16) 0x98 /* ACPI 2.0 */
134#define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */ 129#define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */
135#define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */ 130#define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */
136#define AML_COPY_OP (u16) 0x9d /* ACPI 2.0 */ 131#define AML_COPY_OBJECT_OP (u16) 0x9d /* ACPI 2.0 */
137#define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */ 132#define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */
138#define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */ 133#define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */
139#define AML_IF_OP (u16) 0xa0 134#define AML_IF_OP (u16) 0xa0
@@ -142,18 +137,26 @@
142#define AML_NOOP_OP (u16) 0xa3 137#define AML_NOOP_OP (u16) 0xa3
143#define AML_RETURN_OP (u16) 0xa4 138#define AML_RETURN_OP (u16) 0xa4
144#define AML_BREAK_OP (u16) 0xa5 139#define AML_BREAK_OP (u16) 0xa5
145#define AML_BREAK_POINT_OP (u16) 0xcc 140#define AML_BREAKPOINT_OP (u16) 0xcc
146#define AML_ONES_OP (u16) 0xff 141#define AML_ONES_OP (u16) 0xff
147 142
148/* prefixed opcodes */ 143/*
144 * Combination opcodes (actually two one-byte opcodes)
145 * Used by the disassembler and iASL compiler
146 */
147#define AML_LOGICAL_GREATER_EQUAL_OP (u16) 0x9295 /* LNot (LLess) */
148#define AML_LOGICAL_LESS_EQUAL_OP (u16) 0x9294 /* LNot (LGreater) */
149#define AML_LOGICAL_NOT_EQUAL_OP (u16) 0x9293 /* LNot (LEqual) */
150
151/* Prefixed (2-byte) opcodes (with AML_EXTENDED_PREFIX) */
149 152
150#define AML_EXTENDED_OPCODE (u16) 0x5b00 /* prefix for 2-byte opcodes */ 153#define AML_EXTENDED_OPCODE (u16) 0x5b00 /* Prefix for 2-byte opcodes */
151 154
152#define AML_MUTEX_OP (u16) 0x5b01 155#define AML_MUTEX_OP (u16) 0x5b01
153#define AML_EVENT_OP (u16) 0x5b02 156#define AML_EVENT_OP (u16) 0x5b02
154#define AML_SHIFT_RIGHT_BIT_OP (u16) 0x5b10 157#define AML_SHIFT_RIGHT_BIT_OP (u16) 0x5b10 /* Obsolete, not in ACPI spec */
155#define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11 158#define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11 /* Obsolete, not in ACPI spec */
156#define AML_COND_REF_OF_OP (u16) 0x5b12 159#define AML_CONDITIONAL_REF_OF_OP (u16) 0x5b12
157#define AML_CREATE_FIELD_OP (u16) 0x5b13 160#define AML_CREATE_FIELD_OP (u16) 0x5b13
158#define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */ 161#define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */
159#define AML_LOAD_OP (u16) 0x5b20 162#define AML_LOAD_OP (u16) 0x5b20
@@ -175,21 +178,13 @@
175#define AML_FIELD_OP (u16) 0x5b81 178#define AML_FIELD_OP (u16) 0x5b81
176#define AML_DEVICE_OP (u16) 0x5b82 179#define AML_DEVICE_OP (u16) 0x5b82
177#define AML_PROCESSOR_OP (u16) 0x5b83 180#define AML_PROCESSOR_OP (u16) 0x5b83
178#define AML_POWER_RES_OP (u16) 0x5b84 181#define AML_POWER_RESOURCE_OP (u16) 0x5b84
179#define AML_THERMAL_ZONE_OP (u16) 0x5b85 182#define AML_THERMAL_ZONE_OP (u16) 0x5b85
180#define AML_INDEX_FIELD_OP (u16) 0x5b86 183#define AML_INDEX_FIELD_OP (u16) 0x5b86
181#define AML_BANK_FIELD_OP (u16) 0x5b87 184#define AML_BANK_FIELD_OP (u16) 0x5b87
182#define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */ 185#define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */
183 186
184/* 187/*
185 * Combination opcodes (actually two one-byte opcodes)
186 * Used by the disassembler and iASL compiler
187 */
188#define AML_LGREATEREQUAL_OP (u16) 0x9295
189#define AML_LLESSEQUAL_OP (u16) 0x9294
190#define AML_LNOTEQUAL_OP (u16) 0x9293
191
192/*
193 * Opcodes for "Field" operators 188 * Opcodes for "Field" operators
194 */ 189 */
195#define AML_FIELD_OFFSET_OP (u8) 0x00 190#define AML_FIELD_OFFSET_OP (u8) 0x00
@@ -308,24 +303,19 @@
308#define ARGI_INVALID_OPCODE 0xFFFFFFFF 303#define ARGI_INVALID_OPCODE 0xFFFFFFFF
309 304
310/* 305/*
311 * hash offsets 306 * Some of the flags and types below are of the form:
312 */ 307 *
313#define AML_EXTOP_HASH_OFFSET 22 308 * AML_FLAGS_EXEC_#A_#T,#R, or
314#define AML_LNOT_HASH_OFFSET 19 309 * AML_TYPE_EXEC_#A_#T,#R where:
315 310 *
316/* 311 * #A is the number of required arguments
317 * opcode groups and types 312 * #T is the number of target operands
313 * #R indicates whether there is a return value
318 */ 314 */
319#define OPGRP_NAMED 0x01
320#define OPGRP_FIELD 0x02
321#define OPGRP_BYTELIST 0x04
322 315
323/* 316/*
324 * Opcode information 317 * Opcode information flags
325 */ 318 */
326
327/* Opcode flags */
328
329#define AML_LOGICAL 0x0001 319#define AML_LOGICAL 0x0001
330#define AML_LOGICAL_NUMERIC 0x0002 320#define AML_LOGICAL_NUMERIC 0x0002
331#define AML_MATH 0x0004 321#define AML_MATH 0x0004
@@ -342,7 +332,7 @@
342#define AML_CONSTANT 0x2000 332#define AML_CONSTANT 0x2000
343#define AML_NO_OPERAND_RESOLVE 0x4000 333#define AML_NO_OPERAND_RESOLVE 0x4000
344 334
345/* Convenient flag groupings */ 335/* Convenient flag groupings of the flags above */
346 336
347#define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL 337#define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL
348#define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */ 338#define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */
@@ -359,7 +349,7 @@
359 349
360/* 350/*
361 * The opcode Type is used in a dispatch table, do not change 351 * The opcode Type is used in a dispatch table, do not change
362 * without updating the table. 352 * or add anything new without updating the table.
363 */ 353 */
364#define AML_TYPE_EXEC_0A_0T_1R 0x00 354#define AML_TYPE_EXEC_0A_0T_1R 0x00
365#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */ 355#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */
@@ -385,7 +375,7 @@
385 375
386#define AML_TYPE_METHOD_CALL 0x10 376#define AML_TYPE_METHOD_CALL 0x10
387 377
388/* Misc */ 378/* Miscellaneous types */
389 379
390#define AML_TYPE_CREATE_FIELD 0x11 380#define AML_TYPE_CREATE_FIELD 0x11
391#define AML_TYPE_CREATE_OBJECT 0x12 381#define AML_TYPE_CREATE_OBJECT 0x12
@@ -395,7 +385,6 @@
395#define AML_TYPE_NAMED_SIMPLE 0x16 385#define AML_TYPE_NAMED_SIMPLE 0x16
396#define AML_TYPE_NAMED_COMPLEX 0x17 386#define AML_TYPE_NAMED_COMPLEX 0x17
397#define AML_TYPE_RETURN 0x18 387#define AML_TYPE_RETURN 0x18
398
399#define AML_TYPE_UNDEFINED 0x19 388#define AML_TYPE_UNDEFINED 0x19
400#define AML_TYPE_BOGUS 0x1A 389#define AML_TYPE_BOGUS 0x1A
401 390
diff --git a/drivers/acpi/acpica/dbxface.c b/drivers/acpi/acpica/dbxface.c
index 9b91cea63f46..8f665d94b8b5 100644
--- a/drivers/acpi/acpica/dbxface.c
+++ b/drivers/acpi/acpica/dbxface.c
@@ -126,7 +126,7 @@ error_exit:
126 * 126 *
127 * RETURN: Status 127 * RETURN: Status
128 * 128 *
129 * DESCRIPTION: Called for AML_BREAK_POINT_OP 129 * DESCRIPTION: Called for AML_BREAKPOINT_OP
130 * 130 *
131 ******************************************************************************/ 131 ******************************************************************************/
132 132
diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c
index d31b49feaa79..f470e81b0499 100644
--- a/drivers/acpi/acpica/dscontrol.c
+++ b/drivers/acpi/acpica/dscontrol.c
@@ -347,7 +347,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
347 347
348 break; 348 break;
349 349
350 case AML_BREAK_POINT_OP: 350 case AML_BREAKPOINT_OP:
351 351
352 acpi_db_signal_break_point(walk_state); 352 acpi_db_signal_break_point(walk_state);
353 353
diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c
index adcc72cd53a7..27a7de95f7b0 100644
--- a/drivers/acpi/acpica/dsmthdat.c
+++ b/drivers/acpi/acpica/dsmthdat.c
@@ -672,7 +672,8 @@ acpi_ds_store_object_to_local(u8 type,
672 * 672 *
673 * FUNCTION: acpi_ds_method_data_get_type 673 * FUNCTION: acpi_ds_method_data_get_type
674 * 674 *
675 * PARAMETERS: opcode - Either AML_LOCAL_OP or AML_ARG_OP 675 * PARAMETERS: opcode - Either AML_FIRST LOCAL_OP or
676 * AML_FIRST_ARG_OP
676 * index - Which Local or Arg whose type to get 677 * index - Which Local or Arg whose type to get
677 * walk_state - Current walk state object 678 * walk_state - Current walk state object
678 * 679 *
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index 8deaa16493a0..7df3152ed856 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -114,7 +114,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
114 ((op->common.parent->common.aml_opcode == 114 ((op->common.parent->common.aml_opcode ==
115 AML_PACKAGE_OP) 115 AML_PACKAGE_OP)
116 || (op->common.parent->common.aml_opcode == 116 || (op->common.parent->common.aml_opcode ==
117 AML_VAR_PACKAGE_OP))) { 117 AML_VARIABLE_PACKAGE_OP))) {
118 /* 118 /*
119 * We didn't find the target and we are populating elements 119 * We didn't find the target and we are populating elements
120 * of a package - ignore if slack enabled. Some ASL code 120 * of a package - ignore if slack enabled. Some ASL code
@@ -144,7 +144,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
144 144
145 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || 145 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) ||
146 (op->common.parent->common.aml_opcode == 146 (op->common.parent->common.aml_opcode ==
147 AML_VAR_PACKAGE_OP)) { 147 AML_VARIABLE_PACKAGE_OP)) {
148 /* 148 /*
149 * Attempt to resolve the node to a value before we insert it into 149 * Attempt to resolve the node to a value before we insert it into
150 * the package. If this is a reference to a common data type, 150 * the package. If this is a reference to a common data type,
@@ -398,7 +398,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
398 398
399 parent = op->common.parent; 399 parent = op->common.parent;
400 while ((parent->common.aml_opcode == AML_PACKAGE_OP) || 400 while ((parent->common.aml_opcode == AML_PACKAGE_OP) ||
401 (parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) { 401 (parent->common.aml_opcode == AML_VARIABLE_PACKAGE_OP)) {
402 parent = parent->common.parent; 402 parent = parent->common.parent;
403 } 403 }
404 404
@@ -769,10 +769,10 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
769 switch (op_info->type) { 769 switch (op_info->type) {
770 case AML_TYPE_LOCAL_VARIABLE: 770 case AML_TYPE_LOCAL_VARIABLE:
771 771
772 /* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */ 772 /* Local ID (0-7) is (AML opcode - base AML_FIRST_LOCAL_OP) */
773 773
774 obj_desc->reference.value = 774 obj_desc->reference.value =
775 ((u32)opcode) - AML_LOCAL_OP; 775 ((u32)opcode) - AML_FIRST_LOCAL_OP;
776 obj_desc->reference.class = ACPI_REFCLASS_LOCAL; 776 obj_desc->reference.class = ACPI_REFCLASS_LOCAL;
777 777
778#ifndef ACPI_NO_METHOD_EXECUTION 778#ifndef ACPI_NO_METHOD_EXECUTION
@@ -790,9 +790,10 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
790 790
791 case AML_TYPE_METHOD_ARGUMENT: 791 case AML_TYPE_METHOD_ARGUMENT:
792 792
793 /* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */ 793 /* Arg ID (0-6) is (AML opcode - base AML_FIRST_ARG_OP) */
794 794
795 obj_desc->reference.value = ((u32)opcode) - AML_ARG_OP; 795 obj_desc->reference.value =
796 ((u32)opcode) - AML_FIRST_ARG_OP;
796 obj_desc->reference.class = ACPI_REFCLASS_ARG; 797 obj_desc->reference.class = ACPI_REFCLASS_ARG;
797 798
798#ifndef ACPI_NO_METHOD_EXECUTION 799#ifndef ACPI_NO_METHOD_EXECUTION
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 148523205d41..9a8f8a992b3e 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -639,7 +639,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
639 break; 639 break;
640 640
641 case AML_PACKAGE_OP: 641 case AML_PACKAGE_OP:
642 case AML_VAR_PACKAGE_OP: 642 case AML_VARIABLE_PACKAGE_OP:
643 643
644 status = 644 status =
645 acpi_ds_build_internal_package_obj(walk_state, op, length, 645 acpi_ds_build_internal_package_obj(walk_state, op, length,
@@ -660,7 +660,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
660 if ((!op->common.parent) || 660 if ((!op->common.parent) ||
661 ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) && 661 ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) &&
662 (op->common.parent->common.aml_opcode != 662 (op->common.parent->common.aml_opcode !=
663 AML_VAR_PACKAGE_OP) 663 AML_VARIABLE_PACKAGE_OP)
664 && (op->common.parent->common.aml_opcode != 664 && (op->common.parent->common.aml_opcode !=
665 AML_NAME_OP))) { 665 AML_NAME_OP))) {
666 walk_state->result_obj = obj_desc; 666 walk_state->result_obj = obj_desc;
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 049fbab4e5a6..406edec20de7 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -275,10 +275,10 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
275 if ((op->common.parent->common.aml_opcode == AML_REGION_OP) || 275 if ((op->common.parent->common.aml_opcode == AML_REGION_OP) ||
276 (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) 276 (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP)
277 || (op->common.parent->common.aml_opcode == AML_PACKAGE_OP) 277 || (op->common.parent->common.aml_opcode == AML_PACKAGE_OP)
278 || (op->common.parent->common.aml_opcode ==
279 AML_VAR_PACKAGE_OP)
280 || (op->common.parent->common.aml_opcode == AML_BUFFER_OP) 278 || (op->common.parent->common.aml_opcode == AML_BUFFER_OP)
281 || (op->common.parent->common.aml_opcode == 279 || (op->common.parent->common.aml_opcode ==
280 AML_VARIABLE_PACKAGE_OP)
281 || (op->common.parent->common.aml_opcode ==
282 AML_INT_EVAL_SUBTREE_OP) 282 AML_INT_EVAL_SUBTREE_OP)
283 || (op->common.parent->common.aml_opcode == 283 || (op->common.parent->common.aml_opcode ==
284 AML_BANK_FIELD_OP)) { 284 AML_BANK_FIELD_OP)) {
@@ -551,7 +551,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
551 */ 551 */
552 if (status == AE_NOT_FOUND) { 552 if (status == AE_NOT_FOUND) {
553 if (parent_op->common.aml_opcode == 553 if (parent_op->common.aml_opcode ==
554 AML_COND_REF_OF_OP) { 554 AML_CONDITIONAL_REF_OF_OP) {
555 /* 555 /*
556 * For the Conditional Reference op, it's OK if 556 * For the Conditional Reference op, it's OK if
557 * the name is not found; We just need a way to 557 * the name is not found; We just need a way to
@@ -806,7 +806,7 @@ acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state)
806 } 806 }
807 807
808 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || 808 if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) ||
809 (op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP) || 809 (op->common.parent->common.aml_opcode == AML_VARIABLE_PACKAGE_OP) ||
810 (op->common.parent->common.aml_opcode == AML_REF_OF_OP)) { 810 (op->common.parent->common.aml_opcode == AML_REF_OF_OP)) {
811 811
812 /* TBD: Should we specify this feature as a bit of op_info->Flags of these opcodes? */ 812 /* TBD: Should we specify this feature as a bit of op_info->Flags of these opcodes? */
diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index 78f8e6a4f72f..a2ff8ad70d58 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -497,7 +497,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
497 if ((op->asl.parent) && 497 if ((op->asl.parent) &&
498 ((op->asl.parent->asl.aml_opcode == AML_PACKAGE_OP) 498 ((op->asl.parent->asl.aml_opcode == AML_PACKAGE_OP)
499 || (op->asl.parent->asl.aml_opcode == 499 || (op->asl.parent->asl.aml_opcode ==
500 AML_VAR_PACKAGE_OP))) { 500 AML_VARIABLE_PACKAGE_OP))) {
501 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 501 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
502 "Method Reference in a Package, Op=%p\n", 502 "Method Reference in a Package, Op=%p\n",
503 op)); 503 op));
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index 44d4553dfbdd..8d510c7e20c8 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -528,7 +528,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
528 status = acpi_ex_create_processor(walk_state); 528 status = acpi_ex_create_processor(walk_state);
529 break; 529 break;
530 530
531 case AML_POWER_RES_OP: 531 case AML_POWER_RESOURCE_OP:
532 532
533 status = acpi_ex_create_power_resource(walk_state); 533 status = acpi_ex_create_power_resource(walk_state);
534 break; 534 break;
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index 1a6f59079ea5..f222a80ca38e 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -249,14 +249,14 @@ acpi_ex_do_logical_numeric_op(u16 opcode,
249 ACPI_FUNCTION_TRACE(ex_do_logical_numeric_op); 249 ACPI_FUNCTION_TRACE(ex_do_logical_numeric_op);
250 250
251 switch (opcode) { 251 switch (opcode) {
252 case AML_LAND_OP: /* LAnd (Integer0, Integer1) */ 252 case AML_LOGICAL_AND_OP: /* LAnd (Integer0, Integer1) */
253 253
254 if (integer0 && integer1) { 254 if (integer0 && integer1) {
255 local_result = TRUE; 255 local_result = TRUE;
256 } 256 }
257 break; 257 break;
258 258
259 case AML_LOR_OP: /* LOr (Integer0, Integer1) */ 259 case AML_LOGICAL_OR_OP: /* LOr (Integer0, Integer1) */
260 260
261 if (integer0 || integer1) { 261 if (integer0 || integer1) {
262 local_result = TRUE; 262 local_result = TRUE;
@@ -365,21 +365,21 @@ acpi_ex_do_logical_op(u16 opcode,
365 integer1 = local_operand1->integer.value; 365 integer1 = local_operand1->integer.value;
366 366
367 switch (opcode) { 367 switch (opcode) {
368 case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ 368 case AML_LOGICAL_EQUAL_OP: /* LEqual (Operand0, Operand1) */
369 369
370 if (integer0 == integer1) { 370 if (integer0 == integer1) {
371 local_result = TRUE; 371 local_result = TRUE;
372 } 372 }
373 break; 373 break;
374 374
375 case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ 375 case AML_LOGICAL_GREATER_OP: /* LGreater (Operand0, Operand1) */
376 376
377 if (integer0 > integer1) { 377 if (integer0 > integer1) {
378 local_result = TRUE; 378 local_result = TRUE;
379 } 379 }
380 break; 380 break;
381 381
382 case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ 382 case AML_LOGICAL_LESS_OP: /* LLess (Operand0, Operand1) */
383 383
384 if (integer0 < integer1) { 384 if (integer0 < integer1) {
385 local_result = TRUE; 385 local_result = TRUE;
@@ -408,7 +408,7 @@ acpi_ex_do_logical_op(u16 opcode,
408 (length0 > length1) ? length1 : length0); 408 (length0 > length1) ? length1 : length0);
409 409
410 switch (opcode) { 410 switch (opcode) {
411 case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ 411 case AML_LOGICAL_EQUAL_OP: /* LEqual (Operand0, Operand1) */
412 412
413 /* Length and all bytes must be equal */ 413 /* Length and all bytes must be equal */
414 414
@@ -420,7 +420,7 @@ acpi_ex_do_logical_op(u16 opcode,
420 } 420 }
421 break; 421 break;
422 422
423 case AML_LGREATER_OP: /* LGreater (Operand0, Operand1) */ 423 case AML_LOGICAL_GREATER_OP: /* LGreater (Operand0, Operand1) */
424 424
425 if (compare > 0) { 425 if (compare > 0) {
426 local_result = TRUE; 426 local_result = TRUE;
@@ -437,7 +437,7 @@ acpi_ex_do_logical_op(u16 opcode,
437 } 437 }
438 break; 438 break;
439 439
440 case AML_LLESS_OP: /* LLess (Operand0, Operand1) */ 440 case AML_LOGICAL_LESS_OP: /* LLess (Operand0, Operand1) */
441 441
442 if (compare > 0) { 442 if (compare > 0) {
443 goto cleanup; /* FALSE */ 443 goto cleanup; /* FALSE */
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index ee7b62a86661..caa5ed1f65ec 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -122,7 +122,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
122 122
123 /* Set up multi prefixes */ 123 /* Set up multi prefixes */
124 124
125 *temp_ptr++ = AML_MULTI_NAME_PREFIX_OP; 125 *temp_ptr++ = AML_MULTI_NAME_PREFIX;
126 *temp_ptr++ = (char)num_name_segs; 126 *temp_ptr++ = (char)num_name_segs;
127 } else if (2 == num_name_segs) { 127 } else if (2 == num_name_segs) {
128 128
@@ -342,7 +342,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
342 } 342 }
343 break; 343 break;
344 344
345 case AML_MULTI_NAME_PREFIX_OP: 345 case AML_MULTI_NAME_PREFIX:
346 346
347 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, 347 ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
348 "MultiNamePrefix at %p\n", 348 "MultiNamePrefix at %p\n",
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index af73fcde7e5c..e327349675cd 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -274,7 +274,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
274 case AML_FIND_SET_RIGHT_BIT_OP: 274 case AML_FIND_SET_RIGHT_BIT_OP:
275 case AML_FROM_BCD_OP: 275 case AML_FROM_BCD_OP:
276 case AML_TO_BCD_OP: 276 case AML_TO_BCD_OP:
277 case AML_COND_REF_OF_OP: 277 case AML_CONDITIONAL_REF_OF_OP:
278 278
279 /* Create a return object of type Integer for these opcodes */ 279 /* Create a return object of type Integer for these opcodes */
280 280
@@ -405,7 +405,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
405 } 405 }
406 break; 406 break;
407 407
408 case AML_COND_REF_OF_OP: /* cond_ref_of (source_object, Result) */ 408 case AML_CONDITIONAL_REF_OF_OP: /* cond_ref_of (source_object, Result) */
409 /* 409 /*
410 * This op is a little strange because the internal return value is 410 * This op is a little strange because the internal return value is
411 * different than the return value stored in the result descriptor 411 * different than the return value stored in the result descriptor
@@ -475,14 +475,14 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
475 /* 475 /*
476 * ACPI 2.0 Opcodes 476 * ACPI 2.0 Opcodes
477 */ 477 */
478 case AML_COPY_OP: /* Copy (Source, Target) */ 478 case AML_COPY_OBJECT_OP: /* copy_object (Source, Target) */
479 479
480 status = 480 status =
481 acpi_ut_copy_iobject_to_iobject(operand[0], &return_desc, 481 acpi_ut_copy_iobject_to_iobject(operand[0], &return_desc,
482 walk_state); 482 walk_state);
483 break; 483 break;
484 484
485 case AML_TO_DECSTRING_OP: /* to_decimal_string (Data, Result) */ 485 case AML_TO_DECIMAL_STRING_OP: /* to_decimal_string (Data, Result) */
486 486
487 status = 487 status =
488 acpi_ex_convert_to_string(operand[0], &return_desc, 488 acpi_ex_convert_to_string(operand[0], &return_desc,
@@ -495,7 +495,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
495 } 495 }
496 break; 496 break;
497 497
498 case AML_TO_HEXSTRING_OP: /* to_hex_string (Data, Result) */ 498 case AML_TO_HEX_STRING_OP: /* to_hex_string (Data, Result) */
499 499
500 status = 500 status =
501 acpi_ex_convert_to_string(operand[0], &return_desc, 501 acpi_ex_convert_to_string(operand[0], &return_desc,
@@ -603,7 +603,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
603 /* Examine the AML opcode */ 603 /* Examine the AML opcode */
604 604
605 switch (walk_state->opcode) { 605 switch (walk_state->opcode) {
606 case AML_LNOT_OP: /* LNot (Operand) */ 606 case AML_LOGICAL_NOT_OP: /* LNot (Operand) */
607 607
608 return_desc = acpi_ut_create_integer_object((u64) 0); 608 return_desc = acpi_ut_create_integer_object((u64) 0);
609 if (!return_desc) { 609 if (!return_desc) {
@@ -652,9 +652,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
652 * NOTE: We use LNOT_OP here in order to force resolution of the 652 * NOTE: We use LNOT_OP here in order to force resolution of the
653 * reference operand to an actual integer. 653 * reference operand to an actual integer.
654 */ 654 */
655 status = 655 status = acpi_ex_resolve_operands(AML_LOGICAL_NOT_OP,
656 acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, 656 &temp_desc, walk_state);
657 walk_state);
658 if (ACPI_FAILURE(status)) { 657 if (ACPI_FAILURE(status)) {
659 ACPI_EXCEPTION((AE_INFO, status, 658 ACPI_EXCEPTION((AE_INFO, status,
660 "While resolving operands for [%s]", 659 "While resolving operands for [%s]",
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index 44ecba50c0da..eecb3bff7fd7 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -298,7 +298,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
298 NULL, &return_desc->integer.value); 298 NULL, &return_desc->integer.value);
299 break; 299 break;
300 300
301 case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */ 301 case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */
302 302
303 status = 303 status =
304 acpi_ex_do_concatenate(operand[0], operand[1], &return_desc, 304 acpi_ex_do_concatenate(operand[0], operand[1], &return_desc,
@@ -343,7 +343,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
343 operand[0]->buffer.pointer, length); 343 operand[0]->buffer.pointer, length);
344 break; 344 break;
345 345
346 case AML_CONCAT_RES_OP: 346 case AML_CONCATENATE_TEMPLATE_OP:
347 347
348 /* concatenate_res_template (Buffer, Buffer, Result) (ACPI 2.0) */ 348 /* concatenate_res_template (Buffer, Buffer, Result) (ACPI 2.0) */
349 349
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index 31e4df97cbe1..688032b58a21 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -124,8 +124,8 @@ acpi_ex_do_match(u32 match_op,
124 * Change to: (M == P[i]) 124 * Change to: (M == P[i])
125 */ 125 */
126 status = 126 status =
127 acpi_ex_do_logical_op(AML_LEQUAL_OP, match_obj, package_obj, 127 acpi_ex_do_logical_op(AML_LOGICAL_EQUAL_OP, match_obj,
128 &logical_result); 128 package_obj, &logical_result);
129 if (ACPI_FAILURE(status)) { 129 if (ACPI_FAILURE(status)) {
130 return (FALSE); 130 return (FALSE);
131 } 131 }
@@ -137,8 +137,8 @@ acpi_ex_do_match(u32 match_op,
137 * Change to: (M >= P[i]) (M not_less than P[i]) 137 * Change to: (M >= P[i]) (M not_less than P[i])
138 */ 138 */
139 status = 139 status =
140 acpi_ex_do_logical_op(AML_LLESS_OP, match_obj, package_obj, 140 acpi_ex_do_logical_op(AML_LOGICAL_LESS_OP, match_obj,
141 &logical_result); 141 package_obj, &logical_result);
142 if (ACPI_FAILURE(status)) { 142 if (ACPI_FAILURE(status)) {
143 return (FALSE); 143 return (FALSE);
144 } 144 }
@@ -151,7 +151,7 @@ acpi_ex_do_match(u32 match_op,
151 * Change to: (M > P[i]) 151 * Change to: (M > P[i])
152 */ 152 */
153 status = 153 status =
154 acpi_ex_do_logical_op(AML_LGREATER_OP, match_obj, 154 acpi_ex_do_logical_op(AML_LOGICAL_GREATER_OP, match_obj,
155 package_obj, &logical_result); 155 package_obj, &logical_result);
156 if (ACPI_FAILURE(status)) { 156 if (ACPI_FAILURE(status)) {
157 return (FALSE); 157 return (FALSE);
@@ -164,7 +164,7 @@ acpi_ex_do_match(u32 match_op,
164 * Change to: (M <= P[i]) (M not_greater than P[i]) 164 * Change to: (M <= P[i]) (M not_greater than P[i])
165 */ 165 */
166 status = 166 status =
167 acpi_ex_do_logical_op(AML_LGREATER_OP, match_obj, 167 acpi_ex_do_logical_op(AML_LOGICAL_GREATER_OP, match_obj,
168 package_obj, &logical_result); 168 package_obj, &logical_result);
169 if (ACPI_FAILURE(status)) { 169 if (ACPI_FAILURE(status)) {
170 return (FALSE); 170 return (FALSE);
@@ -178,8 +178,8 @@ acpi_ex_do_match(u32 match_op,
178 * Change to: (M < P[i]) 178 * Change to: (M < P[i])
179 */ 179 */
180 status = 180 status =
181 acpi_ex_do_logical_op(AML_LLESS_OP, match_obj, package_obj, 181 acpi_ex_do_logical_op(AML_LOGICAL_LESS_OP, match_obj,
182 &logical_result); 182 package_obj, &logical_result);
183 if (ACPI_FAILURE(status)) { 183 if (ACPI_FAILURE(status)) {
184 return (FALSE); 184 return (FALSE);
185 } 185 }
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index 7fecefc2e1b4..aa8c6fd74cc3 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -196,7 +196,8 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
196 196
197 if ((walk_state->opcode == 197 if ((walk_state->opcode ==
198 AML_INT_METHODCALL_OP) 198 AML_INT_METHODCALL_OP)
199 || (walk_state->opcode == AML_COPY_OP)) { 199 || (walk_state->opcode ==
200 AML_COPY_OBJECT_OP)) {
200 break; 201 break;
201 } 202 }
202 203
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index a2f8001aeb86..bdd43cde8f36 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -416,7 +416,7 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
416 416
417 /* Only limited target types possible for everything except copy_object */ 417 /* Only limited target types possible for everything except copy_object */
418 418
419 if (walk_state->opcode != AML_COPY_OP) { 419 if (walk_state->opcode != AML_COPY_OBJECT_OP) {
420 /* 420 /*
421 * Only copy_object allows all object types to be overwritten. For 421 * Only copy_object allows all object types to be overwritten. For
422 * target_ref(s), there are restrictions on the object types that 422 * target_ref(s), there are restrictions on the object types that
@@ -499,7 +499,8 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
499 case ACPI_TYPE_STRING: 499 case ACPI_TYPE_STRING:
500 case ACPI_TYPE_BUFFER: 500 case ACPI_TYPE_BUFFER:
501 501
502 if ((walk_state->opcode == AML_COPY_OP) || !implicit_conversion) { 502 if ((walk_state->opcode == AML_COPY_OBJECT_OP) ||
503 !implicit_conversion) {
503 /* 504 /*
504 * However, copy_object and Stores to arg_x do not perform 505 * However, copy_object and Stores to arg_x do not perform
505 * an implicit conversion, as per the ACPI specification. 506 * an implicit conversion, as per the ACPI specification.
diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c
index 85db4716a043..56f59cf5da29 100644
--- a/drivers/acpi/acpica/exstoren.c
+++ b/drivers/acpi/acpica/exstoren.c
@@ -107,7 +107,7 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
107 107
108 /* For copy_object, no further validation necessary */ 108 /* For copy_object, no further validation necessary */
109 109
110 if (walk_state->opcode == AML_COPY_OP) { 110 if (walk_state->opcode == AML_COPY_OBJECT_OP) {
111 break; 111 break;
112 } 112 }
113 113
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 498bb8f70e6b..fb265b5737de 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -485,7 +485,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
485 flags)); 485 flags));
486 break; 486 break;
487 487
488 case AML_MULTI_NAME_PREFIX_OP: 488 case AML_MULTI_NAME_PREFIX:
489 489
490 /* More than one name_seg, search rules do not apply */ 490 /* More than one name_seg, search rules do not apply */
491 491
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index b5a291488e3f..2fe87d0dd9d5 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -252,7 +252,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
252 internal_name[1] = AML_DUAL_NAME_PREFIX; 252 internal_name[1] = AML_DUAL_NAME_PREFIX;
253 result = &internal_name[2]; 253 result = &internal_name[2];
254 } else { 254 } else {
255 internal_name[1] = AML_MULTI_NAME_PREFIX_OP; 255 internal_name[1] = AML_MULTI_NAME_PREFIX;
256 internal_name[2] = (char)num_segments; 256 internal_name[2] = (char)num_segments;
257 result = &internal_name[3]; 257 result = &internal_name[3];
258 } 258 }
@@ -274,7 +274,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
274 internal_name[i] = AML_DUAL_NAME_PREFIX; 274 internal_name[i] = AML_DUAL_NAME_PREFIX;
275 result = &internal_name[(acpi_size)i + 1]; 275 result = &internal_name[(acpi_size)i + 1];
276 } else { 276 } else {
277 internal_name[i] = AML_MULTI_NAME_PREFIX_OP; 277 internal_name[i] = AML_MULTI_NAME_PREFIX;
278 internal_name[(acpi_size)i + 1] = (char)num_segments; 278 internal_name[(acpi_size)i + 1] = (char)num_segments;
279 result = &internal_name[(acpi_size)i + 2]; 279 result = &internal_name[(acpi_size)i + 2];
280 } 280 }
@@ -450,7 +450,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
450 */ 450 */
451 if (prefix_length < internal_name_length) { 451 if (prefix_length < internal_name_length) {
452 switch (internal_name[prefix_length]) { 452 switch (internal_name[prefix_length]) {
453 case AML_MULTI_NAME_PREFIX_OP: 453 case AML_MULTI_NAME_PREFIX:
454 454
455 /* <count> 4-byte names */ 455 /* <count> 4-byte names */
456 456
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 05b62ad44c3e..cda1e151dbc7 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -186,7 +186,7 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state)
186 end += 1 + (2 * ACPI_NAME_SIZE); 186 end += 1 + (2 * ACPI_NAME_SIZE);
187 break; 187 break;
188 188
189 case AML_MULTI_NAME_PREFIX_OP: 189 case AML_MULTI_NAME_PREFIX:
190 190
191 /* Multiple name segments, 4 chars each, count in next byte */ 191 /* Multiple name segments, 4 chars each, count in next byte */
192 192
@@ -339,7 +339,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
339 /* 2) not_found during a cond_ref_of(x) is ok by definition */ 339 /* 2) not_found during a cond_ref_of(x) is ok by definition */
340 340
341 else if (walk_state->op->common.aml_opcode == 341 else if (walk_state->op->common.aml_opcode ==
342 AML_COND_REF_OF_OP) { 342 AML_CONDITIONAL_REF_OF_OP) {
343 status = AE_OK; 343 status = AE_OK;
344 } 344 }
345 345
@@ -352,7 +352,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
352 ((arg->common.parent->common.aml_opcode == 352 ((arg->common.parent->common.aml_opcode ==
353 AML_PACKAGE_OP) 353 AML_PACKAGE_OP)
354 || (arg->common.parent->common.aml_opcode == 354 || (arg->common.parent->common.aml_opcode ==
355 AML_VAR_PACKAGE_OP))) { 355 AML_VARIABLE_PACKAGE_OP))) {
356 status = AE_OK; 356 status = AE_OK;
357 } 357 }
358 } 358 }
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 14d689606d2f..b7da881b66da 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -254,7 +254,7 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
254 254
255 case AML_BUFFER_OP: 255 case AML_BUFFER_OP:
256 case AML_PACKAGE_OP: 256 case AML_PACKAGE_OP:
257 case AML_VAR_PACKAGE_OP: 257 case AML_VARIABLE_PACKAGE_OP:
258 258
259 if ((op->common.parent) && 259 if ((op->common.parent) &&
260 (op->common.parent->common.aml_opcode == 260 (op->common.parent->common.aml_opcode ==
diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c
index 451b672915f1..b8f0617fd421 100644
--- a/drivers/acpi/acpica/psopcode.c
+++ b/drivers/acpi/acpica/psopcode.c
@@ -69,7 +69,7 @@ ACPI_MODULE_NAME("psopcode")
69 AML_DEVICE_OP 69 AML_DEVICE_OP
70 AML_THERMAL_ZONE_OP 70 AML_THERMAL_ZONE_OP
71 AML_METHOD_OP 71 AML_METHOD_OP
72 AML_POWER_RES_OP 72 AML_POWER_RESOURCE_OP
73 AML_PROCESSOR_OP 73 AML_PROCESSOR_OP
74 AML_FIELD_OP 74 AML_FIELD_OP
75 AML_INDEX_FIELD_OP 75 AML_INDEX_FIELD_OP
@@ -95,7 +95,7 @@ ACPI_MODULE_NAME("psopcode")
95 AML_DEVICE_OP 95 AML_DEVICE_OP
96 AML_THERMAL_ZONE_OP 96 AML_THERMAL_ZONE_OP
97 AML_METHOD_OP 97 AML_METHOD_OP
98 AML_POWER_RES_OP 98 AML_POWER_RESOURCE_OP
99 AML_PROCESSOR_OP 99 AML_PROCESSOR_OP
100 AML_FIELD_OP 100 AML_FIELD_OP
101 AML_INDEX_FIELD_OP 101 AML_INDEX_FIELD_OP
@@ -113,7 +113,7 @@ ACPI_MODULE_NAME("psopcode")
113 AML_DEVICE_OP 113 AML_DEVICE_OP
114 AML_THERMAL_ZONE_OP 114 AML_THERMAL_ZONE_OP
115 AML_METHOD_OP 115 AML_METHOD_OP
116 AML_POWER_RES_OP 116 AML_POWER_RESOURCE_OP
117 AML_PROCESSOR_OP 117 AML_PROCESSOR_OP
118 AML_NAME_OP 118 AML_NAME_OP
119 AML_ALIAS_OP 119 AML_ALIAS_OP
@@ -136,7 +136,7 @@ ACPI_MODULE_NAME("psopcode")
136 AML_DEVICE_OP 136 AML_DEVICE_OP
137 AML_THERMAL_ZONE_OP 137 AML_THERMAL_ZONE_OP
138 AML_METHOD_OP 138 AML_METHOD_OP
139 AML_POWER_RES_OP 139 AML_POWER_RESOURCE_OP
140 AML_PROCESSOR_OP 140 AML_PROCESSOR_OP
141 AML_NAME_OP 141 AML_NAME_OP
142 AML_ALIAS_OP 142 AML_ALIAS_OP
@@ -149,7 +149,7 @@ ACPI_MODULE_NAME("psopcode")
149 must be deferred until needed 149 must be deferred until needed
150 150
151 AML_METHOD_OP 151 AML_METHOD_OP
152 AML_VAR_PACKAGE_OP 152 AML_VARIABLE_PACKAGE_OP
153 AML_CREATE_FIELD_OP 153 AML_CREATE_FIELD_OP
154 AML_CREATE_BIT_FIELD_OP 154 AML_CREATE_BIT_FIELD_OP
155 AML_CREATE_BYTE_FIELD_OP 155 AML_CREATE_BYTE_FIELD_OP
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index a813bbbd5a8b..8116a670de39 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -105,7 +105,7 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)
105 aml = parser_state->aml; 105 aml = parser_state->aml;
106 opcode = (u16) ACPI_GET8(aml); 106 opcode = (u16) ACPI_GET8(aml);
107 107
108 if (opcode == AML_EXTENDED_OP_PREFIX) { 108 if (opcode == AML_EXTENDED_PREFIX) {
109 109
110 /* Extended opcode, get the second opcode byte */ 110 /* Extended opcode, get the second opcode byte */
111 111
@@ -210,7 +210,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
210 || (op->common.parent->common.aml_opcode == 210 || (op->common.parent->common.aml_opcode ==
211 AML_BANK_FIELD_OP) 211 AML_BANK_FIELD_OP)
212 || (op->common.parent->common.aml_opcode == 212 || (op->common.parent->common.aml_opcode ==
213 AML_VAR_PACKAGE_OP)) { 213 AML_VARIABLE_PACKAGE_OP)) {
214 replacement_op = 214 replacement_op =
215 acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP, 215 acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP,
216 op->common.aml); 216 op->common.aml);
@@ -225,7 +225,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
225 if ((op->common.aml_opcode == AML_BUFFER_OP) 225 if ((op->common.aml_opcode == AML_BUFFER_OP)
226 || (op->common.aml_opcode == AML_PACKAGE_OP) 226 || (op->common.aml_opcode == AML_PACKAGE_OP)
227 || (op->common.aml_opcode == 227 || (op->common.aml_opcode ==
228 AML_VAR_PACKAGE_OP)) { 228 AML_VARIABLE_PACKAGE_OP)) {
229 replacement_op = 229 replacement_op =
230 acpi_ps_alloc_op(op->common. 230 acpi_ps_alloc_op(op->common.
231 aml_opcode, 231 aml_opcode,
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c
index 9677fff8fd47..a11d475b79cd 100644
--- a/drivers/acpi/acpica/pstree.c
+++ b/drivers/acpi/acpica/pstree.c
@@ -296,7 +296,7 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op)
296 child = acpi_ps_get_arg(op, 1); 296 child = acpi_ps_get_arg(op, 1);
297 break; 297 break;
298 298
299 case AML_POWER_RES_OP: 299 case AML_POWER_RESOURCE_OP:
300 case AML_INDEX_FIELD_OP: 300 case AML_INDEX_FIELD_OP:
301 301
302 child = acpi_ps_get_arg(op, 2); 302 child = acpi_ps_get_arg(op, 2);