Messages in this thread | | | Subject | Re: [RFC/PATCH] iomap: Add specific address space __iomap for iomap pointers | From | Benjamin Herrenschmidt <> | Date | Mon, 18 Feb 2008 15:28:24 +1100 |
| |
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.
| |