aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbinstal.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:19 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:21 -0500
commitc5fc42ac4d4d6d3e3f619290b86890cb3725d2f8 (patch)
tree884123d40fe2abf621ec436e55b2d79efa5b474a /drivers/acpi/tables/tbinstal.c
parentf3d2e7865c816258c699ff965768e46b50d536d3 (diff)
ACPICA: misc fixes for new Table Manager:
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbinstal.c')
-rw-r--r--drivers/acpi/tables/tbinstal.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index 9076ca0913b7..9e0b3ce0d8e5 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("tbinstal")
61 *****************************************************************************/ 61 *****************************************************************************/
62acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc) 62acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
63{ 63{
64 u8 checksum; 64 acpi_status status;
65 65
66 ACPI_FUNCTION_TRACE(tb_verify_table); 66 ACPI_FUNCTION_TRACE(tb_verify_table);
67 67
@@ -84,17 +84,9 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
84 84
85 /* Always calculate checksum, ignore bad checksum if requested */ 85 /* Always calculate checksum, ignore bad checksum if requested */
86 86
87 checksum = acpi_tb_checksum(ACPI_CAST_PTR(void, table_desc->pointer), 87 status =
88 table_desc->length); 88 acpi_tb_verify_checksum(table_desc->pointer, table_desc->length);
89 89 return_ACPI_STATUS(status);
90#if (ACPI_CHECKSUM_ABORT)
91
92 if (checksum) {
93 return_ACPI_STATUS(AE_BAD_CHECKSUM);
94 }
95#endif
96
97 return_ACPI_STATUS(AE_OK);
98} 90}
99 91
100/******************************************************************************* 92/*******************************************************************************
@@ -188,7 +180,7 @@ acpi_status acpi_tb_resize_root_table_list(void)
188 180
189 /* allow_resize flag is a parameter to acpi_initialize_tables */ 181 /* allow_resize flag is a parameter to acpi_initialize_tables */
190 182
191 if (!(acpi_gbl_root_table_list.flags & ACPI_TABLE_FLAGS_ALLOW_RESIZE)) { 183 if (!(acpi_gbl_root_table_list.flags & ACPI_ROOT_ALLOW_RESIZE)) {
192 ACPI_ERROR((AE_INFO, 184 ACPI_ERROR((AE_INFO,
193 "Resize of Root Table Array is not allowed")); 185 "Resize of Root Table Array is not allowed"));
194 return_ACPI_STATUS(AE_SUPPORT); 186 return_ACPI_STATUS(AE_SUPPORT);
@@ -212,18 +204,14 @@ acpi_status acpi_tb_resize_root_table_list(void)
212 acpi_gbl_root_table_list.size * 204 acpi_gbl_root_table_list.size *
213 sizeof(struct acpi_table_desc)); 205 sizeof(struct acpi_table_desc));
214 206
215 if (acpi_gbl_root_table_list.flags & ACPI_TABLE_ORIGIN_MASK == 207 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
216 ACPI_TABLE_ORIGIN_ALLOCATED) {
217 ACPI_FREE(acpi_gbl_root_table_list.tables); 208 ACPI_FREE(acpi_gbl_root_table_list.tables);
218 } 209 }
219 } 210 }
220 211
221 acpi_gbl_root_table_list.tables = tables; 212 acpi_gbl_root_table_list.tables = tables;
222 acpi_gbl_root_table_list.size += ACPI_ROOT_TABLE_SIZE_INCREMENT; 213 acpi_gbl_root_table_list.size += ACPI_ROOT_TABLE_SIZE_INCREMENT;
223 acpi_gbl_root_table_list.flags = (u8) (ACPI_TABLE_ORIGIN_ALLOCATED | 214 acpi_gbl_root_table_list.flags |= (u8) ACPI_ROOT_ORIGIN_ALLOCATED;
224 (acpi_gbl_root_table_list.
225 flags &
226 ~ACPI_TABLE_ORIGIN_MASK));
227 215
228 return_ACPI_STATUS(AE_OK); 216 return_ACPI_STATUS(AE_OK);
229} 217}
@@ -348,8 +336,7 @@ void acpi_tb_terminate(void)
348 * Delete the root table array if allocated locally. Array cannot be 336 * Delete the root table array if allocated locally. Array cannot be
349 * mapped, so we don't need to check for that flag. 337 * mapped, so we don't need to check for that flag.
350 */ 338 */
351 if ((acpi_gbl_root_table_list.flags & ACPI_TABLE_ORIGIN_MASK) == 339 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
352 ACPI_TABLE_ORIGIN_ALLOCATED) {
353 ACPI_FREE(acpi_gbl_root_table_list.tables); 340 ACPI_FREE(acpi_gbl_root_table_list.tables);
354 } 341 }
355 342
@@ -497,7 +484,7 @@ u8 acpi_tb_is_table_loaded(acpi_native_uint table_index)
497 if (table_index < acpi_gbl_root_table_list.count) { 484 if (table_index < acpi_gbl_root_table_list.count) {
498 is_loaded = (u8) 485 is_loaded = (u8)
499 (acpi_gbl_root_table_list.tables[table_index]. 486 (acpi_gbl_root_table_list.tables[table_index].
500 flags & ACPI_TABLE_FLAGS_LOADED); 487 flags & ACPI_TABLE_IS_LOADED);
501 } 488 }
502 489
503 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 490 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
@@ -524,10 +511,10 @@ void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded)
524 if (table_index < acpi_gbl_root_table_list.count) { 511 if (table_index < acpi_gbl_root_table_list.count) {
525 if (is_loaded) { 512 if (is_loaded) {
526 acpi_gbl_root_table_list.tables[table_index].flags |= 513 acpi_gbl_root_table_list.tables[table_index].flags |=
527 ACPI_TABLE_FLAGS_LOADED; 514 ACPI_TABLE_IS_LOADED;
528 } else { 515 } else {
529 acpi_gbl_root_table_list.tables[table_index].flags &= 516 acpi_gbl_root_table_list.tables[table_index].flags &=
530 ~ACPI_TABLE_FLAGS_LOADED; 517 ~ACPI_TABLE_IS_LOADED;
531 } 518 }
532 } 519 }
533 520