aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r--drivers/acpi/executer/exconfig.c17
-rw-r--r--drivers/acpi/executer/exstorob.c2
2 files changed, 13 insertions, 6 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
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
index 18925f5b313c..99ebe5adfcda 100644
--- a/drivers/acpi/executer/exstorob.c
+++ b/drivers/acpi/executer/exstorob.c
@@ -103,7 +103,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
103 * NOTE: ACPI versions up to 3.0 specified that the buffer must be 103 * NOTE: ACPI versions up to 3.0 specified that the buffer must be
104 * truncated if the string is smaller than the buffer. However, "other" 104 * truncated if the string is smaller than the buffer. However, "other"
105 * implementations of ACPI never did this and thus became the defacto 105 * implementations of ACPI never did this and thus became the defacto
106 * standard. ACPi 3.0_a changes this behavior such that the buffer 106 * standard. ACPI 3.0_a changes this behavior such that the buffer
107 * is no longer truncated. 107 * is no longer truncated.
108 */ 108 */
109 109