Re: Do cpu-endian MMIO accessors exist?

From: Pekka Paalanen
Date: Thu Jul 23 2009 - 12:23:49 EST


On Wed, 22 Jul 2009 23:19:12 +0200
Arnd Bergmann <arnd@xxxxxxxx> wrote:

> > > It would of course be easy to just define an API extension
> > > to ioread along the lines of
> > >
> > > #ifdef __BIG_ENDIAN
> > > #define ioread16_native ioread16be
> > > #define ioread32_native ioread32be
> > > #define iowrite16_native iowrite16be
> > > #define iowrite32_native iowrite32be
> > > #else
> > > #define ioread16_native ioread16
> > > #define ioread32_native ioread32
> > > #define iowrite16_native iowrite16
> > > #define iowrite32_native iowrite32
> > > #endif
> > >
> > > but I'm not yet convinced that there is a potential user that
> > > should not just be fixed in a different way.
> >
> > This is how it currently is.
>
> Well, I meant we could add it to asm-generic/iomap.h. If we
> decide that this is the right approach after all, it should
> be part of the common linux API, not private to a single driver.

Yes, I understood. I believe I should wait until Nouveau gets ready
to be sent upstream before proposing your extension as a real patch.


Thank you very much.

--
Pekka Paalanen
http://www.iki.fi/pq/
--
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/