提交 b3ba1efe 编写于 作者: M Myron Stowe 提交者: Len Brown

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: NMyron Stowe <myron.stowe@hp.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 f6f94e2a
......@@ -496,7 +496,7 @@ acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 width)
u32 dummy;
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
virt_addr = ioremap(phys_addr, width / 8);
if (!value)
value = &dummy;
......@@ -524,7 +524,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
{
void __iomem *virt_addr;
virt_addr = ioremap(phys_addr, width);
virt_addr = ioremap(phys_addr, width / 8);
switch (width) {
case 8:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册