Re: [PATCH] Use acpi_os_map_memory() instead of ioremap() in einj driver

From: Tony Luck
Date: Tue Jan 24 2012 - 21:07:27 EST


On Tue, Jan 24, 2012 at 5:49 PM, Chen Gong <gong.chen@xxxxxxxxxxxxxxx> wrote:
> I can understand why here C memory access model can work because ACPI table
> is in physical memory zone but not in device space, but I still have
> two confusion: 1)why ioremap fail but acpi_os_map_memory can work? In
> essential
> acpi_os_map_memory is ioremap (or precisely, ioremap_cache), right?

Myron has been asking the same questions. Probably the difference is
between cache and nocache. But it unclear what changed between 3.2-rc7
(where these ioremap() calls worked) and 3.3-rc1 (where they fail).

> 2)since acpi_os_map_memory is io mapping too (though it is a little bit
> special), read/write should work besides *C memory access*. If so, why
> removing
> read/write here? Some ARCH compatibility or compilation issue?

It's just prettier - avoids the need for the local copies of readq()/writeq()
for 32-bit systems too.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/