aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/exregion.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/exregion.c')
-rw-r--r--drivers/acpi/acpica/exregion.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 2bd83ac57c3a..486b2e5661b6 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2008, Intel Corp. 9 * Copyright (C) 2000 - 2010, Intel Corp.
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
@@ -70,7 +70,7 @@ acpi_status
70acpi_ex_system_memory_space_handler(u32 function, 70acpi_ex_system_memory_space_handler(u32 function,
71 acpi_physical_address address, 71 acpi_physical_address address,
72 u32 bit_width, 72 u32 bit_width,
73 acpi_integer * value, 73 u64 *value,
74 void *handler_context, void *region_context) 74 void *handler_context, void *region_context)
75{ 75{
76 acpi_status status = AE_OK; 76 acpi_status status = AE_OK;
@@ -115,8 +115,7 @@ acpi_ex_system_memory_space_handler(u32 function,
115 * Hardware does not support non-aligned data transfers, we must verify 115 * Hardware does not support non-aligned data transfers, we must verify
116 * the request. 116 * the request.
117 */ 117 */
118 (void)acpi_ut_short_divide((acpi_integer) address, length, NULL, 118 (void)acpi_ut_short_divide((u64) address, length, NULL, &remainder);
119 &remainder);
120 if (remainder != 0) { 119 if (remainder != 0) {
121 return_ACPI_STATUS(AE_AML_ALIGNMENT); 120 return_ACPI_STATUS(AE_AML_ALIGNMENT);
122 } 121 }
@@ -128,10 +127,9 @@ acpi_ex_system_memory_space_handler(u32 function,
128 * 2) Address beyond the current mapping? 127 * 2) Address beyond the current mapping?
129 */ 128 */
130 if ((address < mem_info->mapped_physical_address) || 129 if ((address < mem_info->mapped_physical_address) ||
131 (((acpi_integer) address + length) > ((acpi_integer) 130 (((u64) address + length) > ((u64)
132 mem_info-> 131 mem_info->mapped_physical_address +
133 mapped_physical_address + 132 mem_info->mapped_length))) {
134 mem_info->mapped_length))) {
135 /* 133 /*
136 * The request cannot be resolved by the current memory mapping; 134 * The request cannot be resolved by the current memory mapping;
137 * Delete the existing mapping and create a new one. 135 * Delete the existing mapping and create a new one.
@@ -193,8 +191,7 @@ acpi_ex_system_memory_space_handler(u32 function,
193 * access 191 * access
194 */ 192 */
195 logical_addr_ptr = mem_info->mapped_logical_address + 193 logical_addr_ptr = mem_info->mapped_logical_address +
196 ((acpi_integer) address - 194 ((u64) address - (u64) mem_info->mapped_physical_address);
197 (acpi_integer) mem_info->mapped_physical_address);
198 195
199 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 196 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
200 "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n", 197 "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n",
@@ -215,19 +212,19 @@ acpi_ex_system_memory_space_handler(u32 function,
215 *value = 0; 212 *value = 0;
216 switch (bit_width) { 213 switch (bit_width) {
217 case 8: 214 case 8:
218 *value = (acpi_integer) ACPI_GET8(logical_addr_ptr); 215 *value = (u64) ACPI_GET8(logical_addr_ptr);
219 break; 216 break;
220 217
221 case 16: 218 case 16:
222 *value = (acpi_integer) ACPI_GET16(logical_addr_ptr); 219 *value = (u64) ACPI_GET16(logical_addr_ptr);
223 break; 220 break;
224 221
225 case 32: 222 case 32:
226 *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); 223 *value = (u64) ACPI_GET32(logical_addr_ptr);
227 break; 224 break;
228 225
229 case 64: 226 case 64:
230 *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); 227 *value = (u64) ACPI_GET64(logical_addr_ptr);
231 break; 228 break;
232 229
233 default: 230 default:
@@ -291,7 +288,7 @@ acpi_status
291acpi_ex_system_io_space_handler(u32 function, 288acpi_ex_system_io_space_handler(u32 function,
292 acpi_physical_address address, 289 acpi_physical_address address,
293 u32 bit_width, 290 u32 bit_width,
294 acpi_integer * value, 291 u64 *value,
295 void *handler_context, void *region_context) 292 void *handler_context, void *region_context)
296{ 293{
297 acpi_status status = AE_OK; 294 acpi_status status = AE_OK;
@@ -350,7 +347,7 @@ acpi_status
350acpi_ex_pci_config_space_handler(u32 function, 347acpi_ex_pci_config_space_handler(u32 function,
351 acpi_physical_address address, 348 acpi_physical_address address,
352 u32 bit_width, 349 u32 bit_width,
353 acpi_integer * value, 350 u64 *value,
354 void *handler_context, void *region_context) 351 void *handler_context, void *region_context)
355{ 352{
356 acpi_status status = AE_OK; 353 acpi_status status = AE_OK;
@@ -425,7 +422,7 @@ acpi_status
425acpi_ex_cmos_space_handler(u32 function, 422acpi_ex_cmos_space_handler(u32 function,
426 acpi_physical_address address, 423 acpi_physical_address address,
427 u32 bit_width, 424 u32 bit_width,
428 acpi_integer * value, 425 u64 *value,
429 void *handler_context, void *region_context) 426 void *handler_context, void *region_context)
430{ 427{
431 acpi_status status = AE_OK; 428 acpi_status status = AE_OK;
@@ -457,7 +454,7 @@ acpi_status
457acpi_ex_pci_bar_space_handler(u32 function, 454acpi_ex_pci_bar_space_handler(u32 function,
458 acpi_physical_address address, 455 acpi_physical_address address,
459 u32 bit_width, 456 u32 bit_width,
460 acpi_integer * value, 457 u64 *value,
461 void *handler_context, void *region_context) 458 void *handler_context, void *region_context)
462{ 459{
463 acpi_status status = AE_OK; 460 acpi_status status = AE_OK;
@@ -489,7 +486,7 @@ acpi_status
489acpi_ex_data_table_space_handler(u32 function, 486acpi_ex_data_table_space_handler(u32 function,
490 acpi_physical_address address, 487 acpi_physical_address address,
491 u32 bit_width, 488 u32 bit_width,
492 acpi_integer * value, 489 u64 *value,
493 void *handler_context, void *region_context) 490 void *handler_context, void *region_context)
494{ 491{
495 ACPI_FUNCTION_TRACE(ex_data_table_space_handler); 492 ACPI_FUNCTION_TRACE(ex_data_table_space_handler);