diff options
Diffstat (limited to 'drivers/acpi/acpica/exregion.c')
-rw-r--r-- | drivers/acpi/acpica/exregion.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 182abaf045e1..303429bb4d5d 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c | |||
@@ -88,22 +88,27 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
88 | 88 | ||
89 | switch (bit_width) { | 89 | switch (bit_width) { |
90 | case 8: | 90 | case 8: |
91 | |||
91 | length = 1; | 92 | length = 1; |
92 | break; | 93 | break; |
93 | 94 | ||
94 | case 16: | 95 | case 16: |
96 | |||
95 | length = 2; | 97 | length = 2; |
96 | break; | 98 | break; |
97 | 99 | ||
98 | case 32: | 100 | case 32: |
101 | |||
99 | length = 4; | 102 | length = 4; |
100 | break; | 103 | break; |
101 | 104 | ||
102 | case 64: | 105 | case 64: |
106 | |||
103 | length = 8; | 107 | length = 8; |
104 | break; | 108 | break; |
105 | 109 | ||
106 | default: | 110 | default: |
111 | |||
107 | ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u", | 112 | ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u", |
108 | bit_width)); | 113 | bit_width)); |
109 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 114 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
@@ -214,23 +219,29 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
214 | *value = 0; | 219 | *value = 0; |
215 | switch (bit_width) { | 220 | switch (bit_width) { |
216 | case 8: | 221 | case 8: |
217 | *value = (u64) ACPI_GET8(logical_addr_ptr); | 222 | |
223 | *value = (u64)ACPI_GET8(logical_addr_ptr); | ||
218 | break; | 224 | break; |
219 | 225 | ||
220 | case 16: | 226 | case 16: |
221 | *value = (u64) ACPI_GET16(logical_addr_ptr); | 227 | |
228 | *value = (u64)ACPI_GET16(logical_addr_ptr); | ||
222 | break; | 229 | break; |
223 | 230 | ||
224 | case 32: | 231 | case 32: |
225 | *value = (u64) ACPI_GET32(logical_addr_ptr); | 232 | |
233 | *value = (u64)ACPI_GET32(logical_addr_ptr); | ||
226 | break; | 234 | break; |
227 | 235 | ||
228 | case 64: | 236 | case 64: |
229 | *value = (u64) ACPI_GET64(logical_addr_ptr); | 237 | |
238 | *value = (u64)ACPI_GET64(logical_addr_ptr); | ||
230 | break; | 239 | break; |
231 | 240 | ||
232 | default: | 241 | default: |
242 | |||
233 | /* bit_width was already validated */ | 243 | /* bit_width was already validated */ |
244 | |||
234 | break; | 245 | break; |
235 | } | 246 | } |
236 | break; | 247 | break; |
@@ -239,28 +250,35 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
239 | 250 | ||
240 | switch (bit_width) { | 251 | switch (bit_width) { |
241 | case 8: | 252 | case 8: |
253 | |||
242 | ACPI_SET8(logical_addr_ptr, *value); | 254 | ACPI_SET8(logical_addr_ptr, *value); |
243 | break; | 255 | break; |
244 | 256 | ||
245 | case 16: | 257 | case 16: |
258 | |||
246 | ACPI_SET16(logical_addr_ptr, *value); | 259 | ACPI_SET16(logical_addr_ptr, *value); |
247 | break; | 260 | break; |
248 | 261 | ||
249 | case 32: | 262 | case 32: |
263 | |||
250 | ACPI_SET32(logical_addr_ptr, *value); | 264 | ACPI_SET32(logical_addr_ptr, *value); |
251 | break; | 265 | break; |
252 | 266 | ||
253 | case 64: | 267 | case 64: |
268 | |||
254 | ACPI_SET64(logical_addr_ptr, *value); | 269 | ACPI_SET64(logical_addr_ptr, *value); |
255 | break; | 270 | break; |
256 | 271 | ||
257 | default: | 272 | default: |
273 | |||
258 | /* bit_width was already validated */ | 274 | /* bit_width was already validated */ |
275 | |||
259 | break; | 276 | break; |
260 | } | 277 | } |
261 | break; | 278 | break; |
262 | 279 | ||
263 | default: | 280 | default: |
281 | |||
264 | status = AE_BAD_PARAMETER; | 282 | status = AE_BAD_PARAMETER; |
265 | break; | 283 | break; |
266 | } | 284 | } |
@@ -320,6 +338,7 @@ acpi_ex_system_io_space_handler(u32 function, | |||
320 | break; | 338 | break; |
321 | 339 | ||
322 | default: | 340 | default: |
341 | |||
323 | status = AE_BAD_PARAMETER; | 342 | status = AE_BAD_PARAMETER; |
324 | break; | 343 | break; |
325 | } | 344 | } |