Re: [RFC/PATCH] iomap: Add specific address space __iomap foriomap pointers

From: Benjamin Herrenschmidt
Date: Sun Feb 17 2008 - 23:30:10 EST



On Mon, 2008-02-18 at 14:35 +1100, Benjamin Herrenschmidt wrote:
> The current iomap stuff (pci_iomap, ioport_map, pcim_iomap, ...) is
> confusing as it returns pointers in the _miomem address space.
>
> However, even if that would work on some architectures, the result
> of those functions is -not- to be used as an __iomem, with accessors
> such as readl/writel, but only with the new brand of specific accessors
> (ioread32/iowrite32/...).

Willy and Al raised a good point off-list, is that in all effective
implementations of this, the MMIO case -does- use compatible virtual
addresses with ioremap, in fact even powerpc does.

Thus if we consider iomap as a kind of superset of the ioremap space
with a "hole" in it for PIO, it's fine to use the same address space
marker and it's fine to interchange the accessors when one -knows-
for sure it's dealing with memory and not IO.

Thus drop my patch,

Ben.


--
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/