diff options
author | Bob Moore <robert.moore@intel.com> | 2007-02-02 11:48:23 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:30 -0500 |
commit | 59fa85057e12ff135df54266722b2064c418fc05 (patch) | |
tree | 697a677e71f9c9e23a13d62df720a3778de6c1d4 /include/acpi/acmacros.h | |
parent | ff40c8a3f258e9a54b0b94b92d5e2d9d88a39954 (diff) |
ACPICA: Removed all 16-bit support.
Support for 16-bit ACPICA has been completely removed since it is
no longer necessary and it clutters the code. All 16-bit macros,
types, and conditional compiles have been removed, cleaning up
and simplifying the code across the entire subsystem.
DOS support is no longer needed since the Linux firmware kit
is now available.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acmacros.h')
-rw-r--r-- | include/acpi/acmacros.h | 68 |
1 files changed, 1 insertions, 67 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 9b2e4d7154a4..549e533892a7 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -61,20 +61,6 @@ | |||
61 | 61 | ||
62 | #define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) | 62 | #define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) |
63 | 63 | ||
64 | #if ACPI_MACHINE_WIDTH == 16 | ||
65 | |||
66 | /* | ||
67 | * For 16-bit addresses, we have to assume that the upper 32 bits | ||
68 | * (out of 64) are zero. | ||
69 | */ | ||
70 | #define ACPI_LODWORD(l) ((u32)(l)) | ||
71 | #define ACPI_HIDWORD(l) ((u32)(0)) | ||
72 | |||
73 | #define ACPI_GET_ADDRESS(a) ((a).lo) | ||
74 | #define ACPI_STORE_ADDRESS(a,b) {(a).hi=0;(a).lo=(u32)(b);} | ||
75 | #define ACPI_VALID_ADDRESS(a) ((a).hi | (a).lo) | ||
76 | |||
77 | #else | ||
78 | #ifdef ACPI_NO_INTEGER64_SUPPORT | 64 | #ifdef ACPI_NO_INTEGER64_SUPPORT |
79 | /* | 65 | /* |
80 | * acpi_integer is 32-bits, no 64-bit support on this platform | 66 | * acpi_integer is 32-bits, no 64-bit support on this platform |
@@ -82,10 +68,6 @@ | |||
82 | #define ACPI_LODWORD(l) ((u32)(l)) | 68 | #define ACPI_LODWORD(l) ((u32)(l)) |
83 | #define ACPI_HIDWORD(l) ((u32)(0)) | 69 | #define ACPI_HIDWORD(l) ((u32)(0)) |
84 | 70 | ||
85 | #define ACPI_GET_ADDRESS(a) (a) | ||
86 | #define ACPI_STORE_ADDRESS(a,b) ((a)=(b)) | ||
87 | #define ACPI_VALID_ADDRESS(a) (a) | ||
88 | |||
89 | #else | 71 | #else |
90 | 72 | ||
91 | /* | 73 | /* |
@@ -93,11 +75,6 @@ | |||
93 | */ | 75 | */ |
94 | #define ACPI_LODWORD(l) ((u32)(u64)(l)) | 76 | #define ACPI_LODWORD(l) ((u32)(u64)(l)) |
95 | #define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi)) | 77 | #define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi)) |
96 | |||
97 | #define ACPI_GET_ADDRESS(a) (a) | ||
98 | #define ACPI_STORE_ADDRESS(a,b) ((a)=(acpi_physical_address)(b)) | ||
99 | #define ACPI_VALID_ADDRESS(a) (a) | ||
100 | #endif | ||
101 | #endif | 78 | #endif |
102 | 79 | ||
103 | /* | 80 | /* |
@@ -135,15 +112,8 @@ | |||
135 | #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) | 112 | #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) |
136 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) | 113 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) |
137 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) | 114 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) |
138 | |||
139 | #if ACPI_MACHINE_WIDTH == 16 | ||
140 | #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) | ||
141 | #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) | ||
142 | #define ACPI_PTR_TO_PHYSADDR(i) (u32) ACPI_CAST_PTR (u8,(i)) | ||
143 | #else | ||
144 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 115 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
145 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) | 116 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
146 | #endif | ||
147 | 117 | ||
148 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | 118 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
149 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) | 119 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) |
@@ -224,28 +194,6 @@ | |||
224 | 194 | ||
225 | /* The hardware supports unaligned transfers, just do the little-endian move */ | 195 | /* The hardware supports unaligned transfers, just do the little-endian move */ |
226 | 196 | ||
227 | #if ACPI_MACHINE_WIDTH == 16 | ||
228 | |||
229 | /* No 64-bit integers */ | ||
230 | /* 16-bit source, 16/32/64 destination */ | ||
231 | |||
232 | #define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) | ||
233 | #define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) | ||
234 | #define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s) | ||
235 | |||
236 | /* 32-bit source, 16/32/64 destination */ | ||
237 | |||
238 | #define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ | ||
239 | #define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) | ||
240 | #define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) | ||
241 | |||
242 | /* 64-bit source, 16/32/64 destination */ | ||
243 | |||
244 | #define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ | ||
245 | #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ | ||
246 | #define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) | ||
247 | |||
248 | #else | ||
249 | /* 16-bit source, 16/32/64 destination */ | 197 | /* 16-bit source, 16/32/64 destination */ |
250 | 198 | ||
251 | #define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) | 199 | #define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) |
@@ -263,7 +211,6 @@ | |||
263 | #define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ | 211 | #define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ |
264 | #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ | 212 | #define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ |
265 | #define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) | 213 | #define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) |
266 | #endif | ||
267 | 214 | ||
268 | #else | 215 | #else |
269 | /* | 216 | /* |
@@ -308,10 +255,7 @@ | |||
308 | 255 | ||
309 | /* Macros based on machine integer width */ | 256 | /* Macros based on machine integer width */ |
310 | 257 | ||
311 | #if ACPI_MACHINE_WIDTH == 16 | 258 | #if ACPI_MACHINE_WIDTH == 32 |
312 | #define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) | ||
313 | |||
314 | #elif ACPI_MACHINE_WIDTH == 32 | ||
315 | #define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) | 259 | #define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) |
316 | 260 | ||
317 | #elif ACPI_MACHINE_WIDTH == 64 | 261 | #elif ACPI_MACHINE_WIDTH == 64 |
@@ -696,16 +640,6 @@ | |||
696 | #define ACPI_DEBUGGER_EXEC(a) | 640 | #define ACPI_DEBUGGER_EXEC(a) |
697 | #endif | 641 | #endif |
698 | 642 | ||
699 | /* | ||
700 | * For 16-bit code, we want to shrink some things even though | ||
701 | * we are using ACPI_DEBUG_OUTPUT to get the debug output | ||
702 | */ | ||
703 | #if ACPI_MACHINE_WIDTH == 16 | ||
704 | #undef ACPI_DEBUG_ONLY_MEMBERS | ||
705 | #undef _VERBOSE_STRUCTURES | ||
706 | #define ACPI_DEBUG_ONLY_MEMBERS(a) | ||
707 | #endif | ||
708 | |||
709 | #ifdef ACPI_DEBUG_OUTPUT | 643 | #ifdef ACPI_DEBUG_OUTPUT |
710 | /* | 644 | /* |
711 | * 1) Set name to blanks | 645 | * 1) Set name to blanks |