ACPICA: Eliminate acpi_native_uint type v2
authorBob Moore <robert.moore@intel.com>
Tue, 10 Jun 2008 05:42:13 +0000 (13:42 +0800)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:03 +0000 (23:27 +0200)
No longer needed; replaced mostly with u32, but also acpi_size
where a type that changes 32/64 bit on 32/64-bit platforms is
required.

v2: Fix a cast of a 32-bit int to a pointer in ACPI to avoid a compiler warning.
from David Howells

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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
48 files changed:
drivers/acpi/bus.c
drivers/acpi/dispatcher/dsinit.c
drivers/acpi/dispatcher/dsopcode.c
drivers/acpi/dispatcher/dswstate.c
drivers/acpi/events/evevent.c
drivers/acpi/events/evgpe.c
drivers/acpi/events/evgpeblk.c
drivers/acpi/events/evmisc.c
drivers/acpi/events/evregion.c
drivers/acpi/events/evrgnini.c
drivers/acpi/executer/exconfig.c
drivers/acpi/executer/exconvrt.c
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exfldio.c
drivers/acpi/executer/exmisc.c
drivers/acpi/executer/exregion.c
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsload.c
drivers/acpi/namespace/nsparse.c
drivers/acpi/namespace/nsutils.c
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/parser/psargs.c
drivers/acpi/parser/psxface.c
drivers/acpi/resources/rscalc.c
drivers/acpi/resources/rsmisc.c
drivers/acpi/resources/rsutils.c
drivers/acpi/tables/tbfadt.c
drivers/acpi/tables/tbfind.c
drivers/acpi/tables/tbinstal.c
drivers/acpi/tables/tbutils.c
drivers/acpi/tables/tbxface.c
drivers/acpi/tables/tbxfroot.c
drivers/acpi/utilities/utcopy.c
drivers/acpi/utilities/utdebug.c
drivers/acpi/utilities/utdelete.c
drivers/acpi/utilities/uteval.c
drivers/acpi/utilities/utmisc.c
drivers/acpi/utilities/utobject.c
include/acpi/acdispat.h
include/acpi/acglobal.h
include/acpi/acmacros.h
include/acpi/acnamesp.h
include/acpi/acpiosxf.h
include/acpi/acpixf.h
include/acpi/acstruct.h
include/acpi/actables.h
include/acpi/actypes.h
include/acpi/acutils.h

index a6dbcf4d9ef57dcdfa93ecc045e51fd60a4b20d1..afb34387d5f284b02709448b70beeb199587e1d4 100644 (file)
@@ -612,7 +612,7 @@ static int __init acpi_bus_init_irq(void)
        return 0;
 }
 
-acpi_native_uint acpi_gbl_permanent_mmap;
+u8 acpi_gbl_permanent_mmap;
 
 
 void __init acpi_early_init(void)
index 610b1ee102b02c9b9e3bdb6f3a5fea8599a7cb1b..949f7c75029ee05380cc23e01f17c6e2d43e6fe1 100644 (file)
@@ -151,7 +151,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
  ******************************************************************************/
 
 acpi_status
-acpi_ds_initialize_objects(acpi_native_uint table_index,
+acpi_ds_initialize_objects(u32 table_index,
                           struct acpi_namespace_node * start_node)
 {
        acpi_status status;
index a818e0ddb996c0bf124a6060adc25cf74f5f2cd4..ac0bfb1b16fe0c9ef6098beac99a4c0e0db4f20e 100644 (file)
@@ -848,7 +848,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
        union acpi_operand_object **operand;
        struct acpi_namespace_node *node;
        union acpi_parse_object *next_op;
-       acpi_native_uint table_index;
+       u32 table_index;
        struct acpi_table_header *table;
 
        ACPI_FUNCTION_TRACE_PTR(ds_eval_table_region_operands, op);
index bda23ed60645d758bb00f0255038a879ebb56183..b00d4af791aaa7829e4c020fdc19680dba1b1433 100644 (file)
@@ -70,7 +70,7 @@ acpi_status
 acpi_ds_result_pop(union acpi_operand_object **object,
                   struct acpi_walk_state *walk_state)
 {
-       acpi_native_uint index;
+       u32 index;
        union acpi_generic_state *state;
        acpi_status status;
 
@@ -122,7 +122,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
                          "Obj=%p [%s] Index=%X State=%p Num=%X\n", *object,
                          acpi_ut_get_object_type_name(*object),
-                         (u32) index, walk_state, walk_state->result_count));
+                         index, walk_state, walk_state->result_count));
 
        return (AE_OK);
 }
@@ -146,7 +146,7 @@ acpi_ds_result_push(union acpi_operand_object * object,
 {
        union acpi_generic_state *state;
        acpi_status status;
-       acpi_native_uint index;
+       u32 index;
 
        ACPI_FUNCTION_NAME(ds_result_push);
 
@@ -400,7 +400,7 @@ void
 acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
                                 struct acpi_walk_state *walk_state)
 {
-       acpi_native_int i;
+       s32 i;
        union acpi_operand_object *obj_desc;
 
        ACPI_FUNCTION_NAME(ds_obj_stack_pop_and_delete);
@@ -409,7 +409,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
                return;
        }
 
-       for (i = (acpi_native_int) (pop_count - 1); i >= 0; i--) {
+       for (i = (s32) pop_count - 1; i >= 0; i--) {
                if (walk_state->num_operands == 0) {
                        return;
                }
index 5d30e5be1b1c73edad8df547dfa1f7ce9eb55809..c56c5c6ea77b9d5c8cd0d35cc794aad5ed3ba16b 100644 (file)
@@ -188,7 +188,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
 
 static acpi_status acpi_ev_fixed_event_initialize(void)
 {
-       acpi_native_uint i;
+       u32 i;
        acpi_status status;
 
        /*
@@ -231,7 +231,7 @@ u32 acpi_ev_fixed_event_detect(void)
        u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
        u32 fixed_status;
        u32 fixed_enable;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_NAME(ev_fixed_event_detect);
 
@@ -260,7 +260,7 @@ u32 acpi_ev_fixed_event_detect(void)
 
                        /* Found an active (signalled) event */
                        acpi_os_fixed_event_count(i);
-                       int_status |= acpi_ev_fixed_event_dispatch((u32) i);
+                       int_status |= acpi_ev_fixed_event_dispatch(i);
                }
        }
 
index ca356e5ae2c3f73e3b2c5b9853d262a2024b3702..c5e53aae86f7c53385f48ec2b30bc47178ed8d45 100644 (file)
@@ -315,7 +315,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
 {
        union acpi_operand_object *obj_desc;
        struct acpi_gpe_block_info *gpe_block;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_ENTRY();
 
@@ -389,8 +389,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
        u32 status_reg;
        u32 enable_reg;
        acpi_cpu_flags flags;
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
 
        ACPI_FUNCTION_NAME(ev_gpe_detect);
 
@@ -472,13 +472,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
                                         */
                                        int_status |=
                                            acpi_ev_gpe_dispatch(&gpe_block->
-                                                                event_info[(i *
-                                                                            ACPI_GPE_REGISTER_WIDTH)
-                                                                           +
-                                                                           j],
-                                                                (u32) j +
-                                                                gpe_register_info->
-                                                                base_gpe_number);
+                                               event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number);
                                }
                        }
                }
index e6c4d4c49e79ee1f1fb4d409e60b949b2cff5e05..73c058e2f5c213b9aa3b8e01f958bc7f81b52d26 100644 (file)
@@ -189,8 +189,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
                            struct acpi_gpe_block_info *gpe_block)
 {
        struct acpi_gpe_event_info *gpe_event_info;
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
 
        ACPI_FUNCTION_TRACE(ev_delete_gpe_handlers);
 
@@ -203,7 +203,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
                for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
                        gpe_event_info =
                            &gpe_block->
-                           event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j];
+                           event_info[((acpi_size) i *
+                                       ACPI_GPE_REGISTER_WIDTH) + j];
 
                        if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
                            ACPI_GPE_DISPATCH_HANDLER) {
@@ -744,8 +745,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
        struct acpi_gpe_event_info *gpe_event_info = NULL;
        struct acpi_gpe_event_info *this_event;
        struct acpi_gpe_register_info *this_register;
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
        acpi_status status;
 
        ACPI_FUNCTION_TRACE(ev_create_gpe_info_blocks);
@@ -983,8 +984,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
        struct acpi_gpe_walk_info gpe_info;
        u32 wake_gpe_count;
        u32 gpe_enabled_count;
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
 
        ACPI_FUNCTION_TRACE(ev_initialize_gpe_block);
 
@@ -1033,7 +1034,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
 
                        gpe_event_info =
                            &gpe_block->
-                           event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j];
+                           event_info[((acpi_size) i *
+                                       ACPI_GPE_REGISTER_WIDTH) + j];
 
                        if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
                             ACPI_GPE_DISPATCH_METHOD)
index 2113e58e2221520b6091155b84ac3ab8b9956197..1d5670be729ab3cc13e8d57c639463adce8788dc 100644 (file)
@@ -575,7 +575,7 @@ acpi_status acpi_ev_release_global_lock(void)
 
 void acpi_ev_terminate(void)
 {
-       acpi_native_uint i;
+       u32 i;
        acpi_status status;
 
        ACPI_FUNCTION_TRACE(ev_terminate);
@@ -589,7 +589,7 @@ void acpi_ev_terminate(void)
                /* Disable all fixed events */
 
                for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
-                       status = acpi_disable_event((u32) i, 0);
+                       status = acpi_disable_event(i, 0);
                        if (ACPI_FAILURE(status)) {
                                ACPI_ERROR((AE_INFO,
                                            "Could not disable fixed event %d",
index 5ab4c01417dfb10fd346b7f143599755a83623c4..236fbd1ca438ae35c1cff68c76cc0df69556b82f 100644 (file)
@@ -81,7 +81,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,
 acpi_status acpi_ev_install_region_handlers(void)
 {
        acpi_status status;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ev_install_region_handlers);
 
@@ -151,7 +151,7 @@ acpi_status acpi_ev_install_region_handlers(void)
 acpi_status acpi_ev_initialize_op_regions(void)
 {
        acpi_status status;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ev_initialize_op_regions);
 
index 2e3d2c5e4f4d2a7a7b4571475646fe970733f1e3..6b94b38df07dd30b77580af0459c81e640776d29 100644 (file)
@@ -380,7 +380,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
        acpi_status status;
        struct acpica_device_id hid;
        struct acpi_compatible_id_list *cid;
-       acpi_native_uint i;
+       u32 i;
 
        /*
         * Get the _HID and check for a PCI Root Bridge
index 39d7421905840f1437c5408d2e4fe47e31f8b68d..2a32c843cb4a384a3557d80293cc4abef5a000ee 100644 (file)
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("exconfig")
 
 /* Local prototypes */
 static acpi_status
-acpi_ex_add_table(acpi_native_uint table_index,
+acpi_ex_add_table(u32 table_index,
                  struct acpi_namespace_node *parent_node,
                  union acpi_operand_object **ddb_handle);
 
@@ -73,7 +73,7 @@ acpi_ex_add_table(acpi_native_uint table_index,
  ******************************************************************************/
 
 static acpi_status
-acpi_ex_add_table(acpi_native_uint table_index,
+acpi_ex_add_table(u32 table_index,
                  struct acpi_namespace_node *parent_node,
                  union acpi_operand_object **ddb_handle)
 {
@@ -96,7 +96,8 @@ acpi_ex_add_table(acpi_native_uint table_index,
 
        /* Install the new table into the local data structures */
 
-       obj_desc->reference.object = ACPI_CAST_PTR(void, table_index);
+       obj_desc->reference.object = ACPI_CAST_PTR(void,
+                       (unsigned long)table_index);
 
        /* Add the table to the namespace */
 
@@ -128,12 +129,12 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
 {
        acpi_status status;
        union acpi_operand_object **operand = &walk_state->operands[0];
-       acpi_native_uint table_index;
        struct acpi_namespace_node *parent_node;
        struct acpi_namespace_node *start_node;
        struct acpi_namespace_node *parameter_node = NULL;
        union acpi_operand_object *ddb_handle;
        struct acpi_table_header *table;
+       u32 table_index;
 
        ACPI_FUNCTION_TRACE(ex_load_table_op);
 
@@ -280,7 +281,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 {
        union acpi_operand_object *ddb_handle;
        struct acpi_table_desc table_desc;
-       acpi_native_uint table_index;
+       u32 table_index;
        acpi_status status;
        u32 length;
 
@@ -437,7 +438,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
 {
        acpi_status status = AE_OK;
        union acpi_operand_object *table_desc = ddb_handle;
-       acpi_native_uint table_index;
+       u32 table_index;
        struct acpi_table_header *table;
 
        ACPI_FUNCTION_TRACE(ex_unload_table);
@@ -454,9 +455,9 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
                return_ACPI_STATUS(AE_BAD_PARAMETER);
        }
 
-       /* Get the table index from the ddb_handle */
+       /* Get the table index from the ddb_handle (acpi_size for 64-bit case) */
 
-       table_index = (acpi_native_uint) table_desc->reference.object;
+       table_index = (u32) (acpi_size) table_desc->reference.object;
 
        /* Invoke table handler if present */
 
index fd954b4ed83d7fc1cfdbaaa4a42c41e9fbc89473..261d97516d9b3cf69451f0559560b846b265a875 100644 (file)
@@ -288,11 +288,11 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
                         u16 base, u8 * string, u8 data_width)
 {
        acpi_integer digit;
-       acpi_native_uint i;
-       acpi_native_uint j;
-       acpi_native_uint k = 0;
-       acpi_native_uint hex_length;
-       acpi_native_uint decimal_length;
+       u32 i;
+       u32 j;
+       u32 k = 0;
+       u32 hex_length;
+       u32 decimal_length;
        u32 remainder;
        u8 supress_zeros;
 
@@ -348,7 +348,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
 
                /* hex_length: 2 ascii hex chars per data byte */
 
-               hex_length = (acpi_native_uint) ACPI_MUL_2(data_width);
+               hex_length = ACPI_MUL_2(data_width);
                for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {
 
                        /* Get one hex digit, most significant digits first */
index 74f1b22601b39b4b5106966d211c12fdd62946ee..976016fda66a7484496b742f7cfbec53d8eea84a 100644 (file)
@@ -775,7 +775,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
                      u32 num_levels,
                      char *note, char *module_name, u32 line_number)
 {
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_NAME(ex_dump_operands);
 
index e336b5dc7a50431720fa4aa437b85c5f1fd0ff94..9ff9d1f4615d8841eac8650bf4605e7e3cfb24fa 100644 (file)
@@ -153,14 +153,15 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
                        /*
                         * Slack mode only:  We will go ahead and allow access to this
                         * field if it is within the region length rounded up to the next
-                        * access width boundary.
+                        * access width boundary. acpi_size cast for 64-bit compile.
                         */
                        if (ACPI_ROUND_UP(rgn_desc->region.length,
                                          obj_desc->common_field.
                                          access_byte_width) >=
-                           (obj_desc->common_field.base_byte_offset +
-                            (acpi_native_uint) obj_desc->common_field.
-                            access_byte_width + field_datum_byte_offset)) {
+                           ((acpi_size) obj_desc->common_field.
+                            base_byte_offset +
+                            obj_desc->common_field.access_byte_width +
+                            field_datum_byte_offset)) {
                                return_ACPI_STATUS(AE_OK);
                        }
                }
index cc956a5b5267b5e0564b2836b235803bfc170182..731414a581a6226f1d8c53fed278123465b6253c 100644 (file)
@@ -329,8 +329,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
 
                /* Result of two Strings is a String */
 
-               return_desc = acpi_ut_create_string_object((acpi_size)
-                                                          (operand0->string.
+               return_desc = acpi_ut_create_string_object(((acpi_size)
+                                                           operand0->string.
                                                            length +
                                                            local_operand1->
                                                            string.length));
@@ -352,8 +352,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
 
                /* Result of two Buffers is a Buffer */
 
-               return_desc = acpi_ut_create_buffer_object((acpi_size)
-                                                          (operand0->buffer.
+               return_desc = acpi_ut_create_buffer_object(((acpi_size)
+                                                           operand0->buffer.
                                                            length +
                                                            local_operand1->
                                                            buffer.length));
index 7cd8bb54fa016ba38aa07a7f1109e8304a7a8c05..7a41c409ae4d89e14165c8f28bdc131d88d1b5e1 100644 (file)
@@ -156,7 +156,7 @@ acpi_ex_system_memory_space_handler(u32 function,
                /* Create a new mapping starting at the address given */
 
                mem_info->mapped_logical_address =
-                   acpi_os_map_memory((acpi_native_uint) address, window_size);
+                       acpi_os_map_memory((acpi_physical_address) address, window_size);
                if (!mem_info->mapped_logical_address) {
                        ACPI_ERROR((AE_INFO,
                                    "Could not map memory at %8.8X%8.8X, size %X",
index 5445751b8a3e7ee6e9f3eae788fc297995d36d43..904f9510c0e29bdb5d34623daceb4a2108d8c1b6 100644 (file)
@@ -73,7 +73,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
 
 void acpi_ns_print_pathname(u32 num_segments, char *pathname)
 {
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_NAME(ns_print_pathname);
 
index 2c92f6cf5ce173c94a4a2aeaf64294e036089ded..a4a412b7c029526faabd771b3742fd65db3ba7a3 100644 (file)
@@ -71,8 +71,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle);
  ******************************************************************************/
 
 acpi_status
-acpi_ns_load_table(acpi_native_uint table_index,
-                  struct acpi_namespace_node *node)
+acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node)
 {
        acpi_status status;
 
index 46a79b0103b676ef5edf0008f40f70f1eb0ad80a..a82271a9dbb3d5b42495f7f10a809313730fc1c3 100644 (file)
@@ -63,13 +63,13 @@ ACPI_MODULE_NAME("nsparse")
  *
  ******************************************************************************/
 acpi_status
-acpi_ns_one_complete_parse(acpi_native_uint pass_number,
-                          acpi_native_uint table_index,
-                          struct acpi_namespace_node * start_node)
+acpi_ns_one_complete_parse(u32 pass_number,
+                          u32 table_index,
+                          struct acpi_namespace_node *start_node)
 {
        union acpi_parse_object *parse_root;
        acpi_status status;
-       acpi_native_uint aml_length;
+       u32 aml_length;
        u8 *aml_start;
        struct acpi_walk_state *walk_state;
        struct acpi_table_header *table;
@@ -112,8 +112,8 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
                aml_start = (u8 *) table + sizeof(struct acpi_table_header);
                aml_length = table->length - sizeof(struct acpi_table_header);
                status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
-                                              aml_start, (u32) aml_length,
-                                              NULL, (u8) pass_number);
+                                              aml_start, aml_length, NULL,
+                                              (u8) pass_number);
        }
 
        if (ACPI_FAILURE(status)) {
@@ -158,8 +158,7 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
  ******************************************************************************/
 
 acpi_status
-acpi_ns_parse_table(acpi_native_uint table_index,
-                   struct acpi_namespace_node *start_node)
+acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node)
 {
        acpi_status status;
 
index 64c039843ed2ba9efb6da4df7978c5cce674811d..5b5619c545940b5bc437de830c73e4df07a23534 100644 (file)
@@ -365,7 +365,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
        char *internal_name = info->internal_name;
        char *external_name = info->next_external_char;
        char *result = NULL;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ns_build_internal_name);
 
@@ -400,12 +400,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
                        result = &internal_name[i];
                } else if (num_segments == 2) {
                        internal_name[i] = AML_DUAL_NAME_PREFIX;
-                       result = &internal_name[(acpi_native_uint) (i + 1)];
+                       result = &internal_name[(acpi_size) i + 1];
                } else {
                        internal_name[i] = AML_MULTI_NAME_PREFIX_OP;
-                       internal_name[(acpi_native_uint) (i + 1)] =
-                           (char)num_segments;
-                       result = &internal_name[(acpi_native_uint) (i + 2)];
+                       internal_name[(acpi_size) i + 1] = (char)num_segments;
+                       result = &internal_name[(acpi_size) i + 2];
                }
        }
 
@@ -531,12 +530,12 @@ acpi_ns_externalize_name(u32 internal_name_length,
                         char *internal_name,
                         u32 * converted_name_length, char **converted_name)
 {
-       acpi_native_uint names_index = 0;
-       acpi_native_uint num_segments = 0;
-       acpi_native_uint required_length;
-       acpi_native_uint prefix_length = 0;
-       acpi_native_uint i = 0;
-       acpi_native_uint j = 0;
+       u32 names_index = 0;
+       u32 num_segments = 0;
+       u32 required_length;
+       u32 prefix_length = 0;
+       u32 i = 0;
+       u32 j = 0;
 
        ACPI_FUNCTION_TRACE(ns_externalize_name);
 
@@ -582,9 +581,8 @@ acpi_ns_externalize_name(u32 internal_name_length,
                        /* <count> 4-byte names */
 
                        names_index = prefix_length + 2;
-                       num_segments = (acpi_native_uint) (u8)
-                           internal_name[(acpi_native_uint)
-                                         (prefix_length + 1)];
+                       num_segments = (u8)
+                           internal_name[(acpi_size) prefix_length + 1];
                        break;
 
                case AML_DUAL_NAME_PREFIX:
index b4e135eab7c7c49b16eed0cc1529d92d7f7943e7..38be5865d95df30e382f21b2adb8d2b6837aa2f9 100644 (file)
@@ -441,7 +441,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
        u32 flags;
        struct acpica_device_id hid;
        struct acpi_compatible_id_list *cid;
-       acpi_native_uint i;
+       u32 i;
        int found;
 
        status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
index e94463778845567ce02f6494fb9580bf2da85512..d830b29b85b120ceb87f793f4ddde61db98fbd4f 100644 (file)
@@ -76,7 +76,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)
 {
        u8 *aml = parser_state->aml;
        u32 package_length = 0;
-       acpi_native_uint byte_count;
+       u32 byte_count;
        u8 byte_zero_mask = 0x3F;       /* Default [0:5] */
 
        ACPI_FUNCTION_TRACE(ps_get_next_package_length);
@@ -86,7 +86,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)
         * used to encode the package length, either 0,1,2, or 3
         */
        byte_count = (aml[0] >> 6);
-       parser_state->aml += (byte_count + 1);
+       parser_state->aml += ((acpi_size) byte_count + 1);
 
        /* Get bytes 3, 2, 1 as needed */
 
index 5ee09e1245e3b3fa37bf02840bdd6a42fdfd993a..270469aae8429201df4edfae11db91d8c5628133 100644 (file)
@@ -333,7 +333,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
 static void
 acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action)
 {
-       acpi_native_uint i;
+       u32 i;
 
        if (info->parameters) {
 
index 8a112d11d491eebac39708e4d0d1cc59e3f4fc96..f61ebc679e6645514525a1f5d632c87acbdfd751 100644 (file)
@@ -73,7 +73,7 @@ acpi_rs_stream_option_length(u32 resource_length, u32 minimum_total_length);
 
 static u8 acpi_rs_count_set_bits(u16 bit_field)
 {
-       acpi_native_uint bits_set;
+       u8 bits_set;
 
        ACPI_FUNCTION_ENTRY();
 
@@ -84,7 +84,7 @@ static u8 acpi_rs_count_set_bits(u16 bit_field)
                bit_field &= (u16) (bit_field - 1);
        }
 
-       return ((u8) bits_set);
+       return bits_set;
 }
 
 /*******************************************************************************
index de1ac3881b224ab1121a5edd97409aecf7831071..96a6c0353255fed289e059dab481624f651681a3 100644 (file)
@@ -82,7 +82,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
 
        ACPI_FUNCTION_TRACE(rs_convert_aml_to_resource);
 
-       if (((acpi_native_uint) resource) & 0x3) {
+       if (((acpi_size) resource) & 0x3) {
 
                /* Each internal resource struct is expected to be 32-bit aligned */
 
index 90ed83d05375a078cfae330e9ffe2173144bbb51..f7b3bcd59ba788e341c9b5aca199a108aeed873b 100644 (file)
@@ -62,7 +62,7 @@ ACPI_MODULE_NAME("rsutils")
  ******************************************************************************/
 u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
 {
-       acpi_native_uint i;
+       u8 i;
        u8 bit_count;
 
        ACPI_FUNCTION_ENTRY();
@@ -71,7 +71,7 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
 
        for (i = 0, bit_count = 0; mask; i++) {
                if (mask & 0x0001) {
-                       list[bit_count] = (u8) i;
+                       list[bit_count] = i;
                        bit_count++;
                }
 
@@ -96,8 +96,8 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
 
 u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
 {
-       acpi_native_uint i;
-       acpi_native_uint mask;
+       u32 i;
+       u16 mask;
 
        ACPI_FUNCTION_ENTRY();
 
@@ -107,7 +107,7 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
                mask |= (0x1 << list[i]);
        }
 
-       return ((u16) mask);
+       return mask;
 }
 
 /*******************************************************************************
@@ -130,7 +130,7 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
 void
 acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
 {
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_ENTRY();
 
index 949d4114eb9feb92ae17ff7183d4cc4b314d0d45..a4a41ba2484b93404ae948e3d50e5dcff81577a1 100644 (file)
@@ -155,7 +155,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
  *
  ******************************************************************************/
 
-void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
+void acpi_tb_parse_fadt(u32 table_index, u8 flags)
 {
        u32 length;
        struct acpi_table_header *table;
@@ -280,7 +280,7 @@ static void acpi_tb_convert_fadt(void)
 {
        u8 pm1_register_length;
        struct acpi_generic_address *target;
-       acpi_native_uint i;
+       u32 i;
 
        /* Update the local FADT table header length */
 
@@ -396,7 +396,7 @@ static void acpi_tb_validate_fadt(void)
        u32 *address32;
        struct acpi_generic_address *address64;
        u8 length;
-       acpi_native_uint i;
+       u32 i;
 
        /* Examine all of the 64-bit extended address fields (X fields) */
 
index 9ca3afc98c80027fe46fc037678520b33f3126ad..531584defbb826596c742acb2b5c9a90a3b45fc1 100644 (file)
@@ -65,10 +65,9 @@ ACPI_MODULE_NAME("tbfind")
  ******************************************************************************/
 acpi_status
 acpi_tb_find_table(char *signature,
-                  char *oem_id,
-                  char *oem_table_id, acpi_native_uint * table_index)
+                  char *oem_id, char *oem_table_id, u32 *table_index)
 {
-       acpi_native_uint i;
+       u32 i;
        acpi_status status;
        struct acpi_table_header header;
 
index 5336ce88f89f74b47790be39ceadabd8a5b345b3..b22185f55a16acf80e9814059acff89a4a1e508b 100644 (file)
@@ -107,11 +107,10 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
  ******************************************************************************/
 
 acpi_status
-acpi_tb_add_table(struct acpi_table_desc *table_desc,
-                 acpi_native_uint * table_index)
+acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
 {
-       acpi_native_uint i;
-       acpi_native_uint length;
+       u32 i;
+       u32 length;
        acpi_status status = AE_OK;
 
        ACPI_FUNCTION_TRACE(tb_add_table);
@@ -207,8 +206,8 @@ acpi_status acpi_tb_resize_root_table_list(void)
 
        /* Increase the Table Array size */
 
-       tables = ACPI_ALLOCATE_ZEROED((acpi_gbl_root_table_list.size +
-                                      ACPI_ROOT_TABLE_SIZE_INCREMENT)
+       tables = ACPI_ALLOCATE_ZEROED(((acpi_size) acpi_gbl_root_table_list.
+                                      size + ACPI_ROOT_TABLE_SIZE_INCREMENT)
                                      * sizeof(struct acpi_table_desc));
        if (!tables) {
                ACPI_ERROR((AE_INFO,
@@ -220,7 +219,7 @@ acpi_status acpi_tb_resize_root_table_list(void)
 
        if (acpi_gbl_root_table_list.tables) {
                ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables,
-                           acpi_gbl_root_table_list.size *
+                           (acpi_size) acpi_gbl_root_table_list.size *
                            sizeof(struct acpi_table_desc));
 
                if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
@@ -253,7 +252,7 @@ acpi_status acpi_tb_resize_root_table_list(void)
 acpi_status
 acpi_tb_store_table(acpi_physical_address address,
                    struct acpi_table_header *table,
-                   u32 length, u8 flags, acpi_native_uint * table_index)
+                   u32 length, u8 flags, u32 *table_index)
 {
        acpi_status status = AE_OK;
 
@@ -334,7 +333,7 @@ void acpi_tb_delete_table(struct acpi_table_desc *table_desc)
 
 void acpi_tb_terminate(void)
 {
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(tb_terminate);
 
@@ -374,7 +373,7 @@ void acpi_tb_terminate(void)
  *
  ******************************************************************************/
 
-void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index)
+void acpi_tb_delete_namespace_by_owner(u32 table_index)
 {
        acpi_owner_id owner_id;
 
@@ -403,7 +402,7 @@ void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index)
  *
  ******************************************************************************/
 
-acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index)
+acpi_status acpi_tb_allocate_owner_id(u32 table_index)
 {
        acpi_status status = AE_BAD_PARAMETER;
 
@@ -431,7 +430,7 @@ acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index)
  *
  ******************************************************************************/
 
-acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index)
+acpi_status acpi_tb_release_owner_id(u32 table_index)
 {
        acpi_status status = AE_BAD_PARAMETER;
 
@@ -462,8 +461,7 @@ acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index)
  *
  ******************************************************************************/
 
-acpi_status
-acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id)
+acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id)
 {
        acpi_status status = AE_BAD_PARAMETER;
 
@@ -490,7 +488,7 @@ acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id)
  *
  ******************************************************************************/
 
-u8 acpi_tb_is_table_loaded(acpi_native_uint table_index)
+u8 acpi_tb_is_table_loaded(u32 table_index)
 {
        u8 is_loaded = FALSE;
 
@@ -518,7 +516,7 @@ u8 acpi_tb_is_table_loaded(acpi_native_uint table_index)
  *
  ******************************************************************************/
 
-void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded)
+void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded)
 {
 
        (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
index bc019b9b6a68ec7e690c17da8aa5751e62cdbe30..0cc92ef5236fc261a2167a5a6aa8acb9fbe43d55 100644 (file)
@@ -49,8 +49,8 @@ ACPI_MODULE_NAME("tbutils")
 
 /* Local prototypes */
 static acpi_physical_address
-acpi_tb_get_root_table_entry(u8 * table_entry,
-                            acpi_native_uint table_entry_size);
+acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_check_xsdt
@@ -238,7 +238,7 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
  *
  ******************************************************************************/
 
-u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)
+u8 acpi_tb_checksum(u8 *buffer, u32 length)
 {
        u8 sum = 0;
        u8 *end = buffer + length;
@@ -268,7 +268,7 @@ u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)
 
 void
 acpi_tb_install_table(acpi_physical_address address,
-                     u8 flags, char *signature, acpi_native_uint table_index)
+                     u8 flags, char *signature, u32 table_index)
 {
        struct acpi_table_header *table;
 
@@ -336,8 +336,7 @@ acpi_tb_install_table(acpi_physical_address address,
  ******************************************************************************/
 
 static acpi_physical_address
-acpi_tb_get_root_table_entry(u8 * table_entry,
-                            acpi_native_uint table_entry_size)
+acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
 {
        u64 address64;
 
@@ -395,8 +394,8 @@ acpi_status __init
 acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
 {
        struct acpi_table_rsdp *rsdp;
-       acpi_native_uint table_entry_size;
-       acpi_native_uint i;
+       u32 table_entry_size;
+       u32 i;
        u32 table_count;
        struct acpi_table_header *table;
        acpi_physical_address address;
index 0e319604d3e78fe5e197a2fcd4f6140cf0a1dcd3..fd7770aa10618e256816350fe2638b78bb9af450 100644 (file)
@@ -125,7 +125,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
                /* Root Table Array has been statically allocated by the host */
 
                ACPI_MEMSET(initial_table_array, 0,
-                           initial_table_count *
+                           (acpi_size) initial_table_count *
                            sizeof(struct acpi_table_desc));
 
                acpi_gbl_root_table_list.tables = initial_table_array;
@@ -183,9 +183,9 @@ acpi_status acpi_reallocate_root_table(void)
                return_ACPI_STATUS(AE_SUPPORT);
        }
 
-       new_size =
-           (acpi_gbl_root_table_list.count +
-            ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc);
+       new_size = ((acpi_size) acpi_gbl_root_table_list.count +
+                   ACPI_ROOT_TABLE_SIZE_INCREMENT) *
+           sizeof(struct acpi_table_desc);
 
        /* Create new array and copy the old array */
 
@@ -222,7 +222,7 @@ acpi_status acpi_reallocate_root_table(void)
 acpi_status acpi_load_table(struct acpi_table_header *table_ptr)
 {
        acpi_status status;
-       acpi_native_uint table_index;
+       u32 table_index;
        struct acpi_table_desc table_desc;
 
        if (!table_ptr)
@@ -264,11 +264,10 @@ ACPI_EXPORT_SYMBOL(acpi_load_table)
  *****************************************************************************/
 acpi_status
 acpi_get_table_header(char *signature,
-                     acpi_native_uint instance,
-                     struct acpi_table_header * out_table_header)
+                     u32 instance, struct acpi_table_header *out_table_header)
 {
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
        struct acpi_table_header *header;
 
        /* Parameter validation */
@@ -378,10 +377,10 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id)
  *****************************************************************************/
 acpi_status
 acpi_get_table(char *signature,
-              acpi_native_uint instance, struct acpi_table_header **out_table)
+              u32 instance, struct acpi_table_header **out_table)
 {
-       acpi_native_uint i;
-       acpi_native_uint j;
+       u32 i;
+       u32 j;
        acpi_status status;
 
        /* Parameter validation */
@@ -435,8 +434,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table)
  *
  ******************************************************************************/
 acpi_status
-acpi_get_table_by_index(acpi_native_uint table_index,
-                       struct acpi_table_header ** table)
+acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table)
 {
        acpi_status status;
 
@@ -493,7 +491,7 @@ static acpi_status acpi_tb_load_namespace(void)
 {
        acpi_status status;
        struct acpi_table_header *table;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(tb_load_namespace);
 
index b8c0dfa084f621e9c9731d75245cfe19fd06fc12..2d157e0f98d2716d3965f4390fcf6db1ae60edba 100644 (file)
@@ -118,7 +118,7 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
  *
  ******************************************************************************/
 
-acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)
+acpi_status acpi_find_root_pointer(acpi_size *table_address)
 {
        u8 *table_ptr;
        u8 *mem_rover;
@@ -153,7 +153,7 @@ acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)
                 * 1b) Search EBDA paragraphs (EBDA is required to be a
                 *     minimum of 1_k length)
                 */
-               table_ptr = acpi_os_map_memory((acpi_native_uint)
+               table_ptr = acpi_os_map_memory((acpi_physical_address)
                                               physical_address,
                                               ACPI_EBDA_WINDOW_SIZE);
                if (!table_ptr) {
index 655c290aca7b6bb95c69b7147ff4fda7b0d0ca13..53499ac90988a19477b39bd9c0113c14594cbf5f 100644 (file)
@@ -572,7 +572,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,
        acpi_status status = AE_OK;
        union acpi_operand_object *package_object;
        union acpi_operand_object **package_elements;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage);
 
@@ -599,7 +599,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,
 
                        /* Truncate package and delete it */
 
-                       package_object->package.count = (u32) i;
+                       package_object->package.count = i;
                        package_elements[i] = NULL;
                        acpi_ut_remove_reference(package_object);
                        return_ACPI_STATUS(status);
index f938f465efa4df6d0c2bd03f9dab870b7ec7e0f7..3919fe599f947d1e25a357b0a6a3ea3889ca10e6 100644 (file)
@@ -519,8 +519,8 @@ acpi_ut_ptr_exit(u32 line_number,
 
 void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
 {
-       acpi_native_uint i = 0;
-       acpi_native_uint j;
+       u32 i = 0;
+       u32 j;
        u32 temp32;
        u8 buf_char;
 
@@ -539,7 +539,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
 
                /* Print current offset */
 
-               acpi_os_printf("%6.4X: ", (u32) i);
+               acpi_os_printf("%6.4X: ", i);
 
                /* Print 16 hex chars */
 
@@ -549,7 +549,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
                                /* Dump fill spaces */
 
                                acpi_os_printf("%*s", ((display * 2) + 1), " ");
-                               j += (acpi_native_uint) display;
+                               j += display;
                                continue;
                        }
 
@@ -557,32 +557,38 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
                        case DB_BYTE_DISPLAY:
                        default:        /* Default is BYTE display */
 
-                               acpi_os_printf("%02X ", buffer[i + j]);
+                               acpi_os_printf("%02X ",
+                                              buffer[(acpi_size) i + j]);
                                break;
 
                        case DB_WORD_DISPLAY:
 
-                               ACPI_MOVE_16_TO_32(&temp32, &buffer[i + j]);
+                               ACPI_MOVE_16_TO_32(&temp32,
+                                                  &buffer[(acpi_size) i + j]);
                                acpi_os_printf("%04X ", temp32);
                                break;
 
                        case DB_DWORD_DISPLAY:
 
-                               ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]);
+                               ACPI_MOVE_32_TO_32(&temp32,
+                                                  &buffer[(acpi_size) i + j]);
                                acpi_os_printf("%08X ", temp32);
                                break;
 
                        case DB_QWORD_DISPLAY:
 
-                               ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]);
+                               ACPI_MOVE_32_TO_32(&temp32,
+                                                  &buffer[(acpi_size) i + j]);
                                acpi_os_printf("%08X", temp32);
 
-                               ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j + 4]);
+                               ACPI_MOVE_32_TO_32(&temp32,
+                                                  &buffer[(acpi_size) i + j +
+                                                          4]);
                                acpi_os_printf("%08X ", temp32);
                                break;
                        }
 
-                       j += (acpi_native_uint) display;
+                       j += display;
                }
 
                /*
@@ -596,7 +602,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
                                return;
                        }
 
-                       buf_char = buffer[i + j];
+                       buf_char = buffer[(acpi_size) i + j];
                        if (ACPI_IS_PRINT(buf_char)) {
                                acpi_os_printf("%c", buf_char);
                        } else {
index 1fbc35139e84ebdd85d1c5de4b89c24f04c8e549..c5c791a575c9203f63c0a44ad07ad93487282643 100644 (file)
@@ -442,7 +442,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
        union acpi_generic_state *state_list = NULL;
        union acpi_operand_object *next_object = NULL;
        union acpi_generic_state *state;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object);
 
index 7f1f6341242d89fc3cbbdebde8a33d5a717008f2..352747e49c7a623930fd17491533a436394099ad 100644 (file)
@@ -97,7 +97,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
        acpi_status status;
        union acpi_operand_object *string_desc;
        union acpi_operand_object *return_desc;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ut_osi_implementation);
 
@@ -513,7 +513,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node,
        u32 count;
        u32 size;
        struct acpi_compatible_id_list *cid_list;
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_TRACE(ut_execute_CID);
 
index 47354d9b0e568e365bb6cea8d2e15491dcb43c10..6175ca5d73bfdfff87f349eb138d9fe8b1d6b0c3 100644 (file)
@@ -161,9 +161,9 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
 
 acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
 {
-       acpi_native_uint i;
-       acpi_native_uint j;
-       acpi_native_uint k;
+       u32 i;
+       u32 j;
+       u32 k;
        acpi_status status;
 
        ACPI_FUNCTION_TRACE(ut_allocate_owner_id);
@@ -269,7 +269,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
 {
        acpi_owner_id owner_id = *owner_id_ptr;
        acpi_status status;
-       acpi_native_uint index;
+       u32 index;
        u32 bit;
 
        ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id);
@@ -589,7 +589,7 @@ acpi_ut_display_init_pathname(u8 type,
  *
  ******************************************************************************/
 
-u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position)
+u8 acpi_ut_valid_acpi_char(char character, u32 position)
 {
 
        if (!((character >= 'A' && character <= 'Z') ||
@@ -624,7 +624,7 @@ u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position)
 
 u8 acpi_ut_valid_acpi_name(u32 name)
 {
-       acpi_native_uint i;
+       u32 i;
 
        ACPI_FUNCTION_ENTRY();
 
@@ -653,7 +653,7 @@ u8 acpi_ut_valid_acpi_name(u32 name)
 
 acpi_name acpi_ut_repair_name(char *name)
 {
-       acpi_native_uint i;
+       u32 i;
        char new_name[ACPI_NAME_SIZE];
 
        for (i = 0; i < ACPI_NAME_SIZE; i++) {
index e68466de80447c7068ffbd740ff9f265a22421fd..ede6a80837dfe5b7e38bb018364e6a7cbe9da77a 100644 (file)
@@ -175,8 +175,8 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)
         * Create the element array. Count+1 allows the array to be null
         * terminated.
         */
-       package_elements = ACPI_ALLOCATE_ZEROED((acpi_size)
-                                               (count + 1) * sizeof(void *));
+       package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count +
+                                                1) * sizeof(void *));
        if (!package_elements) {
                acpi_ut_remove_reference(package_desc);
                return_PTR(NULL);
index 910f018d92c74333a8a340e0f27f5a98951f4175..21a73a105d0ab2920962c4febb1e6a2d795dd263 100644 (file)
@@ -221,7 +221,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
  * dsinit
  */
 acpi_status
-acpi_ds_initialize_objects(acpi_native_uint table_index,
+acpi_ds_initialize_objects(u32 table_index,
                           struct acpi_namespace_node *start_node);
 
 /*
index 74ad971241dbb6cb46a733dc02dc0b894eb59e64..15dda46b70d1c1e36c949d9555efc7a805ccf321 100644 (file)
@@ -140,7 +140,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
  */
 ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
 ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
-extern acpi_native_uint acpi_gbl_permanent_mmap;
+extern u8 acpi_gbl_permanent_mmap;
 
 /* These addresses are calculated from FADT address values */
 
index 5ad6e39923044c473ed027d39514fb29e692b29a..d0494ea74b22df25efa9743c76b0f20f0f0a1dc5 100644 (file)
  */
 #define ACPI_CAST_PTR(t, p)             ((t *) (acpi_uintptr_t) (p))
 #define ACPI_CAST_INDIRECT_PTR(t, p)    ((t **) (acpi_uintptr_t) (p))
-#define ACPI_ADD_PTR(t,a,b)             ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b)))
-#define ACPI_PTR_DIFF(a,b)              (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b)))
+#define ACPI_ADD_PTR(t, a, b)          ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_size)(b)))
+#define ACPI_PTR_DIFF(a, b)            (acpi_size) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b)))
 
 /* Pointer/Integer type conversions */
 
-#define ACPI_TO_POINTER(i)              ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i)
+#define ACPI_TO_POINTER(i)             ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)
 #define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p,(void *) NULL)
 #define ACPI_OFFSET(d,f)                (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
 #define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
@@ -296,22 +296,22 @@ struct acpi_integer_overlay {
 /*
  * Rounding macros (Power of two boundaries only)
  */
-#define ACPI_ROUND_DOWN(value,boundary)     (((acpi_native_uint)(value)) & \
-                                                                                               (~(((acpi_native_uint) boundary)-1)))
+#define ACPI_ROUND_DOWN(value, boundary)     (((acpi_size)(value)) & \
+                                               (~(((acpi_size) boundary)-1)))
 
-#define ACPI_ROUND_UP(value,boundary)       ((((acpi_native_uint)(value)) + \
-                                                                                               (((acpi_native_uint) boundary)-1)) & \
-                                                                                               (~(((acpi_native_uint) boundary)-1)))
+#define ACPI_ROUND_UP(value, boundary)      ((((acpi_size)(value)) + \
+                                               (((acpi_size) boundary)-1)) & \
+                                               (~(((acpi_size) boundary)-1)))
 
-/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */
+/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */
 
 #define ACPI_ROUND_DOWN_TO_32BIT(a)         ACPI_ROUND_DOWN(a,4)
 #define ACPI_ROUND_DOWN_TO_64BIT(a)         ACPI_ROUND_DOWN(a,8)
-#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a)   ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint))
+#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a)   ACPI_ROUND_DOWN(a,sizeof(acpi_size))
 
 #define ACPI_ROUND_UP_TO_32BIT(a)           ACPI_ROUND_UP(a,4)
 #define ACPI_ROUND_UP_TO_64BIT(a)           ACPI_ROUND_UP(a,8)
-#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)     ACPI_ROUND_UP(a,sizeof(acpi_native_uint))
+#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)     ACPI_ROUND_UP(a,sizeof(acpi_size))
 
 #define ACPI_ROUND_BITS_UP_TO_BYTES(a)      ACPI_DIV_8((a) + 7)
 #define ACPI_ROUND_BITS_DOWN_TO_BYTES(a)    ACPI_DIV_8((a))
@@ -322,7 +322,7 @@ struct acpi_integer_overlay {
 
 #define ACPI_ROUND_UP_TO(value,boundary)    (((value) + ((boundary)-1)) / (boundary))
 
-#define ACPI_IS_MISALIGNED(value)           (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1))
+#define ACPI_IS_MISALIGNED(value)          (((acpi_size)value) & (sizeof(acpi_size)-1))
 
 /*
  * Bitmask creation
index 713b30903fe54c2260e8ba07098359b6fadfddd6..d622c309002e13d42b97db6e902cb3b3f1185319 100644 (file)
@@ -86,8 +86,7 @@ acpi_status acpi_ns_initialize_devices(void);
 acpi_status acpi_ns_load_namespace(void);
 
 acpi_status
-acpi_ns_load_table(acpi_native_uint table_index,
-                  struct acpi_namespace_node *node);
+acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node);
 
 /*
  * nswalk - walk the namespace
@@ -108,12 +107,11 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct
  * nsparse - table parsing
  */
 acpi_status
-acpi_ns_parse_table(acpi_native_uint table_index,
-                   struct acpi_namespace_node *start_node);
+acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node);
 
 acpi_status
-acpi_ns_one_complete_parse(acpi_native_uint pass_number,
-                          acpi_native_uint table_index,
+acpi_ns_one_complete_parse(u32 pass_number,
+                          u32 table_index,
                           struct acpi_namespace_node *start_node);
 
 /*
index d4a560d2deb61f05f3fe56d2b4affe515926c931..3f93a6b4e17fe61ccd6735dd84a78b89edc8dc0d 100644 (file)
@@ -144,7 +144,7 @@ void acpi_os_release_mutex(acpi_mutex handle);
 void *acpi_os_allocate(acpi_size size);
 
 void __iomem *acpi_os_map_memory(acpi_physical_address where,
-                                acpi_native_uint length);
+                               acpi_size length);
 
 void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
 
index 2c3806e6546f278656ffb0342486fccc28c7643f..bd95ecc6e0faabc965ab4176fb2fa6b96f9f306a 100644 (file)
@@ -98,7 +98,7 @@ void acpi_free(void *address);
  */
 acpi_status acpi_reallocate_root_table(void);
 
-acpi_status acpi_find_root_pointer(acpi_native_uint * rsdp_address);
+acpi_status acpi_find_root_pointer(acpi_size *rsdp_address);
 
 acpi_status acpi_load_tables(void);
 
@@ -108,15 +108,15 @@ acpi_status acpi_unload_table_id(acpi_owner_id id);
 
 acpi_status
 acpi_get_table_header(acpi_string signature,
-                     acpi_native_uint instance,
+                     u32 instance,
                      struct acpi_table_header *out_table_header);
 
 acpi_status
 acpi_get_table(acpi_string signature,
-              acpi_native_uint instance, struct acpi_table_header **out_table);
+              u32 instance, struct acpi_table_header **out_table);
 
 acpi_status
-acpi_get_table_by_index(acpi_native_uint table_index,
+acpi_get_table_by_index(u32 table_index,
                        struct acpi_table_header **out_table);
 
 acpi_status
index 818c24d7d2d12ef681ddbb54607c38cc8a9f5899..7980a26bad356240038584568b6b0ce404c562fe 100644 (file)
@@ -142,7 +142,7 @@ struct acpi_init_walk_info {
        u16 package_init;
        u16 object_count;
        acpi_owner_id owner_id;
-       acpi_native_uint table_index;
+       u32 table_index;
 };
 
 struct acpi_get_devices_info {
index 4b36a55b0b3bceed7ba441b9a9121825abd631f3..0cbe1b9ab52249e38adcd12c5fe0c8009d8ebbd9 100644 (file)
@@ -49,7 +49,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count);
 /*
  * tbfadt - FADT parse/convert/validate
  */
-void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags);
+void acpi_tb_parse_fadt(u32 table_index, u8 flags);
 
 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
 
@@ -58,8 +58,7 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
  */
 acpi_status
 acpi_tb_find_table(char *signature,
-                  char *oem_id,
-                  char *oem_table_id, acpi_native_uint * table_index);
+                  char *oem_id, char *oem_table_id, u32 *table_index);
 
 /*
  * tbinstal - Table removal and deletion
@@ -69,30 +68,28 @@ acpi_status acpi_tb_resize_root_table_list(void);
 acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc);
 
 acpi_status
-acpi_tb_add_table(struct acpi_table_desc *table_desc,
-                 acpi_native_uint * table_index);
+acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index);
 
 acpi_status
 acpi_tb_store_table(acpi_physical_address address,
                    struct acpi_table_header *table,
-                   u32 length, u8 flags, acpi_native_uint * table_index);
+                   u32 length, u8 flags, u32 *table_index);
 
 void acpi_tb_delete_table(struct acpi_table_desc *table_desc);
 
 void acpi_tb_terminate(void);
 
-void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index);
+void acpi_tb_delete_namespace_by_owner(u32 table_index);
 
-acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index);
+acpi_status acpi_tb_allocate_owner_id(u32 table_index);
 
-acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index);
+acpi_status acpi_tb_release_owner_id(u32 table_index);
 
-acpi_status
-acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id);
+acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id);
 
-u8 acpi_tb_is_table_loaded(acpi_native_uint table_index);
+u8 acpi_tb_is_table_loaded(u32 table_index);
 
-void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 is_loaded);
+void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
 
 /*
  * tbutils - table manager utilities
@@ -103,14 +100,14 @@ void
 acpi_tb_print_table_header(acpi_physical_address address,
                           struct acpi_table_header *header);
 
-u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length);
+u8 acpi_tb_checksum(u8 *buffer, u32 length);
 
 acpi_status
 acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
 
 void
 acpi_tb_install_table(acpi_physical_address address,
-                     u8 flags, char *signature, acpi_native_uint table_index);
+                     u8 flags, char *signature, u32 table_index);
 
 acpi_status
 acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags);
index dfea2d440488548a7fccff43e998b3ec0ef346d6..4ea4f40bf894c22e0a1f99b745bd503e6a996f24 100644 (file)
  * usually used for memory allocation, efficient loop counters, and array
  * indexes. The types are similar to the size_t type in the C library and are
  * required because there is no C type that consistently represents the native
- * data width.
+ * data width. ACPI_SIZE is needed because there is no guarantee that a
+ * kernel-level C library is present.
  *
  * ACPI_SIZE        16/32/64-bit unsigned value
- * ACPI_NATIVE_UINT 16/32/64-bit unsigned value
  * ACPI_NATIVE_INT  16/32/64-bit signed value
  *
  */
@@ -147,9 +147,9 @@ typedef int INT32;
 
 /*! [End] no source code translation !*/
 
-typedef u64 acpi_native_uint;
 typedef s64 acpi_native_int;
 
+typedef u64 acpi_size;
 typedef u64 acpi_io_address;
 typedef u64 acpi_physical_address;
 
@@ -186,9 +186,9 @@ typedef int INT32;
 
 /*! [End] no source code translation !*/
 
-typedef u32 acpi_native_uint;
 typedef s32 acpi_native_int;
 
+typedef u32 acpi_size;
 typedef u32 acpi_io_address;
 typedef u32 acpi_physical_address;
 
@@ -202,10 +202,6 @@ typedef u32 acpi_physical_address;
 #error unknown ACPI_MACHINE_WIDTH
 #endif
 
-/* Variable-width type, used instead of clib size_t */
-
-typedef acpi_native_uint acpi_size;
-
 /*******************************************************************************
  *
  * OS-dependent and compiler-dependent types
@@ -219,7 +215,7 @@ typedef acpi_native_uint acpi_size;
 /* Value returned by acpi_os_get_thread_id */
 
 #ifndef acpi_thread_id
-#define acpi_thread_id                  acpi_native_uint
+#define acpi_thread_id                 acpi_size
 #endif
 
 /* Object returned from acpi_os_create_lock */
@@ -231,7 +227,7 @@ typedef acpi_native_uint acpi_size;
 /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
 
 #ifndef acpi_cpu_flags
-#define acpi_cpu_flags                  acpi_native_uint
+#define acpi_cpu_flags                 acpi_size
 #endif
 
 /* Object returned from acpi_os_create_cache */
index b42cadf0730256bb68e17f6ff8ad376f7d57dc23..3f663a0077bea0562eeef2850be43400ac3ca278 100644 (file)
@@ -172,7 +172,7 @@ char *acpi_ut_strstr(char *string1, char *string2);
 
 void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
 
-void *acpi_ut_memset(void *dest, acpi_native_uint value, acpi_size count);
+void *acpi_ut_memset(void *dest, u8 value, acpi_size count);
 
 int acpi_ut_to_upper(int c);
 
@@ -476,7 +476,7 @@ u8 acpi_ut_valid_acpi_name(u32 name);
 
 acpi_name acpi_ut_repair_name(char *name);
 
-u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position);
+u8 acpi_ut_valid_acpi_char(char character, u32 position);
 
 acpi_status
 acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);