On Fri, Feb 24, 2012 at 05:22:14PM -0600, Timur Tabi wrote:
Russell King - ARM Linux wrote:
What would be wrong with converting in_be32() in these drivers to instead ioread32be()?
Well, it wouldn't actually fix any problems. It's just a stylistic change for PowerPC. On ARM, however, ioread32be() is wrong because the SSI registers are little-endian.
So, to go around the loop a little further: to make this driver work _unaltered_ on ARM, we'd need an in_32be() that read the register _without_ doing the byte swapping.
But then, such an implementation of in_32be() would be absurd because it's not doing what it says.
So, the driver needs to change its accessor method. There is no accessor in existance at present which does the right thing.
And then I went on to explain that there's more complicated cases too, where it seems that in theory you can end up with the same IP connected in BE mode and sitting behind a PCI bus, which presents the need for accessors which know the bus type by some means.