From 96b7b7ad79e4bd8a0ae67dd201f7532ef4abf1c1 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Wed, 26 May 2010 11:20:47 +0800 Subject: [PATCH] ACPICA: Expand initialization counters to 32 bits Expand the various initialization counters from 16-bit to 32-bit. Allows for very large namespaces. Signed-off-by: Alexey Starikovskiy Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- drivers/acpi/acpica/acstruct.h | 26 +++++++++++++------------- drivers/acpi/acpica/dsinit.c | 14 +++++++------- drivers/acpi/acpica/nsinit.c | 8 ++++---- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index 161bc0e3d70a..0e2c66af3c9d 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h @@ -127,22 +127,22 @@ struct acpi_walk_state { acpi_parse_upwards ascending_callback; }; -/* Info used by acpi_ps_init_objects */ +/* Info used by acpi_ns_initialize_objects and acpi_ds_initialize_objects */ struct acpi_init_walk_info { - u16 method_count; - u16 device_count; - u16 op_region_count; - u16 field_count; - u16 buffer_count; - u16 package_count; - u16 op_region_init; - u16 field_init; - u16 buffer_init; - u16 package_init; - u16 object_count; - acpi_owner_id owner_id; u32 table_index; + u32 object_count; + u32 method_count; + u32 device_count; + u32 op_region_count; + u32 field_count; + u32 buffer_count; + u32 package_count; + u32 op_region_init; + u32 field_init; + u32 buffer_init; + u32 package_init; + acpi_owner_id owner_id; }; struct acpi_get_devices_info { diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c index abe140318a74..cc4a38c57558 100644 --- a/drivers/acpi/acpica/dsinit.c +++ b/drivers/acpi/acpica/dsinit.c @@ -171,12 +171,12 @@ acpi_ds_initialize_objects(u32 table_index, "**** Starting initialization of namespace objects ****\n")); ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "Parsing all Control Methods:")); - info.method_count = 0; - info.op_region_count = 0; - info.object_count = 0; - info.device_count = 0; - info.table_index = table_index; + /* Set all init info to zero */ + + ACPI_MEMSET(&info, 0, sizeof(struct acpi_init_walk_info)); + info.owner_id = owner_id; + info.table_index = table_index; /* Walk entire namespace from the supplied root */ @@ -204,13 +204,13 @@ acpi_ds_initialize_objects(u32 table_index, } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "\nTable [%4.4s](id %4.4X) - %hd Objects with %hd Devices %hd Methods %hd Regions\n", + "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n", table->signature, owner_id, info.object_count, info.device_count, info.method_count, info.op_region_count)); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "%hd Methods, %hd Regions\n", info.method_count, + "%u Methods, %u Regions\n", info.method_count, info.op_region_count)); return_ACPI_STATUS(AE_OK); diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index 4e5272c313e0..88145820d887 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c @@ -103,8 +103,8 @@ acpi_status acpi_ns_initialize_objects(void) } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd " - "Buffers %hd/%hd Packages (%hd nodes)\n", + "\nInitialized %u/%u Regions %u/%u Fields %u/%u " + "Buffers %u/%u Packages (%u nodes)\n", info.op_region_init, info.op_region_count, info.field_init, info.field_count, info.buffer_init, info.buffer_count, @@ -112,9 +112,9 @@ acpi_status acpi_ns_initialize_objects(void) info.object_count)); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "%hd Control Methods found\n", info.method_count)); + "%u Control Methods found\n", info.method_count)); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "%hd Op Regions found\n", info.op_region_count)); + "%u Op Regions found\n", info.op_region_count)); return_ACPI_STATUS(AE_OK); } -- 2.34.1