Re: Do cpu-endian MMIO accessors exist?

From: Arnd Bergmann
Date: Tue Jul 21 2009 - 17:18:14 EST


On Tuesday 21 July 2009, Jiri Slaby wrote:
> > Do cpu-endian MMIO accessors exist? What should I use, or do I just
> > have to use #ifdef __BIG_ENDIAN?
>
> There is __raw_readl which doesn't switch bytes.

__raw_readl is not a replacement for real accessors like
ioread32 or in_be32, because it does not synchronize with the
instruction stream.

The best solution would be if you could find a way to set
the hardware into little-endian mode on all architectures.
>From the description, it sounds like the hardware should allow that.

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