aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r--drivers/acpi/tables/tbconvrt.c6
-rw-r--r--drivers/acpi/tables/tbget.c16
-rw-r--r--drivers/acpi/tables/tbgetall.c10
-rw-r--r--drivers/acpi/tables/tbinstal.c41
-rw-r--r--drivers/acpi/tables/tbrsdt.c25
-rw-r--r--drivers/acpi/tables/tbutils.c10
-rw-r--r--drivers/acpi/tables/tbxface.c24
-rw-r--r--drivers/acpi/tables/tbxfroot.c24
8 files changed, 76 insertions, 80 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
index a913a927d321..d697fcb35d52 100644
--- a/drivers/acpi/tables/tbconvrt.c
+++ b/drivers/acpi/tables/tbconvrt.c
@@ -492,7 +492,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
492 struct fadt_descriptor *local_fadt; 492 struct fadt_descriptor *local_fadt;
493 struct acpi_table_desc *table_desc; 493 struct acpi_table_desc *table_desc;
494 494
495 ACPI_FUNCTION_TRACE("tb_convert_table_fadt"); 495 ACPI_FUNCTION_TRACE(tb_convert_table_fadt);
496 496
497 /* 497 /*
498 * acpi_gbl_FADT is valid. Validate the FADT length. The table must be 498 * acpi_gbl_FADT is valid. Validate the FADT length. The table must be
@@ -541,7 +541,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
541 541
542 /* Free the original table */ 542 /* Free the original table */
543 543
544 table_desc = acpi_gbl_table_lists[ACPI_TABLE_FADT].next; 544 table_desc = acpi_gbl_table_lists[ACPI_TABLE_ID_FADT].next;
545 acpi_tb_delete_single_table(table_desc); 545 acpi_tb_delete_single_table(table_desc);
546 546
547 /* Install the new table */ 547 /* Install the new table */
@@ -579,7 +579,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
579acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info) 579acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info)
580{ 580{
581 581
582 ACPI_FUNCTION_TRACE("tb_build_common_facs"); 582 ACPI_FUNCTION_TRACE(tb_build_common_facs);
583 583
584 /* Absolute minimum length is 24, but the ACPI spec says 64 */ 584 /* Absolute minimum length is 24, but the ACPI spec says 64 */
585 585
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c
index b7bd20b9a75e..3a4f46ca3884 100644
--- a/drivers/acpi/tables/tbget.c
+++ b/drivers/acpi/tables/tbget.c
@@ -78,7 +78,7 @@ acpi_tb_get_table(struct acpi_pointer *address,
78 acpi_status status; 78 acpi_status status;
79 struct acpi_table_header header; 79 struct acpi_table_header header;
80 80
81 ACPI_FUNCTION_TRACE("tb_get_table"); 81 ACPI_FUNCTION_TRACE(tb_get_table);
82 82
83 /* Get the header in order to get signature and table size */ 83 /* Get the header in order to get signature and table size */
84 84
@@ -124,7 +124,7 @@ acpi_tb_get_table_header(struct acpi_pointer *address,
124 acpi_status status = AE_OK; 124 acpi_status status = AE_OK;
125 struct acpi_table_header *header = NULL; 125 struct acpi_table_header *header = NULL;
126 126
127 ACPI_FUNCTION_TRACE("tb_get_table_header"); 127 ACPI_FUNCTION_TRACE(tb_get_table_header);
128 128
129 /* 129 /*
130 * Flags contains the current processor mode (Virtual or Physical 130 * Flags contains the current processor mode (Virtual or Physical
@@ -202,7 +202,7 @@ acpi_tb_get_table_body(struct acpi_pointer *address,
202{ 202{
203 acpi_status status; 203 acpi_status status;
204 204
205 ACPI_FUNCTION_TRACE("tb_get_table_body"); 205 ACPI_FUNCTION_TRACE(tb_get_table_body);
206 206
207 if (!table_info || !address) { 207 if (!table_info || !address) {
208 return_ACPI_STATUS(AE_BAD_PARAMETER); 208 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -246,7 +246,7 @@ acpi_tb_table_override(struct acpi_table_header *header,
246 acpi_status status; 246 acpi_status status;
247 struct acpi_pointer address; 247 struct acpi_pointer address;
248 248
249 ACPI_FUNCTION_TRACE("tb_table_override"); 249 ACPI_FUNCTION_TRACE(tb_table_override);
250 250
251 /* 251 /*
252 * The OSL will examine the header and decide whether to override this 252 * The OSL will examine the header and decide whether to override this
@@ -318,7 +318,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
318 u8 allocation; 318 u8 allocation;
319 acpi_status status = AE_OK; 319 acpi_status status = AE_OK;
320 320
321 ACPI_FUNCTION_TRACE("tb_get_this_table"); 321 ACPI_FUNCTION_TRACE(tb_get_this_table);
322 322
323 /* 323 /*
324 * Flags contains the current processor mode (Virtual or Physical 324 * Flags contains the current processor mode (Virtual or Physical
@@ -383,7 +383,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
383 * Validate checksum for _most_ tables, 383 * Validate checksum for _most_ tables,
384 * even the ones whose signature we don't recognize 384 * even the ones whose signature we don't recognize
385 */ 385 */
386 if (table_info->type != ACPI_TABLE_FACS) { 386 if (table_info->type != ACPI_TABLE_ID_FACS) {
387 status = acpi_tb_verify_table_checksum(full_table); 387 status = acpi_tb_verify_table_checksum(full_table);
388 388
389#if (!ACPI_CHECKSUM_ABORT) 389#if (!ACPI_CHECKSUM_ABORT)
@@ -433,13 +433,13 @@ acpi_tb_get_table_ptr(acpi_table_type table_type,
433 struct acpi_table_desc *table_desc; 433 struct acpi_table_desc *table_desc;
434 u32 i; 434 u32 i;
435 435
436 ACPI_FUNCTION_TRACE("tb_get_table_ptr"); 436 ACPI_FUNCTION_TRACE(tb_get_table_ptr);
437 437
438 if (!acpi_gbl_DSDT) { 438 if (!acpi_gbl_DSDT) {
439 return_ACPI_STATUS(AE_NO_ACPI_TABLES); 439 return_ACPI_STATUS(AE_NO_ACPI_TABLES);
440 } 440 }
441 441
442 if (table_type > ACPI_TABLE_MAX) { 442 if (table_type > ACPI_TABLE_ID_MAX) {
443 return_ACPI_STATUS(AE_BAD_PARAMETER); 443 return_ACPI_STATUS(AE_BAD_PARAMETER);
444 } 444 }
445 445
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
index b4ec61d7cf06..ad982112e4c6 100644
--- a/drivers/acpi/tables/tbgetall.c
+++ b/drivers/acpi/tables/tbgetall.c
@@ -77,7 +77,7 @@ acpi_tb_get_primary_table(struct acpi_pointer *address,
77 acpi_status status; 77 acpi_status status;
78 struct acpi_table_header header; 78 struct acpi_table_header header;
79 79
80 ACPI_FUNCTION_TRACE("tb_get_primary_table"); 80 ACPI_FUNCTION_TRACE(tb_get_primary_table);
81 81
82 /* Ignore a NULL address in the RSDT */ 82 /* Ignore a NULL address in the RSDT */
83 83
@@ -140,7 +140,7 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address,
140 acpi_status status; 140 acpi_status status;
141 struct acpi_table_header header; 141 struct acpi_table_header header;
142 142
143 ACPI_FUNCTION_TRACE_STR("tb_get_secondary_table", signature); 143 ACPI_FUNCTION_TRACE_STR(tb_get_secondary_table, signature);
144 144
145 /* Get the header in order to match the signature */ 145 /* Get the header in order to match the signature */
146 146
@@ -151,7 +151,7 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address,
151 151
152 /* Signature must match request */ 152 /* Signature must match request */
153 153
154 if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { 154 if (!ACPI_COMPARE_NAME(header.signature, signature)) {
155 ACPI_ERROR((AE_INFO, 155 ACPI_ERROR((AE_INFO,
156 "Incorrect table signature - wanted [%s] found [%4.4s]", 156 "Incorrect table signature - wanted [%s] found [%4.4s]",
157 signature, header.signature)); 157 signature, header.signature));
@@ -207,7 +207,7 @@ acpi_status acpi_tb_get_required_tables(void)
207 struct acpi_table_desc table_info; 207 struct acpi_table_desc table_info;
208 struct acpi_pointer address; 208 struct acpi_pointer address;
209 209
210 ACPI_FUNCTION_TRACE("tb_get_required_tables"); 210 ACPI_FUNCTION_TRACE(tb_get_required_tables);
211 211
212 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%d ACPI tables in RSDT\n", 212 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%d ACPI tables in RSDT\n",
213 acpi_gbl_rsdt_table_count)); 213 acpi_gbl_rsdt_table_count));
@@ -306,6 +306,6 @@ acpi_status acpi_tb_get_required_tables(void)
306 306
307 /* Always delete the RSDP mapping, we are done with it */ 307 /* Always delete the RSDP mapping, we are done with it */
308 308
309 acpi_tb_delete_tables_by_type(ACPI_TABLE_RSDP); 309 acpi_tb_delete_tables_by_type(ACPI_TABLE_ID_RSDP);
310 return_ACPI_STATUS(status); 310 return_ACPI_STATUS(status);
311} 311}
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index ce57a195577a..7ca2df75bb11 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -73,11 +73,11 @@ acpi_tb_match_signature(char *signature,
73{ 73{
74 acpi_native_uint i; 74 acpi_native_uint i;
75 75
76 ACPI_FUNCTION_TRACE("tb_match_signature"); 76 ACPI_FUNCTION_TRACE(tb_match_signature);
77 77
78 /* Search for a signature match among the known table types */ 78 /* Search for a signature match among the known table types */
79 79
80 for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { 80 for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) {
81 if (!(acpi_gbl_table_data[i].flags & search_type)) { 81 if (!(acpi_gbl_table_data[i].flags & search_type)) {
82 continue; 82 continue;
83 } 83 }
@@ -123,7 +123,7 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info)
123{ 123{
124 acpi_status status; 124 acpi_status status;
125 125
126 ACPI_FUNCTION_TRACE("tb_install_table"); 126 ACPI_FUNCTION_TRACE(tb_install_table);
127 127
128 /* Lock tables while installing */ 128 /* Lock tables while installing */
129 129
@@ -188,7 +188,7 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type)
188 struct acpi_table_header *table_header; 188 struct acpi_table_header *table_header;
189 acpi_status status; 189 acpi_status status;
190 190
191 ACPI_FUNCTION_TRACE("tb_recognize_table"); 191 ACPI_FUNCTION_TRACE(tb_recognize_table);
192 192
193 /* Ensure that we have a valid table pointer */ 193 /* Ensure that we have a valid table pointer */
194 194
@@ -219,7 +219,6 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type)
219 /* Return the table type and length via the info struct */ 219 /* Return the table type and length via the info struct */
220 220
221 table_info->length = (acpi_size) table_header->length; 221 table_info->length = (acpi_size) table_header->length;
222
223 return_ACPI_STATUS(status); 222 return_ACPI_STATUS(status);
224} 223}
225 224
@@ -244,7 +243,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
244 struct acpi_table_desc *table_desc; 243 struct acpi_table_desc *table_desc;
245 acpi_status status; 244 acpi_status status;
246 245
247 ACPI_FUNCTION_TRACE_U32("tb_init_table_descriptor", table_type); 246 ACPI_FUNCTION_TRACE_U32(tb_init_table_descriptor, table_type);
248 247
249 /* Allocate a descriptor for this table */ 248 /* Allocate a descriptor for this table */
250 249
@@ -313,15 +312,14 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
313 312
314 /* Finish initialization of the table descriptor */ 313 /* Finish initialization of the table descriptor */
315 314
315 table_desc->loaded_into_namespace = FALSE;
316 table_desc->type = (u8) table_type; 316 table_desc->type = (u8) table_type;
317 table_desc->pointer = table_info->pointer; 317 table_desc->pointer = table_info->pointer;
318 table_desc->length = table_info->length; 318 table_desc->length = table_info->length;
319 table_desc->allocation = table_info->allocation; 319 table_desc->allocation = table_info->allocation;
320 table_desc->aml_start = (u8 *) (table_desc->pointer + 1), 320 table_desc->aml_start = (u8 *) (table_desc->pointer + 1),
321 table_desc->aml_length = (u32) (table_desc->length - 321 table_desc->aml_length = (u32)
322 (u32) sizeof(struct 322 (table_desc->length - (u32) sizeof(struct acpi_table_header));
323 acpi_table_header));
324 table_desc->loaded_into_namespace = FALSE;
325 323
326 /* 324 /*
327 * Set the appropriate global pointer (if there is one) to point to the 325 * Set the appropriate global pointer (if there is one) to point to the
@@ -336,7 +334,6 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
336 334
337 table_info->owner_id = table_desc->owner_id; 335 table_info->owner_id = table_desc->owner_id;
338 table_info->installed_desc = table_desc; 336 table_info->installed_desc = table_desc;
339
340 return_ACPI_STATUS(AE_OK); 337 return_ACPI_STATUS(AE_OK);
341} 338}
342 339
@@ -360,7 +357,7 @@ void acpi_tb_delete_all_tables(void)
360 * Free memory allocated for ACPI tables 357 * Free memory allocated for ACPI tables
361 * Memory can either be mapped or allocated 358 * Memory can either be mapped or allocated
362 */ 359 */
363 for (type = 0; type < NUM_ACPI_TABLE_TYPES; type++) { 360 for (type = 0; type < (ACPI_TABLE_ID_MAX + 1); type++) {
364 acpi_tb_delete_tables_by_type(type); 361 acpi_tb_delete_tables_by_type(type);
365 } 362 }
366} 363}
@@ -384,9 +381,9 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type)
384 u32 count; 381 u32 count;
385 u32 i; 382 u32 i;
386 383
387 ACPI_FUNCTION_TRACE_U32("tb_delete_tables_by_type", type); 384 ACPI_FUNCTION_TRACE_U32(tb_delete_tables_by_type, type);
388 385
389 if (type > ACPI_TABLE_MAX) { 386 if (type > ACPI_TABLE_ID_MAX) {
390 return_VOID; 387 return_VOID;
391 } 388 }
392 389
@@ -397,28 +394,28 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type)
397 /* Clear the appropriate "typed" global table pointer */ 394 /* Clear the appropriate "typed" global table pointer */
398 395
399 switch (type) { 396 switch (type) {
400 case ACPI_TABLE_RSDP: 397 case ACPI_TABLE_ID_RSDP:
401 acpi_gbl_RSDP = NULL; 398 acpi_gbl_RSDP = NULL;
402 break; 399 break;
403 400
404 case ACPI_TABLE_DSDT: 401 case ACPI_TABLE_ID_DSDT:
405 acpi_gbl_DSDT = NULL; 402 acpi_gbl_DSDT = NULL;
406 break; 403 break;
407 404
408 case ACPI_TABLE_FADT: 405 case ACPI_TABLE_ID_FADT:
409 acpi_gbl_FADT = NULL; 406 acpi_gbl_FADT = NULL;
410 break; 407 break;
411 408
412 case ACPI_TABLE_FACS: 409 case ACPI_TABLE_ID_FACS:
413 acpi_gbl_FACS = NULL; 410 acpi_gbl_FACS = NULL;
414 break; 411 break;
415 412
416 case ACPI_TABLE_XSDT: 413 case ACPI_TABLE_ID_XSDT:
417 acpi_gbl_XSDT = NULL; 414 acpi_gbl_XSDT = NULL;
418 break; 415 break;
419 416
420 case ACPI_TABLE_SSDT: 417 case ACPI_TABLE_ID_SSDT:
421 case ACPI_TABLE_PSDT: 418 case ACPI_TABLE_ID_PSDT:
422 default: 419 default:
423 break; 420 break;
424 } 421 }
@@ -504,7 +501,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc
504{ 501{
505 struct acpi_table_desc *next_desc; 502 struct acpi_table_desc *next_desc;
506 503
507 ACPI_FUNCTION_TRACE_PTR("tb_uninstall_table", table_desc); 504 ACPI_FUNCTION_TRACE_PTR(tb_uninstall_table, table_desc);
508 505
509 if (!table_desc) { 506 if (!table_desc) {
510 return_PTR(NULL); 507 return_PTR(NULL);
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
index 9e0ebe625ed9..9e226438a3f6 100644
--- a/drivers/acpi/tables/tbrsdt.c
+++ b/drivers/acpi/tables/tbrsdt.c
@@ -64,7 +64,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address)
64 acpi_status status; 64 acpi_status status;
65 struct rsdp_descriptor *rsdp; 65 struct rsdp_descriptor *rsdp;
66 66
67 ACPI_FUNCTION_TRACE("tb_verify_rsdp"); 67 ACPI_FUNCTION_TRACE(tb_verify_rsdp);
68 68
69 switch (address->pointer_type) { 69 switch (address->pointer_type) {
70 case ACPI_LOGICAL_POINTER: 70 case ACPI_LOGICAL_POINTER:
@@ -103,7 +103,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address)
103 103
104 /* Save the table pointers and allocation info */ 104 /* Save the table pointers and allocation info */
105 105
106 status = acpi_tb_init_table_descriptor(ACPI_TABLE_RSDP, &table_info); 106 status = acpi_tb_init_table_descriptor(ACPI_TABLE_ID_RSDP, &table_info);
107 if (ACPI_FAILURE(status)) { 107 if (ACPI_FAILURE(status)) {
108 goto cleanup; 108 goto cleanup;
109 } 109 }
@@ -174,22 +174,19 @@ void acpi_tb_get_rsdt_address(struct acpi_pointer *out_address)
174 174
175acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) 175acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
176{ 176{
177 int no_match; 177 char *signature;
178 178
179 ACPI_FUNCTION_ENTRY(); 179 ACPI_FUNCTION_ENTRY();
180 180
181 /* 181 /* Search for appropriate signature, RSDT or XSDT */
182 * Search for appropriate signature, RSDT or XSDT 182
183 */
184 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { 183 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
185 no_match = ACPI_STRNCMP((char *)table_ptr, RSDT_SIG, 184 signature = RSDT_SIG;
186 sizeof(RSDT_SIG) - 1);
187 } else { 185 } else {
188 no_match = ACPI_STRNCMP((char *)table_ptr, XSDT_SIG, 186 signature = XSDT_SIG;
189 sizeof(XSDT_SIG) - 1);
190 } 187 }
191 188
192 if (no_match) { 189 if (!ACPI_COMPARE_NAME(table_ptr->signature, signature)) {
193 190
194 /* Invalid RSDT or XSDT signature */ 191 /* Invalid RSDT or XSDT signature */
195 192
@@ -235,13 +232,13 @@ acpi_status acpi_tb_get_table_rsdt(void)
235 acpi_status status; 232 acpi_status status;
236 struct acpi_pointer address; 233 struct acpi_pointer address;
237 234
238 ACPI_FUNCTION_TRACE("tb_get_table_rsdt"); 235 ACPI_FUNCTION_TRACE(tb_get_table_rsdt);
239 236
240 /* Get the RSDT/XSDT via the RSDP */ 237 /* Get the RSDT/XSDT via the RSDP */
241 238
242 acpi_tb_get_rsdt_address(&address); 239 acpi_tb_get_rsdt_address(&address);
243 240
244 table_info.type = ACPI_TABLE_XSDT; 241 table_info.type = ACPI_TABLE_ID_XSDT;
245 status = acpi_tb_get_table(&address, &table_info); 242 status = acpi_tb_get_table(&address, &table_info);
246 if (ACPI_FAILURE(status)) { 243 if (ACPI_FAILURE(status)) {
247 ACPI_EXCEPTION((AE_INFO, status, 244 ACPI_EXCEPTION((AE_INFO, status,
@@ -275,7 +272,7 @@ acpi_status acpi_tb_get_table_rsdt(void)
275 272
276 /* Save the table pointers and allocation info */ 273 /* Save the table pointers and allocation info */
277 274
278 status = acpi_tb_init_table_descriptor(ACPI_TABLE_XSDT, &table_info); 275 status = acpi_tb_init_table_descriptor(ACPI_TABLE_ID_XSDT, &table_info);
279 if (ACPI_FAILURE(status)) { 276 if (ACPI_FAILURE(status)) {
280 return_ACPI_STATUS(status); 277 return_ACPI_STATUS(status);
281 } 278 }
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index f8d28ae8811d..5f1440376514 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -71,7 +71,7 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc)
71{ 71{
72 struct acpi_table_desc *table_desc; 72 struct acpi_table_desc *table_desc;
73 73
74 ACPI_FUNCTION_TRACE("tb_is_table_installed"); 74 ACPI_FUNCTION_TRACE(tb_is_table_installed);
75 75
76 /* Get the list descriptor and first table descriptor */ 76 /* Get the list descriptor and first table descriptor */
77 77
@@ -100,7 +100,7 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc)
100 /* Match: this table is already installed */ 100 /* Match: this table is already installed */
101 101
102 ACPI_DEBUG_PRINT((ACPI_DB_TABLES, 102 ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
103 "Table [%4.4s] already installed: Rev %X oem_table_id [%8.8s]\n", 103 "Table [%4.4s] already installed: Rev %X OemTableId [%8.8s]\n",
104 new_table_desc->pointer->signature, 104 new_table_desc->pointer->signature,
105 new_table_desc->pointer->revision, 105 new_table_desc->pointer->revision,
106 new_table_desc->pointer-> 106 new_table_desc->pointer->
@@ -288,7 +288,7 @@ acpi_tb_verify_table_checksum(struct acpi_table_header *table_header)
288{ 288{
289 u8 checksum; 289 u8 checksum;
290 290
291 ACPI_FUNCTION_TRACE("tb_verify_table_checksum"); 291 ACPI_FUNCTION_TRACE(tb_verify_table_checksum);
292 292
293 /* Compute the checksum on the table */ 293 /* Compute the checksum on the table */
294 294
@@ -329,7 +329,7 @@ acpi_tb_handle_to_object(u16 table_id,
329 u32 i; 329 u32 i;
330 struct acpi_table_desc *table_desc; 330 struct acpi_table_desc *table_desc;
331 331
332 ACPI_FUNCTION_NAME("tb_handle_to_object"); 332 ACPI_FUNCTION_NAME(tb_handle_to_object);
333 333
334 for (i = 0; i < ACPI_TABLE_MAX; i++) { 334 for (i = 0; i < ACPI_TABLE_MAX; i++) {
335 table_desc = acpi_gbl_table_lists[i].next; 335 table_desc = acpi_gbl_table_lists[i].next;
@@ -343,7 +343,7 @@ acpi_tb_handle_to_object(u16 table_id,
343 } 343 }
344 } 344 }
345 345
346 ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id)); 346 ACPI_ERROR((AE_INFO, "TableId=%X does not exist", table_id));
347 return (AE_BAD_PARAMETER); 347 return (AE_BAD_PARAMETER);
348} 348}
349#endif 349#endif
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 53c627e401bf..4e91f2984815 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -66,7 +66,7 @@ acpi_status acpi_load_tables(void)
66 struct acpi_pointer rsdp_address; 66 struct acpi_pointer rsdp_address;
67 acpi_status status; 67 acpi_status status;
68 68
69 ACPI_FUNCTION_TRACE("acpi_load_tables"); 69 ACPI_FUNCTION_TRACE(acpi_load_tables);
70 70
71 /* Get the RSDP */ 71 /* Get the RSDP */
72 72
@@ -145,7 +145,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
145 struct acpi_table_desc table_info; 145 struct acpi_table_desc table_info;
146 struct acpi_pointer address; 146 struct acpi_pointer address;
147 147
148 ACPI_FUNCTION_TRACE("acpi_load_table"); 148 ACPI_FUNCTION_TRACE(acpi_load_table);
149 149
150 if (!table_ptr) { 150 if (!table_ptr) {
151 return_ACPI_STATUS(AE_BAD_PARAMETER); 151 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -188,12 +188,12 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
188 /* Convert the table to common format if necessary */ 188 /* Convert the table to common format if necessary */
189 189
190 switch (table_info.type) { 190 switch (table_info.type) {
191 case ACPI_TABLE_FADT: 191 case ACPI_TABLE_ID_FADT:
192 192
193 status = acpi_tb_convert_table_fadt(); 193 status = acpi_tb_convert_table_fadt();
194 break; 194 break;
195 195
196 case ACPI_TABLE_FACS: 196 case ACPI_TABLE_ID_FACS:
197 197
198 status = acpi_tb_build_common_facs(&table_info); 198 status = acpi_tb_build_common_facs(&table_info);
199 break; 199 break;
@@ -234,11 +234,11 @@ acpi_status acpi_unload_table(acpi_table_type table_type)
234{ 234{
235 struct acpi_table_desc *table_desc; 235 struct acpi_table_desc *table_desc;
236 236
237 ACPI_FUNCTION_TRACE("acpi_unload_table"); 237 ACPI_FUNCTION_TRACE(acpi_unload_table);
238 238
239 /* Parameter validation */ 239 /* Parameter validation */
240 240
241 if (table_type > ACPI_TABLE_MAX) { 241 if (table_type > ACPI_TABLE_ID_MAX) {
242 return_ACPI_STATUS(AE_BAD_PARAMETER); 242 return_ACPI_STATUS(AE_BAD_PARAMETER);
243 } 243 }
244 244
@@ -292,16 +292,16 @@ acpi_get_table_header(acpi_table_type table_type,
292 struct acpi_table_header *tbl_ptr; 292 struct acpi_table_header *tbl_ptr;
293 acpi_status status; 293 acpi_status status;
294 294
295 ACPI_FUNCTION_TRACE("acpi_get_table_header"); 295 ACPI_FUNCTION_TRACE(acpi_get_table_header);
296 296
297 if ((instance == 0) || 297 if ((instance == 0) ||
298 (table_type == ACPI_TABLE_RSDP) || (!out_table_header)) { 298 (table_type == ACPI_TABLE_ID_RSDP) || (!out_table_header)) {
299 return_ACPI_STATUS(AE_BAD_PARAMETER); 299 return_ACPI_STATUS(AE_BAD_PARAMETER);
300 } 300 }
301 301
302 /* Check the table type and instance */ 302 /* Check the table type and instance */
303 303
304 if ((table_type > ACPI_TABLE_MAX) || 304 if ((table_type > ACPI_TABLE_ID_MAX) ||
305 (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && 305 (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) &&
306 instance > 1)) { 306 instance > 1)) {
307 return_ACPI_STATUS(AE_BAD_PARAMETER); 307 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -361,7 +361,7 @@ acpi_get_table(acpi_table_type table_type,
361 acpi_status status; 361 acpi_status status;
362 acpi_size table_length; 362 acpi_size table_length;
363 363
364 ACPI_FUNCTION_TRACE("acpi_get_table"); 364 ACPI_FUNCTION_TRACE(acpi_get_table);
365 365
366 /* Parameter validation */ 366 /* Parameter validation */
367 367
@@ -376,7 +376,7 @@ acpi_get_table(acpi_table_type table_type,
376 376
377 /* Check the table type and instance */ 377 /* Check the table type and instance */
378 378
379 if ((table_type > ACPI_TABLE_MAX) || 379 if ((table_type > ACPI_TABLE_ID_MAX) ||
380 (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && 380 (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) &&
381 instance > 1)) { 381 instance > 1)) {
382 return_ACPI_STATUS(AE_BAD_PARAMETER); 382 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -399,7 +399,7 @@ acpi_get_table(acpi_table_type table_type,
399 399
400 /* Get the table length */ 400 /* Get the table length */
401 401
402 if (table_type == ACPI_TABLE_RSDP) { 402 if (table_type == ACPI_TABLE_ID_RSDP) {
403 403
404 /* RSD PTR is the only "table" without a header */ 404 /* RSD PTR is the only "table" without a header */
405 405
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c
index 550284f5d1ed..3107e741d510 100644
--- a/drivers/acpi/tables/tbxfroot.c
+++ b/drivers/acpi/tables/tbxfroot.c
@@ -119,7 +119,7 @@ acpi_tb_find_table(char *signature,
119 acpi_status status; 119 acpi_status status;
120 struct acpi_table_header *table; 120 struct acpi_table_header *table;
121 121
122 ACPI_FUNCTION_TRACE("tb_find_table"); 122 ACPI_FUNCTION_TRACE(tb_find_table);
123 123
124 /* Validate string lengths */ 124 /* Validate string lengths */
125 125
@@ -129,7 +129,7 @@ acpi_tb_find_table(char *signature,
129 return_ACPI_STATUS(AE_AML_STRING_LIMIT); 129 return_ACPI_STATUS(AE_AML_STRING_LIMIT);
130 } 130 }
131 131
132 if (!ACPI_STRNCMP(signature, DSDT_SIG, ACPI_NAME_SIZE)) { 132 if (ACPI_COMPARE_NAME(signature, DSDT_SIG)) {
133 /* 133 /*
134 * The DSDT pointer is contained in the FADT, not the RSDT. 134 * The DSDT pointer is contained in the FADT, not the RSDT.
135 * This code should suffice, because the only code that would perform 135 * This code should suffice, because the only code that would perform
@@ -154,10 +154,12 @@ acpi_tb_find_table(char *signature,
154 154
155 /* Check oem_id and oem_table_id */ 155 /* Check oem_id and oem_table_id */
156 156
157 if ((oem_id[0] && ACPI_STRNCMP(oem_id, table->oem_id, 157 if ((oem_id[0] &&
158 sizeof(table->oem_id))) || 158 ACPI_STRNCMP(oem_id, table->oem_id,
159 (oem_table_id[0] && ACPI_STRNCMP(oem_table_id, table->oem_table_id, 159 sizeof(table->oem_id))) ||
160 sizeof(table->oem_table_id)))) { 160 (oem_table_id[0] &&
161 ACPI_STRNCMP(oem_table_id, table->oem_table_id,
162 sizeof(table->oem_table_id)))) {
161 return_ACPI_STATUS(AE_AML_NAME_NOT_FOUND); 163 return_ACPI_STATUS(AE_AML_NAME_NOT_FOUND);
162 } 164 }
163 165
@@ -201,7 +203,7 @@ acpi_get_firmware_table(acpi_string signature,
201 u32 i; 203 u32 i;
202 u32 j; 204 u32 j;
203 205
204 ACPI_FUNCTION_TRACE("acpi_get_firmware_table"); 206 ACPI_FUNCTION_TRACE(acpi_get_firmware_table);
205 207
206 /* 208 /*
207 * Ensure that at least the table manager is initialized. We don't 209 * Ensure that at least the table manager is initialized. We don't
@@ -325,7 +327,7 @@ acpi_get_firmware_table(acpi_string signature,
325 327
326 /* Compare table signatures and table instance */ 328 /* Compare table signatures and table instance */
327 329
328 if (!ACPI_STRNCMP(header->signature, signature, ACPI_NAME_SIZE)) { 330 if (ACPI_COMPARE_NAME(header->signature, signature)) {
329 331
330 /* An instance of the table was found */ 332 /* An instance of the table was found */
331 333
@@ -388,7 +390,7 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address)
388 struct acpi_table_desc table_info; 390 struct acpi_table_desc table_info;
389 acpi_status status; 391 acpi_status status;
390 392
391 ACPI_FUNCTION_TRACE("acpi_find_root_pointer"); 393 ACPI_FUNCTION_TRACE(acpi_find_root_pointer);
392 394
393 /* Get the RSDP */ 395 /* Get the RSDP */
394 396
@@ -425,7 +427,7 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
425 u8 *mem_rover; 427 u8 *mem_rover;
426 u8 *end_address; 428 u8 *end_address;
427 429
428 ACPI_FUNCTION_TRACE("tb_scan_memory_for_rsdp"); 430 ACPI_FUNCTION_TRACE(tb_scan_memory_for_rsdp);
429 431
430 end_address = start_address + length; 432 end_address = start_address + length;
431 433
@@ -490,7 +492,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
490 u32 physical_address; 492 u32 physical_address;
491 acpi_status status; 493 acpi_status status;
492 494
493 ACPI_FUNCTION_TRACE("tb_find_rsdp"); 495 ACPI_FUNCTION_TRACE(tb_find_rsdp);
494 496
495 /* 497 /*
496 * Scan supports either logical addressing or physical addressing 498 * Scan supports either logical addressing or physical addressing