diff options
Diffstat (limited to 'drivers/acpi/executer/exregion.c')
-rw-r--r-- | drivers/acpi/executer/exregion.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 3cc97ba48b36..2e9ce94798c7 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2006, R. Byron Moore | 9 | * Copyright (C) 2000 - 2007, R. Byron Moore |
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 |
@@ -155,16 +155,15 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
155 | 155 | ||
156 | /* Create a new mapping starting at the address given */ | 156 | /* Create a new mapping starting at the address given */ |
157 | 157 | ||
158 | status = acpi_os_map_memory(address, window_size, | 158 | mem_info->mapped_logical_address = |
159 | (void **)&mem_info-> | 159 | acpi_os_map_memory((acpi_native_uint) address, window_size); |
160 | mapped_logical_address); | 160 | if (!mem_info->mapped_logical_address) { |
161 | if (ACPI_FAILURE(status)) { | ||
162 | ACPI_ERROR((AE_INFO, | 161 | ACPI_ERROR((AE_INFO, |
163 | "Could not map memory at %8.8X%8.8X, size %X", | 162 | "Could not map memory at %8.8X%8.8X, size %X", |
164 | ACPI_FORMAT_UINT64(address), | 163 | ACPI_FORMAT_UINT64(address), |
165 | (u32) window_size)); | 164 | (u32) window_size)); |
166 | mem_info->mapped_length = 0; | 165 | mem_info->mapped_length = 0; |
167 | return_ACPI_STATUS(status); | 166 | return_ACPI_STATUS(AE_NO_MEMORY); |
168 | } | 167 | } |
169 | 168 | ||
170 | /* Save the physical address and mapping size */ | 169 | /* Save the physical address and mapping size */ |
@@ -210,11 +209,10 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
210 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); | 209 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); |
211 | break; | 210 | break; |
212 | 211 | ||
213 | #if ACPI_MACHINE_WIDTH != 16 | ||
214 | case 64: | 212 | case 64: |
215 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); | 213 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); |
216 | break; | 214 | break; |
217 | #endif | 215 | |
218 | default: | 216 | default: |
219 | /* bit_width was already validated */ | 217 | /* bit_width was already validated */ |
220 | break; | 218 | break; |
@@ -236,11 +234,9 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
236 | ACPI_SET32(logical_addr_ptr) = (u32) * value; | 234 | ACPI_SET32(logical_addr_ptr) = (u32) * value; |
237 | break; | 235 | break; |
238 | 236 | ||
239 | #if ACPI_MACHINE_WIDTH != 16 | ||
240 | case 64: | 237 | case 64: |
241 | ACPI_SET64(logical_addr_ptr) = (u64) * value; | 238 | ACPI_SET64(logical_addr_ptr) = (u64) * value; |
242 | break; | 239 | break; |
243 | #endif | ||
244 | 240 | ||
245 | default: | 241 | default: |
246 | /* bit_width was already validated */ | 242 | /* bit_width was already validated */ |