[openib-general] [PATCH 0/7] AMSO1100 RNIC Driver
Roland Dreier
rdreier at cisco.com
Thu Mar 9 07:36:02 PST 2006
Roland> I just realized that the amso1100 driver probably won't
Roland> work on a big-endian architecture. This is actually
Roland> because your hardware is itself big-endian, so you end up
Roland> doing stuff like
Roland> writel(cpu_to_be32(foo), bar);
Tom> Er... isn't cpu_to_be32 a no-op when the processor is itself
Tom> big-endian?
Yes, that's part of the problem. On a big-endian arch, writel()
itself has an implied swap to little-endian, because PCI is assumed to
be little-endian. For example, on ppc32, writel() is defined to
out_le32(), which uses the stwbrx instruction to do a byte-swapping store.
- R.
More information about the general
mailing list