aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-05-06 04:49:01 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-05-06 04:49:01 -0400
commit317e2cac4551879f14eb383fd4e5469f29231a0d (patch)
tree3d12ea38a84b455b4e52598abb14fd6e176096c5
parent2c2a2fb1e2a9256714338875bede6b7cbd4b9542 (diff)
parentf456277ee15ff5d150191cb4a2f0181a8804c851 (diff)
Merge branch 'acpica'
* acpica: ACPICA: Update version to 20190405 ACPICA: Namespace: add check to avoid null pointer dereference ACPICA: Update version to 20190329 ACPICA: utilities: fix spelling of PCC to platform_comm_channel ACPICA: Rename nameseg length macro/define for clarity ACPICA: Rename nameseg compare macro for clarity ACPICA: Rename nameseg copy macro for clarity
-rw-r--r--arch/x86/boot/compressed/acpi.c2
-rw-r--r--drivers/acpi/acpi_configfs.c4
-rw-r--r--drivers/acpi/acpica/aclocal.h4
-rw-r--r--drivers/acpi/acpica/dbexec.c2
-rw-r--r--drivers/acpi/acpica/dbnames.c2
-rw-r--r--drivers/acpi/acpica/dsinit.c2
-rw-r--r--drivers/acpi/acpica/evgpeinit.c4
-rw-r--r--drivers/acpi/acpica/exnames.c6
-rw-r--r--drivers/acpi/acpica/nsaccess.c2
-rw-r--r--drivers/acpi/acpica/nsalloc.c4
-rw-r--r--drivers/acpi/acpica/nsdump.c2
-rw-r--r--drivers/acpi/acpica/nsinit.c4
-rw-r--r--drivers/acpi/acpica/nsnames.c8
-rw-r--r--drivers/acpi/acpica/nsparse.c2
-rw-r--r--drivers/acpi/acpica/nsrepair.c2
-rw-r--r--drivers/acpi/acpica/nsrepair2.c4
-rw-r--r--drivers/acpi/acpica/nsutils.c14
-rw-r--r--drivers/acpi/acpica/nsxfname.c4
-rw-r--r--drivers/acpi/acpica/psargs.c8
-rw-r--r--drivers/acpi/acpica/rsxface.c8
-rw-r--r--drivers/acpi/acpica/tbdata.c3
-rw-r--r--drivers/acpi/acpica/tbfind.c20
-rw-r--r--drivers/acpi/acpica/tbinstal.c2
-rw-r--r--drivers/acpi/acpica/tbprint.c10
-rw-r--r--drivers/acpi/acpica/tbutils.c6
-rw-r--r--drivers/acpi/acpica/tbxface.c4
-rw-r--r--drivers/acpi/acpica/tbxfload.c15
-rw-r--r--drivers/acpi/acpica/utascii.c2
-rw-r--r--drivers/acpi/acpica/utdecode.c4
-rw-r--r--drivers/acpi/acpica/utmisc.c8
-rw-r--r--drivers/acpi/acpica/utpredef.c4
-rw-r--r--drivers/acpi/acpica/utstring.c6
-rw-r--r--drivers/acpi/scan.c2
-rw-r--r--drivers/acpi/sysfs.c14
-rw-r--r--drivers/acpi/tables.c4
-rw-r--r--drivers/firmware/iscsi_ibft.c2
-rw-r--r--drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c2
-rw-r--r--include/acpi/acpixf.h2
-rw-r--r--include/acpi/actbl.h4
-rw-r--r--include/acpi/actypes.h12
-rw-r--r--tools/power/acpi/os_specific/service_layers/oslinuxtbl.c48
-rw-r--r--tools/power/acpi/tools/acpidump/apdump.c8
-rw-r--r--tools/power/acpi/tools/acpidump/apfiles.c8
43 files changed, 142 insertions, 136 deletions
diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
index 0ef4ad55b29b..ad84239e595e 100644
--- a/arch/x86/boot/compressed/acpi.c
+++ b/arch/x86/boot/compressed/acpi.c
@@ -276,7 +276,7 @@ static unsigned long get_acpi_srat_table(void)
276 if (acpi_table) { 276 if (acpi_table) {
277 header = (struct acpi_table_header *)acpi_table; 277 header = (struct acpi_table_header *)acpi_table;
278 278
279 if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_SRAT)) 279 if (ACPI_COMPARE_NAMESEG(header->signature, ACPI_SIG_SRAT))
280 return acpi_table; 280 return acpi_table;
281 } 281 }
282 entry += size; 282 entry += size;
diff --git a/drivers/acpi/acpi_configfs.c b/drivers/acpi/acpi_configfs.c
index 81bfc6197293..f92033661239 100644
--- a/drivers/acpi/acpi_configfs.c
+++ b/drivers/acpi/acpi_configfs.c
@@ -109,7 +109,7 @@ static ssize_t acpi_table_signature_show(struct config_item *cfg, char *str)
109 if (!h) 109 if (!h)
110 return -EINVAL; 110 return -EINVAL;
111 111
112 return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->signature); 112 return sprintf(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->signature);
113} 113}
114 114
115static ssize_t acpi_table_length_show(struct config_item *cfg, char *str) 115static ssize_t acpi_table_length_show(struct config_item *cfg, char *str)
@@ -170,7 +170,7 @@ static ssize_t acpi_table_asl_compiler_id_show(struct config_item *cfg,
170 if (!h) 170 if (!h)
171 return -EINVAL; 171 return -EINVAL;
172 172
173 return sprintf(str, "%.*s\n", ACPI_NAME_SIZE, h->asl_compiler_id); 173 return sprintf(str, "%.*s\n", ACPI_NAMESEG_SIZE, h->asl_compiler_id);
174} 174}
175 175
176static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg, 176static ssize_t acpi_table_asl_compiler_revision_show(struct config_item *cfg,
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index a2dfbf6b004e..13d513b81589 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
293 * expected_return_btypes - Allowed type(s) for the return value 293 * expected_return_btypes - Allowed type(s) for the return value
294 */ 294 */
295struct acpi_name_info { 295struct acpi_name_info {
296 char name[ACPI_NAME_SIZE]; 296 char name[ACPI_NAMESEG_SIZE];
297 u16 argument_list; 297 u16 argument_list;
298 u8 expected_btypes; 298 u8 expected_btypes;
299}; 299};
@@ -370,7 +370,7 @@ typedef acpi_status (*acpi_object_converter) (struct acpi_namespace_node *
370 converted_object); 370 converted_object);
371 371
372struct acpi_simple_repair_info { 372struct acpi_simple_repair_info {
373 char name[ACPI_NAME_SIZE]; 373 char name[ACPI_NAMESEG_SIZE];
374 u32 unexpected_btypes; 374 u32 unexpected_btypes;
375 u32 package_index; 375 u32 package_index;
376 acpi_object_converter object_converter; 376 acpi_object_converter object_converter;
diff --git a/drivers/acpi/acpica/dbexec.c b/drivers/acpi/acpica/dbexec.c
index bb43305cb215..4027eaab18a4 100644
--- a/drivers/acpi/acpica/dbexec.c
+++ b/drivers/acpi/acpica/dbexec.c
@@ -453,7 +453,7 @@ acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags)
453 453
454 /* Dump a _PLD buffer if present */ 454 /* Dump a _PLD buffer if present */
455 455
456 if (ACPI_COMPARE_NAME 456 if (ACPI_COMPARE_NAMESEG
457 ((ACPI_CAST_PTR 457 ((ACPI_CAST_PTR
458 (struct acpi_namespace_node, 458 (struct acpi_namespace_node,
459 acpi_gbl_db_method_info.method)->name.ascii), 459 acpi_gbl_db_method_info.method)->name.ascii),
diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c
index 004d34d9369b..63fe30e86807 100644
--- a/drivers/acpi/acpica/dbnames.c
+++ b/drivers/acpi/acpica/dbnames.c
@@ -354,7 +354,7 @@ acpi_status acpi_db_find_name_in_namespace(char *name_arg)
354 char acpi_name[5] = "____"; 354 char acpi_name[5] = "____";
355 char *acpi_name_ptr = acpi_name; 355 char *acpi_name_ptr = acpi_name;
356 356
357 if (strlen(name_arg) > ACPI_NAME_SIZE) { 357 if (strlen(name_arg) > ACPI_NAMESEG_SIZE) {
358 acpi_os_printf("Name must be no longer than 4 characters\n"); 358 acpi_os_printf("Name must be no longer than 4 characters\n");
359 return (AE_OK); 359 return (AE_OK);
360 } 360 }
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index a4a24ffe5fae..4ebd23700bbc 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -200,7 +200,7 @@ acpi_ds_initialize_objects(u32 table_index,
200 200
201 /* DSDT is always the first AML table */ 201 /* DSDT is always the first AML table */
202 202
203 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT)) { 203 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_DSDT)) {
204 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, 204 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
205 "\nInitializing Namespace objects:\n")); 205 "\nInitializing Namespace objects:\n"));
206 } 206 }
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
index c92d2f6ebe01..b04f982e59fa 100644
--- a/drivers/acpi/acpica/evgpeinit.c
+++ b/drivers/acpi/acpica/evgpeinit.c
@@ -292,7 +292,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
292 acpi_status status; 292 acpi_status status;
293 u32 gpe_number; 293 u32 gpe_number;
294 u8 temp_gpe_number; 294 u8 temp_gpe_number;
295 char name[ACPI_NAME_SIZE + 1]; 295 char name[ACPI_NAMESEG_SIZE + 1];
296 u8 type; 296 u8 type;
297 297
298 ACPI_FUNCTION_TRACE(ev_match_gpe_method); 298 ACPI_FUNCTION_TRACE(ev_match_gpe_method);
@@ -310,7 +310,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
310 * 1) Extract the method name and null terminate it 310 * 1) Extract the method name and null terminate it
311 */ 311 */
312 ACPI_MOVE_32_TO_32(name, &method_node->name.integer); 312 ACPI_MOVE_32_TO_32(name, &method_node->name.integer);
313 name[ACPI_NAME_SIZE] = 0; 313 name[ACPI_NAMESEG_SIZE] = 0;
314 314
315 /* 2) Name must begin with an underscore */ 315 /* 2) Name must begin with an underscore */
316 316
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index bd68d66e89f0..6b76be5212a4 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -53,10 +53,10 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
53 53
54 /* Special case for root */ 54 /* Special case for root */
55 55
56 size_needed = 1 + (ACPI_NAME_SIZE * num_name_segs) + 2 + 1; 56 size_needed = 1 + (ACPI_NAMESEG_SIZE * num_name_segs) + 2 + 1;
57 } else { 57 } else {
58 size_needed = 58 size_needed =
59 prefix_count + (ACPI_NAME_SIZE * num_name_segs) + 2 + 1; 59 prefix_count + (ACPI_NAMESEG_SIZE * num_name_segs) + 2 + 1;
60 } 60 }
61 61
62 /* 62 /*
@@ -141,7 +141,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
141 } 141 }
142 142
143 for (index = 0; 143 for (index = 0;
144 (index < ACPI_NAME_SIZE) 144 (index < ACPI_NAMESEG_SIZE)
145 && (acpi_ut_valid_name_char(*aml_address, 0)); index++) { 145 && (acpi_ut_valid_name_char(*aml_address, 0)); index++) {
146 char_buf[index] = *aml_address++; 146 char_buf[index] = *aml_address++;
147 } 147 }
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 75192b958544..7b855603f81a 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -683,7 +683,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
683 683
684 /* Point to next name segment and make this node current */ 684 /* Point to next name segment and make this node current */
685 685
686 path += ACPI_NAME_SIZE; 686 path += ACPI_NAMESEG_SIZE;
687 current_node = this_node; 687 current_node = this_node;
688 } 688 }
689 689
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c
index 5470213b8e64..6eb63db72249 100644
--- a/drivers/acpi/acpica/nsalloc.c
+++ b/drivers/acpi/acpica/nsalloc.c
@@ -74,6 +74,10 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node)
74 74
75 ACPI_FUNCTION_NAME(ns_delete_node); 75 ACPI_FUNCTION_NAME(ns_delete_node);
76 76
77 if (!node) {
78 return_VOID;
79 }
80
77 /* Detach an object if there is one */ 81 /* Detach an object if there is one */
78 82
79 acpi_ns_detach_object(node); 83 acpi_ns_detach_object(node);
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 15070bd0c28a..1b12c172e115 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -70,7 +70,7 @@ void acpi_ns_print_pathname(u32 num_segments, const char *pathname)
70 acpi_os_printf("?"); 70 acpi_os_printf("?");
71 } 71 }
72 72
73 pathname += ACPI_NAME_SIZE; 73 pathname += ACPI_NAMESEG_SIZE;
74 num_segments--; 74 num_segments--;
75 if (num_segments) { 75 if (num_segments) {
76 acpi_os_printf("."); 76 acpi_os_printf(".");
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 19fb8dda870f..53e5d00d3a5e 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -478,7 +478,7 @@ acpi_ns_find_ini_methods(acpi_handle obj_handle,
478 478
479 /* We are only looking for methods named _INI */ 479 /* We are only looking for methods named _INI */
480 480
481 if (!ACPI_COMPARE_NAME(node->name.ascii, METHOD_NAME__INI)) { 481 if (!ACPI_COMPARE_NAMESEG(node->name.ascii, METHOD_NAME__INI)) {
482 return (AE_OK); 482 return (AE_OK);
483 } 483 }
484 484
@@ -641,7 +641,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
641 * Note: We know there is an _INI within this subtree, but it may not be 641 * Note: We know there is an _INI within this subtree, but it may not be
642 * under this particular device, it may be lower in the branch. 642 * under this particular device, it may be lower in the branch.
643 */ 643 */
644 if (!ACPI_COMPARE_NAME(device_node->name.ascii, "_SB_") || 644 if (!ACPI_COMPARE_NAMESEG(device_node->name.ascii, "_SB_") ||
645 device_node->parent != acpi_gbl_root_node) { 645 device_node->parent != acpi_gbl_root_node) {
646 ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname 646 ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname
647 (ACPI_TYPE_METHOD, device_node, 647 (ACPI_TYPE_METHOD, device_node,
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index 289c15bb8c6a..370bbc867745 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -108,8 +108,8 @@ acpi_ns_handle_to_name(acpi_handle target_handle, struct acpi_buffer *buffer)
108 /* Just copy the ACPI name from the Node and zero terminate it */ 108 /* Just copy the ACPI name from the Node and zero terminate it */
109 109
110 node_name = acpi_ut_get_node_name(node); 110 node_name = acpi_ut_get_node_name(node);
111 ACPI_MOVE_NAME(buffer->pointer, node_name); 111 ACPI_COPY_NAMESEG(buffer->pointer, node_name);
112 ((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0; 112 ((char *)buffer->pointer)[ACPI_NAMESEG_SIZE] = 0;
113 113
114 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%4.4s\n", (char *)buffer->pointer)); 114 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%4.4s\n", (char *)buffer->pointer));
115 return_ACPI_STATUS(AE_OK); 115 return_ACPI_STATUS(AE_OK);
@@ -198,7 +198,7 @@ acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
198 char *full_path, u32 path_size, u8 no_trailing) 198 char *full_path, u32 path_size, u8 no_trailing)
199{ 199{
200 u32 length = 0, i; 200 u32 length = 0, i;
201 char name[ACPI_NAME_SIZE]; 201 char name[ACPI_NAMESEG_SIZE];
202 u8 do_no_trailing; 202 u8 do_no_trailing;
203 char c, *left, *right; 203 char c, *left, *right;
204 struct acpi_namespace_node *next_node; 204 struct acpi_namespace_node *next_node;
@@ -446,7 +446,7 @@ static void acpi_ns_normalize_pathname(char *original_path)
446 446
447 /* Do one nameseg at a time */ 447 /* Do one nameseg at a time */
448 448
449 for (i = 0; (i < ACPI_NAME_SIZE) && *input_path; i++) { 449 for (i = 0; (i < ACPI_NAMESEG_SIZE) && *input_path; i++) {
450 if ((i == 0) || (*input_path != '_')) { /* First char is allowed to be underscore */ 450 if ((i == 0) || (*input_path != '_')) { /* First char is allowed to be underscore */
451 *new_path = *input_path; 451 *new_path = *input_path;
452 new_path++; 452 new_path++;
diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
index c0b4f7bedfab..f16cf5e4742c 100644
--- a/drivers/acpi/acpica/nsparse.c
+++ b/drivers/acpi/acpica/nsparse.c
@@ -203,7 +203,7 @@ acpi_ns_one_complete_parse(u32 pass_number,
203 203
204 /* Found OSDT table, enable the namespace override feature */ 204 /* Found OSDT table, enable the namespace override feature */
205 205
206 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) && 206 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_OSDT) &&
207 pass_number == ACPI_IMODE_LOAD_PASS1) { 207 pass_number == ACPI_IMODE_LOAD_PASS1) {
208 walk_state->namespace_override = TRUE; 208 walk_state->namespace_override = TRUE;
209 } 209 }
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 0aacfa48e20d..be86fea8e4d4 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -316,7 +316,7 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct
316 316
317 this_name = acpi_object_repair_info; 317 this_name = acpi_object_repair_info;
318 while (this_name->object_converter) { 318 while (this_name->object_converter) {
319 if (ACPI_COMPARE_NAME(node->name.ascii, this_name->name)) { 319 if (ACPI_COMPARE_NAMESEG(node->name.ascii, this_name->name)) {
320 320
321 /* Check if we can actually repair this name/type combination */ 321 /* Check if we can actually repair this name/type combination */
322 322
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index d5804a6d1d65..8d776256b213 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -25,7 +25,7 @@ acpi_status (*acpi_repair_function) (struct acpi_evaluate_info * info,
25 return_object_ptr); 25 return_object_ptr);
26 26
27typedef struct acpi_repair_info { 27typedef struct acpi_repair_info {
28 char name[ACPI_NAME_SIZE]; 28 char name[ACPI_NAMESEG_SIZE];
29 acpi_repair_function repair_function; 29 acpi_repair_function repair_function;
30 30
31} acpi_repair_info; 31} acpi_repair_info;
@@ -188,7 +188,7 @@ static const struct acpi_repair_info *acpi_ns_match_complex_repair(struct
188 188
189 this_name = acpi_ns_repairable_names; 189 this_name = acpi_ns_repairable_names;
190 while (this_name->repair_function) { 190 while (this_name->repair_function) {
191 if (ACPI_COMPARE_NAME(node->name.ascii, this_name->name)) { 191 if (ACPI_COMPARE_NAMESEG(node->name.ascii, this_name->name)) {
192 return (this_name); 192 return (this_name);
193 } 193 }
194 194
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index e5cef1edf49f..6bc90d46db5c 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -178,7 +178,7 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info)
178 } 178 }
179 } 179 }
180 180
181 info->length = (ACPI_NAME_SIZE * info->num_segments) + 181 info->length = (ACPI_NAMESEG_SIZE * info->num_segments) +
182 4 + info->num_carats; 182 4 + info->num_carats;
183 183
184 info->next_external_char = next_external_char; 184 info->next_external_char = next_external_char;
@@ -249,7 +249,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
249 /* Build the name (minus path separators) */ 249 /* Build the name (minus path separators) */
250 250
251 for (; num_segments; num_segments--) { 251 for (; num_segments; num_segments--) {
252 for (i = 0; i < ACPI_NAME_SIZE; i++) { 252 for (i = 0; i < ACPI_NAMESEG_SIZE; i++) {
253 if (ACPI_IS_PATH_SEPARATOR(*external_name) || 253 if (ACPI_IS_PATH_SEPARATOR(*external_name) ||
254 (*external_name == 0)) { 254 (*external_name == 0)) {
255 255
@@ -274,7 +274,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
274 /* Move on the next segment */ 274 /* Move on the next segment */
275 275
276 external_name++; 276 external_name++;
277 result += ACPI_NAME_SIZE; 277 result += ACPI_NAMESEG_SIZE;
278 } 278 }
279 279
280 /* Terminate the string */ 280 /* Terminate the string */
@@ -489,12 +489,12 @@ acpi_ns_externalize_name(u32 internal_name_length,
489 489
490 /* Copy and validate the 4-char name segment */ 490 /* Copy and validate the 4-char name segment */
491 491
492 ACPI_MOVE_NAME(&(*converted_name)[j], 492 ACPI_COPY_NAMESEG(&(*converted_name)[j],
493 &internal_name[names_index]); 493 &internal_name[names_index]);
494 acpi_ut_repair_name(&(*converted_name)[j]); 494 acpi_ut_repair_name(&(*converted_name)[j]);
495 495
496 j += ACPI_NAME_SIZE; 496 j += ACPI_NAMESEG_SIZE;
497 names_index += ACPI_NAME_SIZE; 497 names_index += ACPI_NAMESEG_SIZE;
498 } 498 }
499 } 499 }
500 500
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index de2d3135d6a9..55b4a5b3331f 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -495,8 +495,8 @@ acpi_status acpi_install_method(u8 *buffer)
495 495
496 /* Table must be a DSDT or SSDT */ 496 /* Table must be a DSDT or SSDT */
497 497
498 if (!ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) && 498 if (!ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_DSDT) &&
499 !ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) { 499 !ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_SSDT)) {
500 return (AE_BAD_HEADER); 500 return (AE_BAD_HEADER);
501 } 501 }
502 502
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 9d9d442cd999..e62c7897fdf1 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -150,21 +150,21 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state)
150 150
151 /* Two name segments */ 151 /* Two name segments */
152 152
153 end += 1 + (2 * ACPI_NAME_SIZE); 153 end += 1 + (2 * ACPI_NAMESEG_SIZE);
154 break; 154 break;
155 155
156 case AML_MULTI_NAME_PREFIX: 156 case AML_MULTI_NAME_PREFIX:
157 157
158 /* Multiple name segments, 4 chars each, count in next byte */ 158 /* Multiple name segments, 4 chars each, count in next byte */
159 159
160 end += 2 + (*(end + 1) * ACPI_NAME_SIZE); 160 end += 2 + (*(end + 1) * ACPI_NAMESEG_SIZE);
161 break; 161 break;
162 162
163 default: 163 default:
164 164
165 /* Single name segment */ 165 /* Single name segment */
166 166
167 end += ACPI_NAME_SIZE; 167 end += ACPI_NAMESEG_SIZE;
168 break; 168 break;
169 } 169 }
170 170
@@ -522,7 +522,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
522 522
523 ACPI_MOVE_32_TO_32(&name, parser_state->aml); 523 ACPI_MOVE_32_TO_32(&name, parser_state->aml);
524 acpi_ps_set_name(field, name); 524 acpi_ps_set_name(field, name);
525 parser_state->aml += ACPI_NAME_SIZE; 525 parser_state->aml += ACPI_NAMESEG_SIZE;
526 526
527 ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state); 527 ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state);
528 528
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 1d6f136e4068..c62be3d91712 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -603,10 +603,10 @@ acpi_walk_resources(acpi_handle device_handle,
603 /* Parameter validation */ 603 /* Parameter validation */
604 604
605 if (!device_handle || !user_function || !name || 605 if (!device_handle || !user_function || !name ||
606 (!ACPI_COMPARE_NAME(name, METHOD_NAME__CRS) && 606 (!ACPI_COMPARE_NAMESEG(name, METHOD_NAME__CRS) &&
607 !ACPI_COMPARE_NAME(name, METHOD_NAME__PRS) && 607 !ACPI_COMPARE_NAMESEG(name, METHOD_NAME__PRS) &&
608 !ACPI_COMPARE_NAME(name, METHOD_NAME__AEI) && 608 !ACPI_COMPARE_NAMESEG(name, METHOD_NAME__AEI) &&
609 !ACPI_COMPARE_NAME(name, METHOD_NAME__DMA))) { 609 !ACPI_COMPARE_NAMESEG(name, METHOD_NAME__DMA))) {
610 return_ACPI_STATUS(AE_BAD_PARAMETER); 610 return_ACPI_STATUS(AE_BAD_PARAMETER);
611 } 611 }
612 612
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 0cecd0039acf..933f81316ad2 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -480,7 +480,8 @@ acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
480 480
481 /* If a particular signature is expected (DSDT/FACS), it must match */ 481 /* If a particular signature is expected (DSDT/FACS), it must match */
482 482
483 if (signature && !ACPI_COMPARE_NAME(&table_desc->signature, signature)) { 483 if (signature &&
484 !ACPI_COMPARE_NAMESEG(&table_desc->signature, signature)) {
484 ACPI_BIOS_ERROR((AE_INFO, 485 ACPI_BIOS_ERROR((AE_INFO,
485 "Invalid signature 0x%X for ACPI table, expected [%s]", 486 "Invalid signature 0x%X for ACPI table, expected [%s]",
486 table_desc->signature.integer, signature)); 487 table_desc->signature.integer, signature));
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index 951bd8e1c50a..b2abb40023a6 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -56,7 +56,7 @@ acpi_tb_find_table(char *signature,
56 /* Normalize the input strings */ 56 /* Normalize the input strings */
57 57
58 memset(&header, 0, sizeof(struct acpi_table_header)); 58 memset(&header, 0, sizeof(struct acpi_table_header));
59 ACPI_MOVE_NAME(header.signature, signature); 59 ACPI_COPY_NAMESEG(header.signature, signature);
60 strncpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE); 60 strncpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
61 strncpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE); 61 strncpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
62 62
@@ -65,7 +65,7 @@ acpi_tb_find_table(char *signature,
65 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 65 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
66 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { 66 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
67 if (memcmp(&(acpi_gbl_root_table_list.tables[i].signature), 67 if (memcmp(&(acpi_gbl_root_table_list.tables[i].signature),
68 header.signature, ACPI_NAME_SIZE)) { 68 header.signature, ACPI_NAMESEG_SIZE)) {
69 69
70 /* Not the requested table */ 70 /* Not the requested table */
71 71
@@ -94,14 +94,14 @@ acpi_tb_find_table(char *signature,
94 94
95 if (!memcmp 95 if (!memcmp
96 (acpi_gbl_root_table_list.tables[i].pointer->signature, 96 (acpi_gbl_root_table_list.tables[i].pointer->signature,
97 header.signature, ACPI_NAME_SIZE) && (!oem_id[0] 97 header.signature, ACPI_NAMESEG_SIZE) && (!oem_id[0]
98 || 98 ||
99 !memcmp 99 !memcmp
100 (acpi_gbl_root_table_list. 100 (acpi_gbl_root_table_list.
101 tables[i].pointer-> 101 tables[i].
102 oem_id, 102 pointer->oem_id,
103 header.oem_id, 103 header.oem_id,
104 ACPI_OEM_ID_SIZE)) 104 ACPI_OEM_ID_SIZE))
105 && (!oem_table_id[0] 105 && (!oem_table_id[0]
106 || !memcmp(acpi_gbl_root_table_list.tables[i].pointer-> 106 || !memcmp(acpi_gbl_root_table_list.tables[i].pointer->
107 oem_table_id, header.oem_table_id, 107 oem_table_id, header.oem_table_id,
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index be6642bf6366..ef1ffd36ab3f 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -120,7 +120,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
120 */ 120 */
121 if (!reload && 121 if (!reload &&
122 acpi_gbl_disable_ssdt_table_install && 122 acpi_gbl_disable_ssdt_table_install &&
123 ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) { 123 ACPI_COMPARE_NAMESEG(&new_table_desc.signature, ACPI_SIG_SSDT)) {
124 ACPI_INFO(("Ignoring installation of %4.4s at %8.8X%8.8X", 124 ACPI_INFO(("Ignoring installation of %4.4s at %8.8X%8.8X",
125 new_table_desc.signature.ascii, 125 new_table_desc.signature.ascii,
126 ACPI_FORMAT_UINT64(address))); 126 ACPI_FORMAT_UINT64(address)));
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index 9b5df95d881b..4764f849cb78 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -69,10 +69,10 @@ acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
69 69
70 memcpy(out_header, header, sizeof(struct acpi_table_header)); 70 memcpy(out_header, header, sizeof(struct acpi_table_header));
71 71
72 acpi_tb_fix_string(out_header->signature, ACPI_NAME_SIZE); 72 acpi_tb_fix_string(out_header->signature, ACPI_NAMESEG_SIZE);
73 acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE); 73 acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE);
74 acpi_tb_fix_string(out_header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE); 74 acpi_tb_fix_string(out_header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
75 acpi_tb_fix_string(out_header->asl_compiler_id, ACPI_NAME_SIZE); 75 acpi_tb_fix_string(out_header->asl_compiler_id, ACPI_NAMESEG_SIZE);
76} 76}
77 77
78/******************************************************************************* 78/*******************************************************************************
@@ -94,7 +94,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
94{ 94{
95 struct acpi_table_header local_header; 95 struct acpi_table_header local_header;
96 96
97 if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) { 97 if (ACPI_COMPARE_NAMESEG(header->signature, ACPI_SIG_FACS)) {
98 98
99 /* FACS only has signature and length fields */ 99 /* FACS only has signature and length fields */
100 100
@@ -158,8 +158,8 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
158 * They are the odd tables, have no standard ACPI header and no checksum 158 * They are the odd tables, have no standard ACPI header and no checksum
159 */ 159 */
160 160
161 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_S3PT) || 161 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_S3PT) ||
162 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_FACS)) { 162 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_FACS)) {
163 return (AE_OK); 163 return (AE_OK);
164 } 164 }
165 165
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 2469e01310e2..c5f0b8ec70cc 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -332,9 +332,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
332 &table_index); 332 &table_index);
333 333
334 if (ACPI_SUCCESS(status) && 334 if (ACPI_SUCCESS(status) &&
335 ACPI_COMPARE_NAME(&acpi_gbl_root_table_list. 335 ACPI_COMPARE_NAMESEG(&acpi_gbl_root_table_list.
336 tables[table_index].signature, 336 tables[table_index].signature,
337 ACPI_SIG_FADT)) { 337 ACPI_SIG_FADT)) {
338 acpi_gbl_fadt_index = table_index; 338 acpi_gbl_fadt_index = table_index;
339 acpi_tb_parse_fadt(); 339 acpi_tb_parse_fadt();
340 } 340 }
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 36592888f0e7..1640685bf4ae 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -230,7 +230,7 @@ acpi_get_table_header(char *signature,
230 230
231 for (i = 0, j = 0; i < acpi_gbl_root_table_list.current_table_count; 231 for (i = 0, j = 0; i < acpi_gbl_root_table_list.current_table_count;
232 i++) { 232 i++) {
233 if (!ACPI_COMPARE_NAME 233 if (!ACPI_COMPARE_NAMESEG
234 (&(acpi_gbl_root_table_list.tables[i].signature), 234 (&(acpi_gbl_root_table_list.tables[i].signature),
235 signature)) { 235 signature)) {
236 continue; 236 continue;
@@ -323,7 +323,7 @@ acpi_get_table(char *signature,
323 i++) { 323 i++) {
324 table_desc = &acpi_gbl_root_table_list.tables[i]; 324 table_desc = &acpi_gbl_root_table_list.tables[i];
325 325
326 if (!ACPI_COMPARE_NAME(&table_desc->signature, signature)) { 326 if (!ACPI_COMPARE_NAMESEG(&table_desc->signature, signature)) {
327 continue; 327 continue;
328 } 328 }
329 329
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 1a2592cc3245..4f30f06a6f78 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -118,7 +118,7 @@ acpi_status acpi_tb_load_namespace(void)
118 table = &acpi_gbl_root_table_list.tables[acpi_gbl_dsdt_index]; 118 table = &acpi_gbl_root_table_list.tables[acpi_gbl_dsdt_index];
119 119
120 if (!acpi_gbl_root_table_list.current_table_count || 120 if (!acpi_gbl_root_table_list.current_table_count ||
121 !ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_DSDT) || 121 !ACPI_COMPARE_NAMESEG(table->signature.ascii, ACPI_SIG_DSDT) ||
122 ACPI_FAILURE(acpi_tb_validate_table(table))) { 122 ACPI_FAILURE(acpi_tb_validate_table(table))) {
123 status = AE_NO_ACPI_TABLES; 123 status = AE_NO_ACPI_TABLES;
124 goto unlock_and_exit; 124 goto unlock_and_exit;
@@ -170,11 +170,12 @@ acpi_status acpi_tb_load_namespace(void)
170 table = &acpi_gbl_root_table_list.tables[i]; 170 table = &acpi_gbl_root_table_list.tables[i];
171 171
172 if (!table->address || 172 if (!table->address ||
173 (!ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_SSDT) 173 (!ACPI_COMPARE_NAMESEG
174 && !ACPI_COMPARE_NAME(table->signature.ascii, 174 (table->signature.ascii, ACPI_SIG_SSDT)
175 ACPI_SIG_PSDT) 175 && !ACPI_COMPARE_NAMESEG(table->signature.ascii,
176 && !ACPI_COMPARE_NAME(table->signature.ascii, 176 ACPI_SIG_PSDT)
177 ACPI_SIG_OSDT)) 177 && !ACPI_COMPARE_NAMESEG(table->signature.ascii,
178 ACPI_SIG_OSDT))
178 || ACPI_FAILURE(acpi_tb_validate_table(table))) { 179 || ACPI_FAILURE(acpi_tb_validate_table(table))) {
179 continue; 180 continue;
180 } 181 }
@@ -364,7 +365,7 @@ acpi_status acpi_unload_parent_table(acpi_handle object)
364 * only these types can contain AML and thus are the only types 365 * only these types can contain AML and thus are the only types
365 * that can create namespace objects. 366 * that can create namespace objects.
366 */ 367 */
367 if (ACPI_COMPARE_NAME 368 if (ACPI_COMPARE_NAMESEG
368 (acpi_gbl_root_table_list.tables[i].signature.ascii, 369 (acpi_gbl_root_table_list.tables[i].signature.ascii,
369 ACPI_SIG_DSDT)) { 370 ACPI_SIG_DSDT)) {
370 status = AE_TYPE; 371 status = AE_TYPE;
diff --git a/drivers/acpi/acpica/utascii.c b/drivers/acpi/acpica/utascii.c
index 79d7426fd7bf..f6cd7d4f698b 100644
--- a/drivers/acpi/acpica/utascii.c
+++ b/drivers/acpi/acpica/utascii.c
@@ -30,7 +30,7 @@ u8 acpi_ut_valid_nameseg(char *name)
30 30
31 /* Validate each character in the signature */ 31 /* Validate each character in the signature */
32 32
33 for (i = 0; i < ACPI_NAME_SIZE; i++) { 33 for (i = 0; i < ACPI_NAMESEG_SIZE; i++) {
34 if (!acpi_ut_valid_name_char(name[i], i)) { 34 if (!acpi_ut_valid_name_char(name[i], i)) {
35 return (FALSE); 35 return (FALSE);
36 } 36 }
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index ad9f77eb554f..65beaa237669 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -78,7 +78,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {
78 "IPMI", /* 0x07 */ 78 "IPMI", /* 0x07 */
79 "GeneralPurposeIo", /* 0x08 */ 79 "GeneralPurposeIo", /* 0x08 */
80 "GenericSerialBus", /* 0x09 */ 80 "GenericSerialBus", /* 0x09 */
81 "PCC" /* 0x0A */ 81 "PlatformCommChannel" /* 0x0A */
82}; 82};
83 83
84const char *acpi_ut_get_region_name(u8 space_id) 84const char *acpi_ut_get_region_name(u8 space_id)
@@ -239,7 +239,7 @@ const char *acpi_ut_get_node_name(void *object)
239{ 239{
240 struct acpi_namespace_node *node = (struct acpi_namespace_node *)object; 240 struct acpi_namespace_node *node = (struct acpi_namespace_node *)object;
241 241
242 /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ 242 /* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */
243 243
244 if (!object) { 244 if (!object) {
245 return ("NULL"); 245 return ("NULL");
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index afaadc73196b..8638efacdbf4 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -59,10 +59,10 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
59 59
60 /* These are the only tables that contain executable AML */ 60 /* These are the only tables that contain executable AML */
61 61
62 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) || 62 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_DSDT) ||
63 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) || 63 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_PSDT) ||
64 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) || 64 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_SSDT) ||
65 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT) || 65 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_OSDT) ||
66 ACPI_IS_OEM_SIG(table->signature)) { 66 ACPI_IS_OEM_SIG(table->signature)) {
67 return (TRUE); 67 return (TRUE);
68 } 68 }
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index a9f08f43c685..1b0f68f5ed8c 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -84,7 +84,7 @@ const union acpi_predefined_info *acpi_ut_match_predefined_method(char *name)
84 84
85 this_name = acpi_gbl_predefined_methods; 85 this_name = acpi_gbl_predefined_methods;
86 while (this_name->info.name[0]) { 86 while (this_name->info.name[0]) {
87 if (ACPI_COMPARE_NAME(name, this_name->info.name)) { 87 if (ACPI_COMPARE_NAMESEG(name, this_name->info.name)) {
88 return (this_name); 88 return (this_name);
89 } 89 }
90 90
@@ -201,7 +201,7 @@ const union acpi_predefined_info *acpi_ut_match_resource_name(char *name)
201 201
202 this_name = acpi_gbl_resource_names; 202 this_name = acpi_gbl_resource_names;
203 while (this_name->info.name[0]) { 203 while (this_name->info.name[0]) {
204 if (ACPI_COMPARE_NAME(name, this_name->info.name)) { 204 if (ACPI_COMPARE_NAMESEG(name, this_name->info.name)) {
205 return (this_name); 205 return (this_name);
206 } 206 }
207 207
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 5bef0b059406..c39b5483045d 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -141,15 +141,15 @@ void acpi_ut_repair_name(char *name)
141 * Special case for the root node. This can happen if we get an 141 * Special case for the root node. This can happen if we get an
142 * error during the execution of module-level code. 142 * error during the execution of module-level code.
143 */ 143 */
144 if (ACPI_COMPARE_NAME(name, ACPI_ROOT_PATHNAME)) { 144 if (ACPI_COMPARE_NAMESEG(name, ACPI_ROOT_PATHNAME)) {
145 return; 145 return;
146 } 146 }
147 147
148 ACPI_MOVE_NAME(&original_name, name); 148 ACPI_COPY_NAMESEG(&original_name, name);
149 149
150 /* Check each character in the name */ 150 /* Check each character in the name */
151 151
152 for (i = 0; i < ACPI_NAME_SIZE; i++) { 152 for (i = 0; i < ACPI_NAMESEG_SIZE; i++) {
153 if (acpi_ut_valid_name_char(name[i], i)) { 153 if (acpi_ut_valid_name_char(name[i], i)) {
154 continue; 154 continue;
155 } 155 }
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 446c959a8f08..3fb331fb6e82 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2260,7 +2260,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
2260 2260
2261 mutex_lock(&acpi_probe_mutex); 2261 mutex_lock(&acpi_probe_mutex);
2262 for (ape = ap_head; nr; ape++, nr--) { 2262 for (ape = ap_head; nr; ape++, nr--) {
2263 if (ACPI_COMPARE_NAME(ACPI_SIG_MADT, ape->id)) { 2263 if (ACPI_COMPARE_NAMESEG(ACPI_SIG_MADT, ape->id)) {
2264 acpi_probe_count = 0; 2264 acpi_probe_count = 0;
2265 acpi_table_parse_madt(ape->type, acpi_match_madt, 0); 2265 acpi_table_parse_madt(ape->type, acpi_match_madt, 0);
2266 count += acpi_probe_count; 2266 count += acpi_probe_count;
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index fa76f5e41b5c..75948a3f1a20 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -327,9 +327,9 @@ static struct kobject *hotplug_kobj;
327 327
328struct acpi_table_attr { 328struct acpi_table_attr {
329 struct bin_attribute attr; 329 struct bin_attribute attr;
330 char name[ACPI_NAME_SIZE]; 330 char name[ACPI_NAMESEG_SIZE];
331 int instance; 331 int instance;
332 char filename[ACPI_NAME_SIZE+ACPI_INST_SIZE]; 332 char filename[ACPI_NAMESEG_SIZE+ACPI_INST_SIZE];
333 struct list_head node; 333 struct list_head node;
334}; 334};
335 335
@@ -368,10 +368,10 @@ static int acpi_table_attr_init(struct kobject *tables_obj,
368 char instance_str[ACPI_INST_SIZE]; 368 char instance_str[ACPI_INST_SIZE];
369 369
370 sysfs_attr_init(&table_attr->attr.attr); 370 sysfs_attr_init(&table_attr->attr.attr);
371 ACPI_MOVE_NAME(table_attr->name, table_header->signature); 371 ACPI_COPY_NAMESEG(table_attr->name, table_header->signature);
372 372
373 list_for_each_entry(attr, &acpi_table_attr_list, node) { 373 list_for_each_entry(attr, &acpi_table_attr_list, node) {
374 if (ACPI_COMPARE_NAME(table_attr->name, attr->name)) 374 if (ACPI_COMPARE_NAMESEG(table_attr->name, attr->name))
375 if (table_attr->instance < attr->instance) 375 if (table_attr->instance < attr->instance)
376 table_attr->instance = attr->instance; 376 table_attr->instance = attr->instance;
377 } 377 }
@@ -382,8 +382,8 @@ static int acpi_table_attr_init(struct kobject *tables_obj,
382 return -ERANGE; 382 return -ERANGE;
383 } 383 }
384 384
385 ACPI_MOVE_NAME(table_attr->filename, table_header->signature); 385 ACPI_COPY_NAMESEG(table_attr->filename, table_header->signature);
386 table_attr->filename[ACPI_NAME_SIZE] = '\0'; 386 table_attr->filename[ACPI_NAMESEG_SIZE] = '\0';
387 if (table_attr->instance > 1 || (table_attr->instance == 1 && 387 if (table_attr->instance > 1 || (table_attr->instance == 1 &&
388 !acpi_get_table 388 !acpi_get_table
389 (table_header->signature, 2, &header))) { 389 (table_header->signature, 2, &header))) {
@@ -484,7 +484,7 @@ static int acpi_table_data_init(struct acpi_table_header *th)
484 int i; 484 int i;
485 485
486 for (i = 0; i < NUM_ACPI_DATA_OBJS; i++) { 486 for (i = 0; i < NUM_ACPI_DATA_OBJS; i++) {
487 if (ACPI_COMPARE_NAME(th->signature, acpi_data_objs[i].name)) { 487 if (ACPI_COMPARE_NAMESEG(th->signature, acpi_data_objs[i].name)) {
488 data_attr = kzalloc(sizeof(*data_attr), GFP_KERNEL); 488 data_attr = kzalloc(sizeof(*data_attr), GFP_KERNEL);
489 if (!data_attr) 489 if (!data_attr)
490 return -ENOMEM; 490 return -ENOMEM;
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 8fccbe49612a..1ffd7b9eefc5 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -670,8 +670,8 @@ static void __init acpi_table_initrd_scan(void)
670 table_length = table->length; 670 table_length = table->length;
671 671
672 /* Skip RSDT/XSDT which should only be used for override */ 672 /* Skip RSDT/XSDT which should only be used for override */
673 if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_RSDT) || 673 if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_RSDT) ||
674 ACPI_COMPARE_NAME(table->signature, ACPI_SIG_XSDT)) { 674 ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_XSDT)) {
675 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE); 675 acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
676 goto next_table; 676 goto next_table;
677 } 677 }
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index c51462f5aa1e..a5dc0629f225 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -425,7 +425,7 @@ static ssize_t ibft_attr_show_acpitbl(void *data, int type, char *buf)
425 425
426 switch (type) { 426 switch (type) {
427 case ISCSI_BOOT_ACPITBL_SIGNATURE: 427 case ISCSI_BOOT_ACPITBL_SIGNATURE:
428 str += sprintf_string(str, ACPI_NAME_SIZE, 428 str += sprintf_string(str, ACPI_NAMESEG_SIZE,
429 entry->header->header.signature); 429 entry->header->header.signature);
430 break; 430 break;
431 case ISCSI_BOOT_ACPITBL_OEM_ID: 431 case ISCSI_BOOT_ACPITBL_OEM_ID:
diff --git a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c
index 45e7e5cbdffb..7c71ffb733a1 100644
--- a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c
+++ b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c
@@ -230,7 +230,7 @@ static void get_single_name(acpi_handle handle, char *name)
230 if (ACPI_FAILURE(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer))) 230 if (ACPI_FAILURE(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)))
231 pr_warn("Failed to get device name from acpi handle\n"); 231 pr_warn("Failed to get device name from acpi handle\n");
232 else { 232 else {
233 memcpy(name, buffer.pointer, ACPI_NAME_SIZE); 233 memcpy(name, buffer.pointer, ACPI_NAMESEG_SIZE);
234 kfree(buffer.pointer); 234 kfree(buffer.pointer);
235 } 235 }
236} 236}
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 24dbb4e742a6..3b1b1d0e4c33 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -12,7 +12,7 @@
12 12
13/* Current ACPICA subsystem version in YYYYMMDD format */ 13/* Current ACPICA subsystem version in YYYYMMDD format */
14 14
15#define ACPI_CA_VERSION 0x20190215 15#define ACPI_CA_VERSION 0x20190405
16 16
17#include <acpi/acconfig.h> 17#include <acpi/acconfig.h>
18#include <acpi/actypes.h> 18#include <acpi/actypes.h>
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 65cc9cbf1141..d568128025df 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -66,14 +66,14 @@
66 ******************************************************************************/ 66 ******************************************************************************/
67 67
68struct acpi_table_header { 68struct acpi_table_header {
69 char signature[ACPI_NAME_SIZE]; /* ASCII table signature */ 69 char signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */
70 u32 length; /* Length of table in bytes, including this header */ 70 u32 length; /* Length of table in bytes, including this header */
71 u8 revision; /* ACPI Specification minor version number */ 71 u8 revision; /* ACPI Specification minor version number */
72 u8 checksum; /* To make sum of entire table == 0 */ 72 u8 checksum; /* To make sum of entire table == 0 */
73 char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ 73 char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
74 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ 74 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
75 u32 oem_revision; /* OEM revision number */ 75 u32 oem_revision; /* OEM revision number */
76 char asl_compiler_id[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ 76 char asl_compiler_id[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */
77 u32 asl_compiler_revision; /* ASL compiler version */ 77 u32 asl_compiler_revision; /* ASL compiler version */
78}; 78};
79 79
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index f73382e82c26..ad6892a24015 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -375,7 +375,7 @@ typedef u64 acpi_physical_address;
375 375
376/* Names within the namespace are 4 bytes long */ 376/* Names within the namespace are 4 bytes long */
377 377
378#define ACPI_NAME_SIZE 4 378#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */
379#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ 379#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
380#define ACPI_PATH_SEPARATOR '.' 380#define ACPI_PATH_SEPARATOR '.'
381 381
@@ -515,11 +515,11 @@ typedef u64 acpi_integer;
515/* Optimizations for 4-character (32-bit) acpi_name manipulation */ 515/* Optimizations for 4-character (32-bit) acpi_name manipulation */
516 516
517#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 517#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
518#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) 518#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b)))
519#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (u32, (dest)) = *ACPI_CAST_PTR (u32, (src))) 519#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (u32, (dest)) = *ACPI_CAST_PTR (u32, (src)))
520#else 520#else
521#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) 521#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE))
522#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) 522#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE))
523#endif 523#endif
524 524
525/* Support for the special RSDP signature (8 characters) */ 525/* Support for the special RSDP signature (8 characters) */
@@ -529,7 +529,7 @@ typedef u64 acpi_integer;
529 529
530/* Support for OEMx signature (x can be any character) */ 530/* Support for OEMx signature (x can be any character) */
531#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ 531#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\
532 strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE) 532 strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
533 533
534/* 534/*
535 * Algorithm to obtain access bit width. 535 * Algorithm to obtain access bit width.
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index 2a1fd9182f94..d1f3d44e315e 100644
--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
@@ -19,7 +19,7 @@ ACPI_MODULE_NAME("oslinuxtbl")
19typedef struct osl_table_info { 19typedef struct osl_table_info {
20 struct osl_table_info *next; 20 struct osl_table_info *next;
21 u32 instance; 21 u32 instance;
22 char signature[ACPI_NAME_SIZE]; 22 char signature[ACPI_NAMESEG_SIZE];
23 23
24} osl_table_info; 24} osl_table_info;
25 25
@@ -286,14 +286,14 @@ static acpi_status osl_add_table_to_list(char *signature, u32 instance)
286 return (AE_NO_MEMORY); 286 return (AE_NO_MEMORY);
287 } 287 }
288 288
289 ACPI_MOVE_NAME(new_info->signature, signature); 289 ACPI_COPY_NAMESEG(new_info->signature, signature);
290 290
291 if (!gbl_table_list_head) { 291 if (!gbl_table_list_head) {
292 gbl_table_list_head = new_info; 292 gbl_table_list_head = new_info;
293 } else { 293 } else {
294 next = gbl_table_list_head; 294 next = gbl_table_list_head;
295 while (1) { 295 while (1) {
296 if (ACPI_COMPARE_NAME(next->signature, signature)) { 296 if (ACPI_COMPARE_NAMESEG(next->signature, signature)) {
297 if (next->instance == instance) { 297 if (next->instance == instance) {
298 found = TRUE; 298 found = TRUE;
299 } 299 }
@@ -782,11 +782,11 @@ osl_get_bios_table(char *signature,
782 782
783 /* Handle special tables whose addresses are not in RSDT/XSDT */ 783 /* Handle special tables whose addresses are not in RSDT/XSDT */
784 784
785 if (ACPI_COMPARE_NAME(signature, ACPI_RSDP_NAME) || 785 if (ACPI_COMPARE_NAMESEG(signature, ACPI_RSDP_NAME) ||
786 ACPI_COMPARE_NAME(signature, ACPI_SIG_RSDT) || 786 ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_RSDT) ||
787 ACPI_COMPARE_NAME(signature, ACPI_SIG_XSDT) || 787 ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_XSDT) ||
788 ACPI_COMPARE_NAME(signature, ACPI_SIG_DSDT) || 788 ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_DSDT) ||
789 ACPI_COMPARE_NAME(signature, ACPI_SIG_FACS)) { 789 ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_FACS)) {
790 790
791find_next_instance: 791find_next_instance:
792 792
@@ -797,7 +797,7 @@ find_next_instance:
797 * careful about the FADT length and validate table addresses. 797 * careful about the FADT length and validate table addresses.
798 * Note: The 64-bit addresses have priority. 798 * Note: The 64-bit addresses have priority.
799 */ 799 */
800 if (ACPI_COMPARE_NAME(signature, ACPI_SIG_DSDT)) { 800 if (ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_DSDT)) {
801 if (current_instance < 2) { 801 if (current_instance < 2) {
802 if ((gbl_fadt->header.length >= 802 if ((gbl_fadt->header.length >=
803 MIN_FADT_FOR_XDSDT) && gbl_fadt->Xdsdt 803 MIN_FADT_FOR_XDSDT) && gbl_fadt->Xdsdt
@@ -815,7 +815,7 @@ find_next_instance:
815 dsdt; 815 dsdt;
816 } 816 }
817 } 817 }
818 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_FACS)) { 818 } else if (ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_FACS)) {
819 if (current_instance < 2) { 819 if (current_instance < 2) {
820 if ((gbl_fadt->header.length >= 820 if ((gbl_fadt->header.length >=
821 MIN_FADT_FOR_XFACS) && gbl_fadt->Xfacs 821 MIN_FADT_FOR_XFACS) && gbl_fadt->Xfacs
@@ -833,7 +833,7 @@ find_next_instance:
833 facs; 833 facs;
834 } 834 }
835 } 835 }
836 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_XSDT)) { 836 } else if (ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_XSDT)) {
837 if (!gbl_revision) { 837 if (!gbl_revision) {
838 return (AE_BAD_SIGNATURE); 838 return (AE_BAD_SIGNATURE);
839 } 839 }
@@ -842,7 +842,7 @@ find_next_instance:
842 (acpi_physical_address)gbl_rsdp. 842 (acpi_physical_address)gbl_rsdp.
843 xsdt_physical_address; 843 xsdt_physical_address;
844 } 844 }
845 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_RSDT)) { 845 } else if (ACPI_COMPARE_NAMESEG(signature, ACPI_SIG_RSDT)) {
846 if (current_instance == 0) { 846 if (current_instance == 0) {
847 table_address = 847 table_address =
848 (acpi_physical_address)gbl_rsdp. 848 (acpi_physical_address)gbl_rsdp.
@@ -931,7 +931,7 @@ find_next_instance:
931 931
932 /* Does this table match the requested signature? */ 932 /* Does this table match the requested signature? */
933 933
934 if (!ACPI_COMPARE_NAME 934 if (!ACPI_COMPARE_NAMESEG
935 (mapped_table->signature, signature)) { 935 (mapped_table->signature, signature)) {
936 osl_unmap_table(mapped_table); 936 osl_unmap_table(mapped_table);
937 mapped_table = NULL; 937 mapped_table = NULL;
@@ -995,7 +995,7 @@ static acpi_status osl_list_customized_tables(char *directory)
995{ 995{
996 void *table_dir; 996 void *table_dir;
997 u32 instance; 997 u32 instance;
998 char temp_name[ACPI_NAME_SIZE]; 998 char temp_name[ACPI_NAMESEG_SIZE];
999 char *filename; 999 char *filename;
1000 acpi_status status = AE_OK; 1000 acpi_status status = AE_OK;
1001 1001
@@ -1086,8 +1086,8 @@ osl_map_table(acpi_size address,
1086 return (AE_BAD_SIGNATURE); 1086 return (AE_BAD_SIGNATURE);
1087 } 1087 }
1088 } else 1088 } else
1089 if (!ACPI_COMPARE_NAME(signature, mapped_table->signature)) 1089 if (!ACPI_COMPARE_NAMESEG
1090 { 1090 (signature, mapped_table->signature)) {
1091 acpi_os_unmap_memory(mapped_table, 1091 acpi_os_unmap_memory(mapped_table,
1092 sizeof(struct acpi_table_header)); 1092 sizeof(struct acpi_table_header));
1093 return (AE_BAD_SIGNATURE); 1093 return (AE_BAD_SIGNATURE);
@@ -1158,15 +1158,15 @@ osl_table_name_from_file(char *filename, char *signature, u32 *instance)
1158 1158
1159 /* Ignore meaningless files */ 1159 /* Ignore meaningless files */
1160 1160
1161 if (strlen(filename) < ACPI_NAME_SIZE) { 1161 if (strlen(filename) < ACPI_NAMESEG_SIZE) {
1162 return (AE_BAD_SIGNATURE); 1162 return (AE_BAD_SIGNATURE);
1163 } 1163 }
1164 1164
1165 /* Extract instance number */ 1165 /* Extract instance number */
1166 1166
1167 if (isdigit((int)filename[ACPI_NAME_SIZE])) { 1167 if (isdigit((int)filename[ACPI_NAMESEG_SIZE])) {
1168 sscanf(&filename[ACPI_NAME_SIZE], "%u", instance); 1168 sscanf(&filename[ACPI_NAMESEG_SIZE], "%u", instance);
1169 } else if (strlen(filename) != ACPI_NAME_SIZE) { 1169 } else if (strlen(filename) != ACPI_NAMESEG_SIZE) {
1170 return (AE_BAD_SIGNATURE); 1170 return (AE_BAD_SIGNATURE);
1171 } else { 1171 } else {
1172 *instance = 0; 1172 *instance = 0;
@@ -1174,7 +1174,7 @@ osl_table_name_from_file(char *filename, char *signature, u32 *instance)
1174 1174
1175 /* Extract signature */ 1175 /* Extract signature */
1176 1176
1177 ACPI_MOVE_NAME(signature, filename); 1177 ACPI_COPY_NAMESEG(signature, filename);
1178 return (AE_OK); 1178 return (AE_OK);
1179} 1179}
1180 1180
@@ -1236,7 +1236,7 @@ osl_read_table_from_file(char *filename,
1236 status = AE_BAD_SIGNATURE; 1236 status = AE_BAD_SIGNATURE;
1237 goto exit; 1237 goto exit;
1238 } 1238 }
1239 } else if (!ACPI_COMPARE_NAME(signature, header.signature)) { 1239 } else if (!ACPI_COMPARE_NAMESEG(signature, header.signature)) {
1240 fprintf(stderr, 1240 fprintf(stderr,
1241 "Incorrect signature: Expecting %4.4s, found %4.4s\n", 1241 "Incorrect signature: Expecting %4.4s, found %4.4s\n",
1242 signature, header.signature); 1242 signature, header.signature);
@@ -1311,7 +1311,7 @@ osl_get_customized_table(char *pathname,
1311{ 1311{
1312 void *table_dir; 1312 void *table_dir;
1313 u32 current_instance = 0; 1313 u32 current_instance = 0;
1314 char temp_name[ACPI_NAME_SIZE]; 1314 char temp_name[ACPI_NAMESEG_SIZE];
1315 char table_filename[PATH_MAX]; 1315 char table_filename[PATH_MAX];
1316 char *filename; 1316 char *filename;
1317 acpi_status status; 1317 acpi_status status;
@@ -1329,7 +1329,7 @@ osl_get_customized_table(char *pathname,
1329 1329
1330 /* Ignore meaningless files */ 1330 /* Ignore meaningless files */
1331 1331
1332 if (!ACPI_COMPARE_NAME(filename, signature)) { 1332 if (!ACPI_COMPARE_NAMESEG(filename, signature)) {
1333 continue; 1333 continue;
1334 } 1334 }
1335 1335
diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c
index e256c2ac5ddc..820baeb5092b 100644
--- a/tools/power/acpi/tools/acpidump/apdump.c
+++ b/tools/power/acpi/tools/acpidump/apdump.c
@@ -289,14 +289,14 @@ int ap_dump_table_by_address(char *ascii_address)
289 289
290int ap_dump_table_by_name(char *signature) 290int ap_dump_table_by_name(char *signature)
291{ 291{
292 char local_signature[ACPI_NAME_SIZE + 1]; 292 char local_signature[ACPI_NAMESEG_SIZE + 1];
293 u32 instance; 293 u32 instance;
294 struct acpi_table_header *table; 294 struct acpi_table_header *table;
295 acpi_physical_address address; 295 acpi_physical_address address;
296 acpi_status status; 296 acpi_status status;
297 int table_status; 297 int table_status;
298 298
299 if (strlen(signature) != ACPI_NAME_SIZE) { 299 if (strlen(signature) != ACPI_NAMESEG_SIZE) {
300 fprintf(stderr, 300 fprintf(stderr,
301 "Invalid table signature [%s]: must be exactly 4 characters\n", 301 "Invalid table signature [%s]: must be exactly 4 characters\n",
302 signature); 302 signature);
@@ -310,9 +310,9 @@ int ap_dump_table_by_name(char *signature)
310 310
311 /* To be friendly, handle tables whose signatures do not match the name */ 311 /* To be friendly, handle tables whose signatures do not match the name */
312 312
313 if (ACPI_COMPARE_NAME(local_signature, "FADT")) { 313 if (ACPI_COMPARE_NAMESEG(local_signature, "FADT")) {
314 strcpy(local_signature, ACPI_SIG_FADT); 314 strcpy(local_signature, ACPI_SIG_FADT);
315 } else if (ACPI_COMPARE_NAME(local_signature, "MADT")) { 315 } else if (ACPI_COMPARE_NAMESEG(local_signature, "MADT")) {
316 strcpy(local_signature, ACPI_SIG_MADT); 316 strcpy(local_signature, ACPI_SIG_MADT);
317 } 317 }
318 318
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index 49972bc78bc5..a42cfcaa3293 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -97,7 +97,7 @@ int ap_open_output_file(char *pathname)
97 97
98int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance) 98int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
99{ 99{
100 char filename[ACPI_NAME_SIZE + 16]; 100 char filename[ACPI_NAMESEG_SIZE + 16];
101 char instance_str[16]; 101 char instance_str[16];
102 ACPI_FILE file; 102 ACPI_FILE file;
103 acpi_size actual; 103 acpi_size actual;
@@ -110,16 +110,16 @@ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
110 /* Construct lower-case filename from the table local signature */ 110 /* Construct lower-case filename from the table local signature */
111 111
112 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { 112 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) {
113 ACPI_MOVE_NAME(filename, ACPI_RSDP_NAME); 113 ACPI_COPY_NAMESEG(filename, ACPI_RSDP_NAME);
114 } else { 114 } else {
115 ACPI_MOVE_NAME(filename, table->signature); 115 ACPI_COPY_NAMESEG(filename, table->signature);
116 } 116 }
117 117
118 filename[0] = (char)tolower((int)filename[0]); 118 filename[0] = (char)tolower((int)filename[0]);
119 filename[1] = (char)tolower((int)filename[1]); 119 filename[1] = (char)tolower((int)filename[1]);
120 filename[2] = (char)tolower((int)filename[2]); 120 filename[2] = (char)tolower((int)filename[2]);
121 filename[3] = (char)tolower((int)filename[3]); 121 filename[3] = (char)tolower((int)filename[3]);
122 filename[ACPI_NAME_SIZE] = 0; 122 filename[ACPI_NAMESEG_SIZE] = 0;
123 123
124 /* Handle multiple SSDts - create different filenames for each */ 124 /* Handle multiple SSDts - create different filenames for each */
125 125