aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwvalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/hwvalid.c')
-rw-r--r--drivers/acpi/acpica/hwvalid.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index c10d587c1641..e1d9c777b213 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -222,6 +222,12 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
222 u32 one_byte; 222 u32 one_byte;
223 u32 i; 223 u32 i;
224 224
225 /* Truncate address to 16 bits if requested */
226
227 if (acpi_gbl_truncate_io_addresses) {
228 address &= ACPI_UINT16_MAX;
229 }
230
225 /* Validate the entire request and perform the I/O */ 231 /* Validate the entire request and perform the I/O */
226 232
227 status = acpi_hw_validate_io_request(address, width); 233 status = acpi_hw_validate_io_request(address, width);
@@ -279,6 +285,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
279 acpi_status status; 285 acpi_status status;
280 u32 i; 286 u32 i;
281 287
288 /* Truncate address to 16 bits if requested */
289
290 if (acpi_gbl_truncate_io_addresses) {
291 address &= ACPI_UINT16_MAX;
292 }
293
282 /* Validate the entire request and perform the I/O */ 294 /* Validate the entire request and perform the I/O */
283 295
284 status = acpi_hw_validate_io_request(address, width); 296 status = acpi_hw_validate_io_request(address, width);