diff options
-rw-r--r-- | drivers/acpi/events/evgpeblk.c | 10 | ||||
-rw-r--r-- | drivers/acpi/executer/exoparg1.c | 2 | ||||
-rw-r--r-- | drivers/acpi/executer/exregion.c | 5 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwregs.c | 14 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxfroot.c | 4 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 68 | ||||
-rw-r--r-- | include/acpi/actypes.h | 40 |
7 files changed, 14 insertions, 129 deletions
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index 8a6f01a136d7..a23634ca42ee 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c | |||
@@ -796,12 +796,12 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
796 | (u8) (gpe_block->block_base_number + | 796 | (u8) (gpe_block->block_base_number + |
797 | (i * ACPI_GPE_REGISTER_WIDTH)); | 797 | (i * ACPI_GPE_REGISTER_WIDTH)); |
798 | 798 | ||
799 | ACPI_STORE_ADDRESS(this_register->status_address.address, | 799 | this_register->status_address.address = |
800 | (gpe_block->block_address.address + i)); | 800 | gpe_block->block_address.address + i; |
801 | 801 | ||
802 | ACPI_STORE_ADDRESS(this_register->enable_address.address, | 802 | this_register->enable_address.address = |
803 | (gpe_block->block_address.address | 803 | gpe_block->block_address.address + i + |
804 | + i + gpe_block->register_count)); | 804 | gpe_block->register_count; |
805 | 805 | ||
806 | this_register->status_address.space_id = | 806 | this_register->status_address.space_id = |
807 | gpe_block->block_address.space_id; | 807 | gpe_block->block_address.space_id; |
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 6374d8be88e0..6f2e69ca014a 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -104,9 +104,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) | |||
104 | status = AE_NO_MEMORY; | 104 | status = AE_NO_MEMORY; |
105 | goto cleanup; | 105 | goto cleanup; |
106 | } | 106 | } |
107 | #if ACPI_MACHINE_WIDTH != 16 | ||
108 | return_desc->integer.value = acpi_os_get_timer(); | 107 | return_desc->integer.value = acpi_os_get_timer(); |
109 | #endif | ||
110 | break; | 108 | break; |
111 | 109 | ||
112 | default: /* Unknown opcode */ | 110 | default: /* Unknown opcode */ |
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 496744774859..c6819e015e2a 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c | |||
@@ -209,11 +209,10 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
209 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); | 209 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); |
210 | break; | 210 | break; |
211 | 211 | ||
212 | #if ACPI_MACHINE_WIDTH != 16 | ||
213 | case 64: | 212 | case 64: |
214 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); | 213 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); |
215 | break; | 214 | break; |
216 | #endif | 215 | |
217 | default: | 216 | default: |
218 | /* bit_width was already validated */ | 217 | /* bit_width was already validated */ |
219 | break; | 218 | break; |
@@ -235,11 +234,9 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
235 | ACPI_SET32(logical_addr_ptr) = (u32) * value; | 234 | ACPI_SET32(logical_addr_ptr) = (u32) * value; |
236 | break; | 235 | break; |
237 | 236 | ||
238 | #if ACPI_MACHINE_WIDTH != 16 | ||
239 | case 64: | 237 | case 64: |
240 | ACPI_SET64(logical_addr_ptr) = (u64) * value; | 238 | ACPI_SET64(logical_addr_ptr) = (u64) * value; |
241 | break; | 239 | break; |
242 | #endif | ||
243 | 240 | ||
244 | default: | 241 | default: |
245 | /* bit_width was already validated */ | 242 | /* bit_width was already validated */ |
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c index 716e4aeca1e1..5b19fc75cbd0 100644 --- a/drivers/acpi/hardware/hwregs.c +++ b/drivers/acpi/hardware/hwregs.c | |||
@@ -788,8 +788,8 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg) | |||
788 | 788 | ||
789 | case ACPI_ADR_SPACE_SYSTEM_IO: | 789 | case ACPI_ADR_SPACE_SYSTEM_IO: |
790 | 790 | ||
791 | status = acpi_os_read_port((acpi_io_address) address, | 791 | status = |
792 | value, width); | 792 | acpi_os_read_port((acpi_io_address) address, value, width); |
793 | break; | 793 | break; |
794 | 794 | ||
795 | default: | 795 | default: |
@@ -800,8 +800,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg) | |||
800 | 800 | ||
801 | ACPI_DEBUG_PRINT((ACPI_DB_IO, | 801 | ACPI_DEBUG_PRINT((ACPI_DB_IO, |
802 | "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n", | 802 | "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n", |
803 | *value, width, | 803 | *value, width, ACPI_FORMAT_UINT64(address), |
804 | ACPI_FORMAT_UINT64(address), | ||
805 | acpi_ut_get_region_name(reg->space_id))); | 804 | acpi_ut_get_region_name(reg->space_id))); |
806 | 805 | ||
807 | return (status); | 806 | return (status); |
@@ -858,8 +857,8 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg) | |||
858 | 857 | ||
859 | case ACPI_ADR_SPACE_SYSTEM_IO: | 858 | case ACPI_ADR_SPACE_SYSTEM_IO: |
860 | 859 | ||
861 | status = acpi_os_write_port((acpi_io_address) address, | 860 | status = acpi_os_write_port((acpi_io_address) address, value, |
862 | value, width); | 861 | width); |
863 | break; | 862 | break; |
864 | 863 | ||
865 | default: | 864 | default: |
@@ -870,8 +869,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg) | |||
870 | 869 | ||
871 | ACPI_DEBUG_PRINT((ACPI_DB_IO, | 870 | ACPI_DEBUG_PRINT((ACPI_DB_IO, |
872 | "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n", | 871 | "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n", |
873 | value, width, | 872 | value, width, ACPI_FORMAT_UINT64(address), |
874 | ACPI_FORMAT_UINT64(address), | ||
875 | acpi_ut_get_region_name(reg->space_id))); | 873 | acpi_ut_get_region_name(reg->space_id))); |
876 | 874 | ||
877 | return (status); | 875 | return (status); |
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 5c6e88251c1a..82c0b66f1f21 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c | |||
@@ -98,8 +98,6 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) | |||
98 | return (AE_OK); | 98 | return (AE_OK); |
99 | } | 99 | } |
100 | 100 | ||
101 | #if ACPI_MACHINE_WIDTH != 16 | ||
102 | |||
103 | /******************************************************************************* | 101 | /******************************************************************************* |
104 | * | 102 | * |
105 | * FUNCTION: acpi_tb_find_rsdp | 103 | * FUNCTION: acpi_tb_find_rsdp |
@@ -275,5 +273,3 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) | |||
275 | start_address)); | 273 | start_address)); |
276 | return_PTR(NULL); | 274 | return_PTR(NULL); |
277 | } | 275 | } |
278 | |||
279 | #endif | ||
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 |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d213f9782154..fff2d242ace4 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -149,14 +149,12 @@ typedef int INT32; | |||
149 | typedef u64 acpi_native_uint; | 149 | typedef u64 acpi_native_uint; |
150 | typedef s64 acpi_native_int; | 150 | typedef s64 acpi_native_int; |
151 | 151 | ||
152 | typedef u64 acpi_table_ptr; | ||
153 | typedef u64 acpi_io_address; | 152 | typedef u64 acpi_io_address; |
154 | typedef u64 acpi_physical_address; | 153 | typedef u64 acpi_physical_address; |
155 | 154 | ||
156 | #define ACPI_MAX_PTR ACPI_UINT64_MAX | 155 | #define ACPI_MAX_PTR ACPI_UINT64_MAX |
157 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX | 156 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX |
158 | 157 | ||
159 | #define ACPI_NATIVE_BOUNDARY 8 | ||
160 | #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ | 158 | #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ |
161 | 159 | ||
162 | /* | 160 | /* |
@@ -190,51 +188,15 @@ typedef int INT32; | |||
190 | typedef u32 acpi_native_uint; | 188 | typedef u32 acpi_native_uint; |
191 | typedef s32 acpi_native_int; | 189 | typedef s32 acpi_native_int; |
192 | 190 | ||
193 | typedef u64 acpi_table_ptr; | ||
194 | typedef u32 acpi_io_address; | 191 | typedef u32 acpi_io_address; |
195 | typedef u32 acpi_physical_address; | 192 | typedef u32 acpi_physical_address; |
196 | 193 | ||
197 | #define ACPI_MAX_PTR ACPI_UINT32_MAX | 194 | #define ACPI_MAX_PTR ACPI_UINT32_MAX |
198 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX | 195 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX |
199 | 196 | ||
200 | #define ACPI_NATIVE_BOUNDARY 4 | ||
201 | |||
202 | /******************************************************************************* | ||
203 | * | ||
204 | * Types specific to 16-bit targets | ||
205 | * | ||
206 | ******************************************************************************/ | ||
207 | |||
208 | #elif ACPI_MACHINE_WIDTH == 16 | ||
209 | |||
210 | /*! [Begin] no source code translation (keep the typedefs as-is) */ | ||
211 | |||
212 | typedef unsigned long UINT32; | ||
213 | typedef short INT16; | ||
214 | typedef long INT32; | ||
215 | |||
216 | /*! [End] no source code translation !*/ | ||
217 | |||
218 | typedef u16 acpi_native_uint; | ||
219 | typedef s16 acpi_native_int; | ||
220 | |||
221 | typedef u32 acpi_table_ptr; | ||
222 | typedef u32 acpi_io_address; | ||
223 | typedef char *acpi_physical_address; | ||
224 | |||
225 | #define ACPI_MAX_PTR ACPI_UINT16_MAX | ||
226 | #define ACPI_SIZE_MAX ACPI_UINT16_MAX | ||
227 | |||
228 | #define ACPI_NATIVE_BOUNDARY 2 | ||
229 | #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ | ||
230 | |||
231 | /* 64-bit integers cannot be supported */ | ||
232 | |||
233 | #define ACPI_NO_INTEGER64_SUPPORT | ||
234 | |||
235 | #else | 197 | #else |
236 | 198 | ||
237 | /* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */ | 199 | /* ACPI_MACHINE_WIDTH must be either 64 or 32 */ |
238 | 200 | ||
239 | #error unknown ACPI_MACHINE_WIDTH | 201 | #error unknown ACPI_MACHINE_WIDTH |
240 | #endif | 202 | #endif |