On Mon, Oct 24, 2011 at 8:48 PM, Huang Ying <ying.huang@xxxxxxxxx> wrote: > Sorry for late. > > On 10/22/2011 05:42 AM, Luck, Tony wrote: >> Callers to __acpi_ioremap_fast() pass the bit_width that they found in the >> acpi_generic_address structure. Convert from bits to bytes when passing to >> __acpi_find_iomap() - as it wants to see bytes, not bits. >> >> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx> >> --- >> drivers/acpi/atomicio.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/acpi/atomicio.c b/drivers/acpi/atomicio.c >> index 252888f..70ffb71 100644 >> --- a/drivers/acpi/atomicio.c >> +++ b/drivers/acpi/atomicio.c >> @@ -78,7 +78,7 @@ static void __iomem *__acpi_ioremap_fast(phys_addr_t paddr, >> { >> struct acpi_iomap *map; >> >> - map = __acpi_find_iomap(paddr, size); >> + map = __acpi_find_iomap(paddr, size/8); >> if (map) >> return map->vaddr + (paddr - map->paddr); >> else > > Good catch! Thanks. > > Or change the caller acpi_atomic_read_mem/write_mem? Myron posted a nice patch recently to remove atomicio.c altogether: http://marc.info/?l=linux-acpi&m=131733358818849&w=2 I haven't seen any response to it, but I think it's a nice approach and it gets rid of all this special-case pre-map, post-unmap, atomic read/write stuff. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html