diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-05-26 07:50:48 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-12 08:55:50 +0400 |
commit | b681f7d9ab4d697a214fa4428795790c3a937a89 (patch) | |
tree | c5653b6da518198ca3d7fd13f5f8442428955e1f /drivers/acpi/acpica/hwvalid.c | |
parent | 9cbfa18e8a7b34a32eddbd914a07f085962f50a8 (diff) | |
download | linux-b681f7d9ab4d697a214fa4428795790c3a937a89.tar.xz |
ACPICA: Truncate I/O addresses to 16 bits for Windows compatibility
This feature is optional and is enabled if the BIOS requests any
Windows OSI strings. It can also be enabled by the host OS.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwvalid.c')
-rw-r--r-- | drivers/acpi/acpica/hwvalid.c | 12 |
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) u32 one_byte; u32 i; + /* Truncate address to 16 bits if requested */ + + if (acpi_gbl_truncate_io_addresses) { + address &= ACPI_UINT16_MAX; + } + /* Validate the entire request and perform the I/O */ 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) acpi_status status; u32 i; + /* Truncate address to 16 bits if requested */ + + if (acpi_gbl_truncate_io_addresses) { + address &= ACPI_UINT16_MAX; + } + /* Validate the entire request and perform the I/O */ status = acpi_hw_validate_io_request(address, width); |