Re: lib/iomap.c mmio_{in,out}s* vs. __raw_* accessors

Benjamin Herrenschmidt
2006-11-04T22:18:47Z

On Sat, 2006-11-04 at 14:06 +0000, Russell King wrote:
> On Sat, Nov 04, 2006 at 06:52:41PM +1100, Benjamin Herrenschmidt wrote:
> > In fact, I would be very very very much in favor of, instead of the
> > above, defining a set of:
> >
> > readsb, readsw, readsl, readsq
> > writesb, writesw, writesl, writesq
>
> ARM already has these. Sounds like a good idea for everyone else to also
> implement them. 8)

Ok, powerpc will have these in 2.6.20 then :-)

I'm tempted to remove those mmio_* things from iomap.c completely. I
need to check who uses them, but in all cases, I don't see what they do
in iomap.c, it's not their place.

Versions that would transparently use MMIO or PIO would make sense. A
pure MMIO implementation doesn't, that has to be arch specific. It makes
the generic iomap suddently non-portable in some ways.

So I think we need to make sure all archs grow readsb,sw,sl etc... and
just have iomap use those for the "transparent" versions.

Ben.