diff options
Diffstat (limited to 'drivers/acpi/executer/exconfig.c')
-rw-r--r-- | drivers/acpi/executer/exconfig.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 9c46f3338640..9ae3cb55979b 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -298,6 +298,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
298 | struct acpi_table_header *table_ptr = NULL; | 298 | struct acpi_table_header *table_ptr = NULL; |
299 | acpi_physical_address address; | 299 | acpi_physical_address address; |
300 | struct acpi_table_header table_header; | 300 | struct acpi_table_header table_header; |
301 | acpi_integer temp; | ||
301 | u32 i; | 302 | u32 i; |
302 | 303 | ||
303 | ACPI_FUNCTION_TRACE(ex_load_op); | 304 | ACPI_FUNCTION_TRACE(ex_load_op); |
@@ -326,7 +327,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
326 | 327 | ||
327 | address = obj_desc->region.address; | 328 | address = obj_desc->region.address; |
328 | 329 | ||
329 | /* Get the table length from the table header */ | 330 | /* Get part of the table header to get the table length */ |
330 | 331 | ||
331 | table_header.length = 0; | 332 | table_header.length = 0; |
332 | for (i = 0; i < 8; i++) { | 333 | for (i = 0; i < 8; i++) { |
@@ -334,11 +335,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
334 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, | 335 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, |
335 | (acpi_physical_address) | 336 | (acpi_physical_address) |
336 | (i + address), 8, | 337 | (i + address), 8, |
337 | ((u8 *) & | 338 | &temp); |
338 | table_header) + i); | ||
339 | if (ACPI_FAILURE(status)) { | 339 | if (ACPI_FAILURE(status)) { |
340 | return_ACPI_STATUS(status); | 340 | return_ACPI_STATUS(status); |
341 | } | 341 | } |
342 | |||
343 | /* Get the one valid byte of the returned 64-bit value */ | ||
344 | |||
345 | ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp; | ||
342 | } | 346 | } |
343 | 347 | ||
344 | /* Sanity check the table length */ | 348 | /* Sanity check the table length */ |
@@ -361,11 +365,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
361 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, | 365 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, |
362 | (acpi_physical_address) | 366 | (acpi_physical_address) |
363 | (i + address), 8, | 367 | (i + address), 8, |
364 | ((u8 *) table_ptr + | 368 | &temp); |
365 | i)); | ||
366 | if (ACPI_FAILURE(status)) { | 369 | if (ACPI_FAILURE(status)) { |
367 | goto cleanup; | 370 | goto cleanup; |
368 | } | 371 | } |
372 | |||
373 | /* Get the one valid byte of the returned 64-bit value */ | ||
374 | |||
375 | ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp; | ||
369 | } | 376 | } |
370 | break; | 377 | break; |
371 | 378 | ||