aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-06-10 01:42:13 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:03 -0400
commit67a119f990063f5662574f6d6414fe9bc5ece86a (patch)
tree96be8ffbbe56a0a2a85dba14b8c81f153ac218f2 /drivers/acpi/executer
parent11f2a61ab418305167f9a3f3a31a50449222f64b (diff)
ACPICA: Eliminate acpi_native_uint type v2
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>
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r--drivers/acpi/executer/exconfig.c17
-rw-r--r--drivers/acpi/executer/exconvrt.c12
-rw-r--r--drivers/acpi/executer/exdump.c2
-rw-r--r--drivers/acpi/executer/exfldio.c9
-rw-r--r--drivers/acpi/executer/exmisc.c8
-rw-r--r--drivers/acpi/executer/exregion.c2
6 files changed, 26 insertions, 24 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 39d742190584..2a32c843cb4a 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("exconfig")
53 53
54/* Local prototypes */ 54/* Local prototypes */
55static acpi_status 55static acpi_status
56acpi_ex_add_table(acpi_native_uint table_index, 56acpi_ex_add_table(u32 table_index,
57 struct acpi_namespace_node *parent_node, 57 struct acpi_namespace_node *parent_node,
58 union acpi_operand_object **ddb_handle); 58 union acpi_operand_object **ddb_handle);
59 59
@@ -73,7 +73,7 @@ acpi_ex_add_table(acpi_native_uint table_index,
73 ******************************************************************************/ 73 ******************************************************************************/
74 74
75static acpi_status 75static acpi_status
76acpi_ex_add_table(acpi_native_uint table_index, 76acpi_ex_add_table(u32 table_index,
77 struct acpi_namespace_node *parent_node, 77 struct acpi_namespace_node *parent_node,
78 union acpi_operand_object **ddb_handle) 78 union acpi_operand_object **ddb_handle)
79{ 79{
@@ -96,7 +96,8 @@ acpi_ex_add_table(acpi_native_uint table_index,
96 96
97 /* Install the new table into the local data structures */ 97 /* Install the new table into the local data structures */
98 98
99 obj_desc->reference.object = ACPI_CAST_PTR(void, table_index); 99 obj_desc->reference.object = ACPI_CAST_PTR(void,
100 (unsigned long)table_index);
100 101
101 /* Add the table to the namespace */ 102 /* Add the table to the namespace */
102 103
@@ -128,12 +129,12 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
128{ 129{
129 acpi_status status; 130 acpi_status status;
130 union acpi_operand_object **operand = &walk_state->operands[0]; 131 union acpi_operand_object **operand = &walk_state->operands[0];
131 acpi_native_uint table_index;
132 struct acpi_namespace_node *parent_node; 132 struct acpi_namespace_node *parent_node;
133 struct acpi_namespace_node *start_node; 133 struct acpi_namespace_node *start_node;
134 struct acpi_namespace_node *parameter_node = NULL; 134 struct acpi_namespace_node *parameter_node = NULL;
135 union acpi_operand_object *ddb_handle; 135 union acpi_operand_object *ddb_handle;
136 struct acpi_table_header *table; 136 struct acpi_table_header *table;
137 u32 table_index;
137 138
138 ACPI_FUNCTION_TRACE(ex_load_table_op); 139 ACPI_FUNCTION_TRACE(ex_load_table_op);
139 140
@@ -280,7 +281,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
280{ 281{
281 union acpi_operand_object *ddb_handle; 282 union acpi_operand_object *ddb_handle;
282 struct acpi_table_desc table_desc; 283 struct acpi_table_desc table_desc;
283 acpi_native_uint table_index; 284 u32 table_index;
284 acpi_status status; 285 acpi_status status;
285 u32 length; 286 u32 length;
286 287
@@ -437,7 +438,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
437{ 438{
438 acpi_status status = AE_OK; 439 acpi_status status = AE_OK;
439 union acpi_operand_object *table_desc = ddb_handle; 440 union acpi_operand_object *table_desc = ddb_handle;
440 acpi_native_uint table_index; 441 u32 table_index;
441 struct acpi_table_header *table; 442 struct acpi_table_header *table;
442 443
443 ACPI_FUNCTION_TRACE(ex_unload_table); 444 ACPI_FUNCTION_TRACE(ex_unload_table);
@@ -454,9 +455,9 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
454 return_ACPI_STATUS(AE_BAD_PARAMETER); 455 return_ACPI_STATUS(AE_BAD_PARAMETER);
455 } 456 }
456 457
457 /* Get the table index from the ddb_handle */ 458 /* Get the table index from the ddb_handle (acpi_size for 64-bit case) */
458 459
459 table_index = (acpi_native_uint) table_desc->reference.object; 460 table_index = (u32) (acpi_size) table_desc->reference.object;
460 461
461 /* Invoke table handler if present */ 462 /* Invoke table handler if present */
462 463
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
index fd954b4ed83d..261d97516d9b 100644
--- a/drivers/acpi/executer/exconvrt.c
+++ b/drivers/acpi/executer/exconvrt.c
@@ -288,11 +288,11 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
288 u16 base, u8 * string, u8 data_width) 288 u16 base, u8 * string, u8 data_width)
289{ 289{
290 acpi_integer digit; 290 acpi_integer digit;
291 acpi_native_uint i; 291 u32 i;
292 acpi_native_uint j; 292 u32 j;
293 acpi_native_uint k = 0; 293 u32 k = 0;
294 acpi_native_uint hex_length; 294 u32 hex_length;
295 acpi_native_uint decimal_length; 295 u32 decimal_length;
296 u32 remainder; 296 u32 remainder;
297 u8 supress_zeros; 297 u8 supress_zeros;
298 298
@@ -348,7 +348,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
348 348
349 /* hex_length: 2 ascii hex chars per data byte */ 349 /* hex_length: 2 ascii hex chars per data byte */
350 350
351 hex_length = (acpi_native_uint) ACPI_MUL_2(data_width); 351 hex_length = ACPI_MUL_2(data_width);
352 for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) { 352 for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {
353 353
354 /* Get one hex digit, most significant digits first */ 354 /* Get one hex digit, most significant digits first */
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index 74f1b22601b3..976016fda66a 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -775,7 +775,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
775 u32 num_levels, 775 u32 num_levels,
776 char *note, char *module_name, u32 line_number) 776 char *note, char *module_name, u32 line_number)
777{ 777{
778 acpi_native_uint i; 778 u32 i;
779 779
780 ACPI_FUNCTION_NAME(ex_dump_operands); 780 ACPI_FUNCTION_NAME(ex_dump_operands);
781 781
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index e336b5dc7a50..9ff9d1f4615d 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -153,14 +153,15 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
153 /* 153 /*
154 * Slack mode only: We will go ahead and allow access to this 154 * Slack mode only: We will go ahead and allow access to this
155 * field if it is within the region length rounded up to the next 155 * field if it is within the region length rounded up to the next
156 * access width boundary. 156 * access width boundary. acpi_size cast for 64-bit compile.
157 */ 157 */
158 if (ACPI_ROUND_UP(rgn_desc->region.length, 158 if (ACPI_ROUND_UP(rgn_desc->region.length,
159 obj_desc->common_field. 159 obj_desc->common_field.
160 access_byte_width) >= 160 access_byte_width) >=
161 (obj_desc->common_field.base_byte_offset + 161 ((acpi_size) obj_desc->common_field.
162 (acpi_native_uint) obj_desc->common_field. 162 base_byte_offset +
163 access_byte_width + field_datum_byte_offset)) { 163 obj_desc->common_field.access_byte_width +
164 field_datum_byte_offset)) {
164 return_ACPI_STATUS(AE_OK); 165 return_ACPI_STATUS(AE_OK);
165 } 166 }
166 } 167 }
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
index cc956a5b5267..731414a581a6 100644
--- a/drivers/acpi/executer/exmisc.c
+++ b/drivers/acpi/executer/exmisc.c
@@ -329,8 +329,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
329 329
330 /* Result of two Strings is a String */ 330 /* Result of two Strings is a String */
331 331
332 return_desc = acpi_ut_create_string_object((acpi_size) 332 return_desc = acpi_ut_create_string_object(((acpi_size)
333 (operand0->string. 333 operand0->string.
334 length + 334 length +
335 local_operand1-> 335 local_operand1->
336 string.length)); 336 string.length));
@@ -352,8 +352,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
352 352
353 /* Result of two Buffers is a Buffer */ 353 /* Result of two Buffers is a Buffer */
354 354
355 return_desc = acpi_ut_create_buffer_object((acpi_size) 355 return_desc = acpi_ut_create_buffer_object(((acpi_size)
356 (operand0->buffer. 356 operand0->buffer.
357 length + 357 length +
358 local_operand1-> 358 local_operand1->
359 buffer.length)); 359 buffer.length));
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
index 7cd8bb54fa01..7a41c409ae4d 100644
--- a/drivers/acpi/executer/exregion.c
+++ b/drivers/acpi/executer/exregion.c
@@ -156,7 +156,7 @@ acpi_ex_system_memory_space_handler(u32 function,
156 /* Create a new mapping starting at the address given */ 156 /* Create a new mapping starting at the address given */
157 157
158 mem_info->mapped_logical_address = 158 mem_info->mapped_logical_address =
159 acpi_os_map_memory((acpi_native_uint) address, window_size); 159 acpi_os_map_memory((acpi_physical_address) address, window_size);
160 if (!mem_info->mapped_logical_address) { 160 if (!mem_info->mapped_logical_address) {
161 ACPI_ERROR((AE_INFO, 161 ACPI_ERROR((AE_INFO,
162 "Could not map memory at %8.8X%8.8X, size %X", 162 "Could not map memory at %8.8X%8.8X, size %X",