[parisc-linux] to swap or not to swap

Alan Cox alan@lxorguk.ukuu.org.uk
Tue, 13 Nov 2001 22:51:54 +0000 (GMT)


> Grant also seems to be of the opinion that cpu data needs to be swapped
> before written to PCI devices... so does that mean that if i wrote
> something like:
> 
> writew(cpu_to_le16(foo), addr)
> 
> then on things like parisc it gets swapped once, and on things like
> sparc it gets swapped twice?

Constant swaps get optimised out by the compiler in theory though.