aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exregion.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-02 01:12:54 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-02 01:12:54 -0500
commit18ee3610040a4c008ce08a40a5dd025241cc7e97 (patch)
tree32a996a5123726b63c31a1522f230933fb967a32 /drivers/acpi/executer/exregion.c
parente4e7b89280d1d666e2c09e5ad36cf071796c4c7e (diff)
parentb4103333d7904310d34de18d85e51e3d74f00a3b (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/acpi/executer/exregion.c')
-rw-r--r--drivers/acpi/executer/exregion.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
index 9a2f5bea3afe..6a4cfdff606d 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 - 2005, R. Byron Moore 9 * Copyright (C) 2000 - 2006, 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
@@ -77,7 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function,
77 struct acpi_mem_space_context *mem_info = region_context; 77 struct acpi_mem_space_context *mem_info = region_context;
78 u32 length; 78 u32 length;
79 acpi_size window_size; 79 acpi_size window_size;
80#ifndef ACPI_MISALIGNED_TRANSFERS 80#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
81 u32 remainder; 81 u32 remainder;
82#endif 82#endif
83 83
@@ -103,13 +103,12 @@ acpi_ex_system_memory_space_handler(u32 function,
103 break; 103 break;
104 104
105 default: 105 default:
106 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 106 ACPI_ERROR((AE_INFO, "Invalid system_memory width %d",
107 "Invalid system_memory width %d\n", 107 bit_width));
108 bit_width));
109 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 108 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
110 } 109 }
111 110
112#ifndef ACPI_MISALIGNED_TRANSFERS 111#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
113 /* 112 /*
114 * Hardware does not support non-aligned data transfers, we must verify 113 * Hardware does not support non-aligned data transfers, we must verify
115 * the request. 114 * the request.
@@ -159,10 +158,10 @@ acpi_ex_system_memory_space_handler(u32 function,
159 (void **)&mem_info-> 158 (void **)&mem_info->
160 mapped_logical_address); 159 mapped_logical_address);
161 if (ACPI_FAILURE(status)) { 160 if (ACPI_FAILURE(status)) {
162 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 161 ACPI_ERROR((AE_INFO,
163 "Could not map memory at %8.8X%8.8X, size %X\n", 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(status);
168 } 167 }
@@ -199,20 +198,20 @@ acpi_ex_system_memory_space_handler(u32 function,
199 *value = 0; 198 *value = 0;
200 switch (bit_width) { 199 switch (bit_width) {
201 case 8: 200 case 8:
202 *value = (acpi_integer) * ((u8 *) logical_addr_ptr); 201 *value = (acpi_integer) ACPI_GET8(logical_addr_ptr);
203 break; 202 break;
204 203
205 case 16: 204 case 16:
206 *value = (acpi_integer) * ((u16 *) logical_addr_ptr); 205 *value = (acpi_integer) ACPI_GET16(logical_addr_ptr);
207 break; 206 break;
208 207
209 case 32: 208 case 32:
210 *value = (acpi_integer) * ((u32 *) logical_addr_ptr); 209 *value = (acpi_integer) ACPI_GET32(logical_addr_ptr);
211 break; 210 break;
212 211
213#if ACPI_MACHINE_WIDTH != 16 212#if ACPI_MACHINE_WIDTH != 16
214 case 64: 213 case 64:
215 *value = (acpi_integer) * ((u64 *) logical_addr_ptr); 214 *value = (acpi_integer) ACPI_GET64(logical_addr_ptr);
216 break; 215 break;
217#endif 216#endif
218 default: 217 default:
@@ -225,20 +224,20 @@ acpi_ex_system_memory_space_handler(u32 function,
225 224
226 switch (bit_width) { 225 switch (bit_width) {
227 case 8: 226 case 8:
228 *(u8 *) logical_addr_ptr = (u8) * value; 227 ACPI_SET8(logical_addr_ptr) = (u8) * value;
229 break; 228 break;
230 229
231 case 16: 230 case 16:
232 *(u16 *) logical_addr_ptr = (u16) * value; 231 ACPI_SET16(logical_addr_ptr) = (u16) * value;
233 break; 232 break;
234 233
235 case 32: 234 case 32:
236 *(u32 *) logical_addr_ptr = (u32) * value; 235 ACPI_SET32(logical_addr_ptr) = (u32) * value;
237 break; 236 break;
238 237
239#if ACPI_MACHINE_WIDTH != 16 238#if ACPI_MACHINE_WIDTH != 16
240 case 64: 239 case 64:
241 *(u64 *) logical_addr_ptr = (u64) * value; 240 ACPI_SET64(logical_addr_ptr) = (u64) * value;
242 break; 241 break;
243#endif 242#endif
244 243