aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/exregion.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/exregion.c')
-rw-r--r--drivers/acpi/acpica/exregion.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 486b2e5661b6..531000fc77d2 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -105,7 +105,7 @@ acpi_ex_system_memory_space_handler(u32 function,
105 break; 105 break;
106 106
107 default: 107 default:
108 ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %d", 108 ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u",
109 bit_width)); 109 bit_width));
110 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 110 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
111 } 111 }
@@ -173,7 +173,7 @@ acpi_ex_system_memory_space_handler(u32 function,
173 mem_info->mapped_logical_address = acpi_os_map_memory((acpi_physical_address) address, map_length); 173 mem_info->mapped_logical_address = acpi_os_map_memory((acpi_physical_address) address, map_length);
174 if (!mem_info->mapped_logical_address) { 174 if (!mem_info->mapped_logical_address) {
175 ACPI_ERROR((AE_INFO, 175 ACPI_ERROR((AE_INFO,
176 "Could not map memory at %8.8X%8.8X, size %X", 176 "Could not map memory at 0x%8.8X%8.8X, size %u",
177 ACPI_FORMAT_NATIVE_UINT(address), 177 ACPI_FORMAT_NATIVE_UINT(address),
178 (u32) map_length)); 178 (u32) map_length));
179 mem_info->mapped_length = 0; 179 mem_info->mapped_length = 0;
@@ -491,8 +491,10 @@ acpi_ex_data_table_space_handler(u32 function,
491{ 491{
492 ACPI_FUNCTION_TRACE(ex_data_table_space_handler); 492 ACPI_FUNCTION_TRACE(ex_data_table_space_handler);
493 493
494 /* Perform the memory read or write */ 494 /*
495 495 * Perform the memory read or write. The bit_width was already
496 * validated.
497 */
496 switch (function) { 498 switch (function) {
497 case ACPI_READ: 499 case ACPI_READ:
498 500
@@ -502,9 +504,14 @@ acpi_ex_data_table_space_handler(u32 function,
502 break; 504 break;
503 505
504 case ACPI_WRITE: 506 case ACPI_WRITE:
507
508 ACPI_MEMCPY(ACPI_PHYSADDR_TO_PTR(address),
509 ACPI_CAST_PTR(char, value), ACPI_DIV_8(bit_width));
510 break;
511
505 default: 512 default:
506 513
507 return_ACPI_STATUS(AE_SUPPORT); 514 return_ACPI_STATUS(AE_BAD_PARAMETER);
508 } 515 }
509 516
510 return_ACPI_STATUS(AE_OK); 517 return_ACPI_STATUS(AE_OK);