diff options
Diffstat (limited to 'drivers/acpi/tables/tbinstal.c')
-rw-r--r-- | drivers/acpi/tables/tbinstal.c | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 402f93e1ff20..b22185f55a16 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -107,11 +107,10 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc) | |||
107 | ******************************************************************************/ | 107 | ******************************************************************************/ |
108 | 108 | ||
109 | acpi_status | 109 | acpi_status |
110 | acpi_tb_add_table(struct acpi_table_desc *table_desc, | 110 | acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) |
111 | acpi_native_uint * table_index) | ||
112 | { | 111 | { |
113 | acpi_native_uint i; | 112 | u32 i; |
114 | acpi_native_uint length; | 113 | u32 length; |
115 | acpi_status status = AE_OK; | 114 | acpi_status status = AE_OK; |
116 | 115 | ||
117 | ACPI_FUNCTION_TRACE(tb_add_table); | 116 | ACPI_FUNCTION_TRACE(tb_add_table); |
@@ -123,24 +122,13 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, | |||
123 | } | 122 | } |
124 | } | 123 | } |
125 | 124 | ||
126 | /* The table must be either an SSDT or a PSDT or an OEMx */ | 125 | /* |
127 | 126 | * Originally, we checked the table signature for "SSDT" or "PSDT" here. | |
128 | if (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)&& | 127 | * Next, we added support for OEMx tables, signature "OEM". |
129 | !ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)&& | 128 | * Valid tables were encountered with a null signature, so we've just |
130 | strncmp(table_desc->pointer->signature, "OEM", 3)) { | 129 | * given up on validating the signature, since it seems to be a waste |
131 | /* Check for a printable name */ | 130 | * of code. The original code was removed (05/2008). |
132 | if (acpi_ut_valid_acpi_name( | 131 | */ |
133 | *(u32 *) table_desc->pointer->signature)) { | ||
134 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
135 | "[%4.4s], must be SSDT or PSDT", | ||
136 | table_desc->pointer->signature)); | ||
137 | } else { | ||
138 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
139 | "(0x%8.8X), must be SSDT or PSDT", | ||
140 | *(u32 *) table_desc->pointer->signature)); | ||
141 | } | ||
142 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | ||
143 | } | ||
144 | 132 | ||
145 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 133 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
146 | 134 | ||
@@ -218,8 +206,8 @@ acpi_status acpi_tb_resize_root_table_list(void) | |||
218 | 206 | ||
219 | /* Increase the Table Array size */ | 207 | /* Increase the Table Array size */ |
220 | 208 | ||
221 | tables = ACPI_ALLOCATE_ZEROED((acpi_gbl_root_table_list.size + | 209 | tables = ACPI_ALLOCATE_ZEROED(((acpi_size) acpi_gbl_root_table_list. |
222 | ACPI_ROOT_TABLE_SIZE_INCREMENT) | 210 | size + ACPI_ROOT_TABLE_SIZE_INCREMENT) |
223 | * sizeof(struct acpi_table_desc)); | 211 | * sizeof(struct acpi_table_desc)); |
224 | if (!tables) { | 212 | if (!tables) { |
225 | ACPI_ERROR((AE_INFO, | 213 | ACPI_ERROR((AE_INFO, |
@@ -231,7 +219,7 @@ acpi_status acpi_tb_resize_root_table_list(void) | |||
231 | 219 | ||
232 | if (acpi_gbl_root_table_list.tables) { | 220 | if (acpi_gbl_root_table_list.tables) { |
233 | ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, | 221 | ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, |
234 | acpi_gbl_root_table_list.size * | 222 | (acpi_size) acpi_gbl_root_table_list.size * |
235 | sizeof(struct acpi_table_desc)); | 223 | sizeof(struct acpi_table_desc)); |
236 | 224 | ||
237 | if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) { | 225 | if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) { |
@@ -264,7 +252,7 @@ acpi_status acpi_tb_resize_root_table_list(void) | |||
264 | acpi_status | 252 | acpi_status |
265 | acpi_tb_store_table(acpi_physical_address address, | 253 | acpi_tb_store_table(acpi_physical_address address, |
266 | struct acpi_table_header *table, | 254 | struct acpi_table_header *table, |
267 | u32 length, u8 flags, acpi_native_uint * table_index) | 255 | u32 length, u8 flags, u32 *table_index) |
268 | { | 256 | { |
269 | acpi_status status = AE_OK; | 257 | acpi_status status = AE_OK; |
270 | 258 | ||
@@ -345,7 +333,7 @@ void acpi_tb_delete_table(struct acpi_table_desc *table_desc) | |||
345 | 333 | ||
346 | void acpi_tb_terminate(void) | 334 | void acpi_tb_terminate(void) |
347 | { | 335 | { |
348 | acpi_native_uint i; | 336 | u32 i; |
349 | 337 | ||
350 | ACPI_FUNCTION_TRACE(tb_terminate); | 338 | ACPI_FUNCTION_TRACE(tb_terminate); |
351 | 339 | ||
@@ -385,7 +373,7 @@ void acpi_tb_terminate(void) | |||
385 | * | 373 | * |
386 | ******************************************************************************/ | 374 | ******************************************************************************/ |
387 | 375 | ||
388 | void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index) | 376 | void acpi_tb_delete_namespace_by_owner(u32 table_index) |
389 | { | 377 | { |
390 | acpi_owner_id owner_id; | 378 | acpi_owner_id owner_id; |
391 | 379 | ||
@@ -414,7 +402,7 @@ void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index) | |||
414 | * | 402 | * |
415 | ******************************************************************************/ | 403 | ******************************************************************************/ |
416 | 404 | ||
417 | acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index) | 405 | acpi_status acpi_tb_allocate_owner_id(u32 table_index) |
418 | { | 406 | { |
419 | acpi_status status = AE_BAD_PARAMETER; | 407 | acpi_status status = AE_BAD_PARAMETER; |
420 | 408 | ||
@@ -442,7 +430,7 @@ acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index) | |||
442 | * | 430 | * |
443 | ******************************************************************************/ | 431 | ******************************************************************************/ |
444 | 432 | ||
445 | acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index) | 433 | acpi_status acpi_tb_release_owner_id(u32 table_index) |
446 | { | 434 | { |
447 | acpi_status status = AE_BAD_PARAMETER; | 435 | acpi_status status = AE_BAD_PARAMETER; |
448 | 436 | ||
@@ -473,8 +461,7 @@ acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index) | |||
473 | * | 461 | * |
474 | ******************************************************************************/ | 462 | ******************************************************************************/ |
475 | 463 | ||
476 | acpi_status | 464 | acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id) |
477 | acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id) | ||
478 | { | 465 | { |
479 | acpi_status status = AE_BAD_PARAMETER; | 466 | acpi_status status = AE_BAD_PARAMETER; |
480 | 467 | ||
@@ -501,7 +488,7 @@ acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id) | |||
501 | * | 488 | * |
502 | ******************************************************************************/ | 489 | ******************************************************************************/ |
503 | 490 | ||
504 | u8 acpi_tb_is_table_loaded(acpi_native_uint table_index) | 491 | u8 acpi_tb_is_table_loaded(u32 table_index) |
505 | { | 492 | { |
506 | u8 is_loaded = FALSE; | 493 | u8 is_loaded = FALSE; |
507 | 494 | ||
@@ -529,7 +516,7 @@ u8 acpi_tb_is_table_loaded(acpi_native_uint table_index) | |||
529 | * | 516 | * |
530 | ******************************************************************************/ | 517 | ******************************************************************************/ |
531 | 518 | ||
532 | void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded) | 519 | void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded) |
533 | { | 520 | { |
534 | 521 | ||
535 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 522 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |