Endianness versus too many byte swaps??

Fillod Stephane stephane.fillod at thomson.net
Tue Mar 6 02:12:27 EST 2007


Charles Krinke wrote:
[...]
>I am told that we are running this ppc in big endian, so would this
mean
>that readl & writel should actually be resolving to in_be32/out_be32
>respectively? Is there some other setup that may be wrong?

IIRC, readl and writel were defined this way in order to ease PCI driver

portability from x86 PC centric world to big-endian arch's.

That's why now I'm always using in_be*/out_be*/in_le*/out_le*, to make
things explicit, and let the header files do the swapping if need be.

Regards
-- 
Stephane



More information about the Linuxppc-embedded mailing list