diff options
author | Myron Stowe <myron.stowe@hp.com> | 2010-10-21 16:23:48 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-24 23:24:54 -0400 |
commit | b3ba1efec2a58f4dc0647f4c0099c27d6ab92595 (patch) | |
tree | e2bf00b49397490010cd1adca34c89cdb27961da /drivers/acpi | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) |
ACPI: Fix ioremap size for MMIO reads and writes
The size used for I/O remapping MMIO read and write accesses has not
accounted for the basis of ACPI's Generic Address Structure (GAS)
'Register Bit Width' field which is bits, not bytes. This patch
adjusts the ioremap() 'size' argument accordingly.
ACPI "Generic Register" reference:
ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address
Structure".
Signed-off-by: Myron Stowe <myron.stowe@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/osl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 65b25a303b86..58842fb9fd90 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -496,7 +496,7 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width) | |||
496 | u32 dummy; | 496 | u32 dummy; |
497 | void __iomem *virt_addr; | 497 | void __iomem *virt_addr; |
498 | 498 | ||
499 | virt_addr = ioremap(phys_addr, width); | 499 | virt_addr = ioremap(phys_addr, width / 8); |
500 | if (!value) | 500 | if (!value) |
501 | value = &dummy; | 501 | value = &dummy; |
502 | 502 | ||
@@ -524,7 +524,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width) | |||
524 | { | 524 | { |
525 | void __iomem *virt_addr; | 525 | void __iomem *virt_addr; |
526 | 526 | ||
527 | virt_addr = ioremap(phys_addr, width); | 527 | virt_addr = ioremap(phys_addr, width / 8); |
528 | 528 | ||
529 | switch (width) { | 529 | switch (width) { |
530 | case 8: | 530 | case 8: |