aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbxface.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2010-04-26 23:16:14 -0400
committerLen Brown <len.brown@intel.com>2010-05-06 03:05:54 -0400
commitb9ee2043096b02e5da8c62f9a8a8f2e172b3606b (patch)
treeaa0ad908c72d46f2eae8252aed80f0ed84cbf6ec /drivers/acpi/acpica/tbxface.c
parente4eb0450c5d61dd0064ef0904d74088d35284ae2 (diff)
ACPICA: Clarify/rename some root table descriptor fields
Original fields were not very descriptive and led to maintenance problems. New fields should help to understand the existing code. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbxface.c')
-rw-r--r--drivers/acpi/acpica/tbxface.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index adb7f56b853e..4a8b9e6ea57a 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -72,7 +72,7 @@ static int no_auto_ssdt;
72acpi_status acpi_allocate_root_table(u32 initial_table_count) 72acpi_status acpi_allocate_root_table(u32 initial_table_count)
73{ 73{
74 74
75 acpi_gbl_root_table_list.size = initial_table_count; 75 acpi_gbl_root_table_list.max_table_count = initial_table_count;
76 acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE; 76 acpi_gbl_root_table_list.flags = ACPI_ROOT_ALLOW_RESIZE;
77 77
78 return (acpi_tb_resize_root_table_list()); 78 return (acpi_tb_resize_root_table_list());
@@ -130,7 +130,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
130 sizeof(struct acpi_table_desc)); 130 sizeof(struct acpi_table_desc));
131 131
132 acpi_gbl_root_table_list.tables = initial_table_array; 132 acpi_gbl_root_table_list.tables = initial_table_array;
133 acpi_gbl_root_table_list.size = initial_table_count; 133 acpi_gbl_root_table_list.max_table_count = initial_table_count;
134 acpi_gbl_root_table_list.flags = ACPI_ROOT_ORIGIN_UNKNOWN; 134 acpi_gbl_root_table_list.flags = ACPI_ROOT_ORIGIN_UNKNOWN;
135 if (allow_resize) { 135 if (allow_resize) {
136 acpi_gbl_root_table_list.flags |= 136 acpi_gbl_root_table_list.flags |=
@@ -189,7 +189,8 @@ acpi_status acpi_reallocate_root_table(void)
189 * increment to create the new table size. 189 * increment to create the new table size.
190 */ 190 */
191 current_size = (acpi_size) 191 current_size = (acpi_size)
192 acpi_gbl_root_table_list.count * sizeof(struct acpi_table_desc); 192 acpi_gbl_root_table_list.current_table_count *
193 sizeof(struct acpi_table_desc);
193 194
194 new_size = current_size + 195 new_size = current_size +
195 (ACPI_ROOT_TABLE_SIZE_INCREMENT * sizeof(struct acpi_table_desc)); 196 (ACPI_ROOT_TABLE_SIZE_INCREMENT * sizeof(struct acpi_table_desc));
@@ -209,8 +210,9 @@ acpi_status acpi_reallocate_root_table(void)
209 * size of the original table list. 210 * size of the original table list.
210 */ 211 */
211 acpi_gbl_root_table_list.tables = tables; 212 acpi_gbl_root_table_list.tables = tables;
212 acpi_gbl_root_table_list.size = 213 acpi_gbl_root_table_list.max_table_count =
213 acpi_gbl_root_table_list.count + ACPI_ROOT_TABLE_SIZE_INCREMENT; 214 acpi_gbl_root_table_list.current_table_count +
215 ACPI_ROOT_TABLE_SIZE_INCREMENT;
214 acpi_gbl_root_table_list.flags = 216 acpi_gbl_root_table_list.flags =
215 ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE; 217 ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE;
216 218
@@ -291,7 +293,8 @@ acpi_get_table_header(char *signature,
291 293
292 /* Walk the root table list */ 294 /* Walk the root table list */
293 295
294 for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { 296 for (i = 0, j = 0; i < acpi_gbl_root_table_list.current_table_count;
297 i++) {
295 if (!ACPI_COMPARE_NAME 298 if (!ACPI_COMPARE_NAME
296 (&(acpi_gbl_root_table_list.tables[i].signature), 299 (&(acpi_gbl_root_table_list.tables[i].signature),
297 signature)) { 300 signature)) {
@@ -354,7 +357,7 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
354 ACPI_FUNCTION_TRACE(acpi_unload_table_id); 357 ACPI_FUNCTION_TRACE(acpi_unload_table_id);
355 358
356 /* Find table in the global table list */ 359 /* Find table in the global table list */
357 for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { 360 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
358 if (id != acpi_gbl_root_table_list.tables[i].owner_id) { 361 if (id != acpi_gbl_root_table_list.tables[i].owner_id) {
359 continue; 362 continue;
360 } 363 }
@@ -404,7 +407,8 @@ acpi_get_table_with_size(char *signature,
404 407
405 /* Walk the root table list */ 408 /* Walk the root table list */
406 409
407 for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { 410 for (i = 0, j = 0; i < acpi_gbl_root_table_list.current_table_count;
411 i++) {
408 if (!ACPI_COMPARE_NAME 412 if (!ACPI_COMPARE_NAME
409 (&(acpi_gbl_root_table_list.tables[i].signature), 413 (&(acpi_gbl_root_table_list.tables[i].signature),
410 signature)) { 414 signature)) {
@@ -472,7 +476,7 @@ acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table)
472 476
473 /* Validate index */ 477 /* Validate index */
474 478
475 if (table_index >= acpi_gbl_root_table_list.count) { 479 if (table_index >= acpi_gbl_root_table_list.current_table_count) {
476 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 480 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
477 return_ACPI_STATUS(AE_BAD_PARAMETER); 481 return_ACPI_STATUS(AE_BAD_PARAMETER);
478 } 482 }
@@ -523,7 +527,7 @@ static acpi_status acpi_tb_load_namespace(void)
523 * Load the namespace. The DSDT is required, but any SSDT and 527 * Load the namespace. The DSDT is required, but any SSDT and
524 * PSDT tables are optional. Verify the DSDT. 528 * PSDT tables are optional. Verify the DSDT.
525 */ 529 */
526 if (!acpi_gbl_root_table_list.count || 530 if (!acpi_gbl_root_table_list.current_table_count ||
527 !ACPI_COMPARE_NAME(& 531 !ACPI_COMPARE_NAME(&
528 (acpi_gbl_root_table_list. 532 (acpi_gbl_root_table_list.
529 tables[ACPI_TABLE_INDEX_DSDT].signature), 533 tables[ACPI_TABLE_INDEX_DSDT].signature),
@@ -577,7 +581,7 @@ static acpi_status acpi_tb_load_namespace(void)
577 /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ 581 /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
578 582
579 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 583 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
580 for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { 584 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
581 if ((!ACPI_COMPARE_NAME 585 if ((!ACPI_COMPARE_NAME
582 (&(acpi_gbl_root_table_list.tables[i].signature), 586 (&(acpi_gbl_root_table_list.tables[i].signature),
583 ACPI_SIG_SSDT) 587 ACPI_SIG_SSDT)