kernel oops due to unaligned access with lswi

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Nov 16 21:17:11 EST 2003


On Sun, 2003-11-16 at 09:59, David Edelsohn wrote:
> 	I didn't mean that lswi cannot take an alignment exception on some
> PPC implementations, but that lswi is suppose to be able to handle block
> loads from addresses with arbitrary alignment

I remember beeing regulary told (I think by Apple while I was still
doing MacOS hacking) that those string instructions were evil,
deprecated, and should be avoided as they weren't peforming better
than the equivalent set of load/store instructions... Is this
still true ? In which case we may want to avoid generating them
from gcc..

Also, if the 601 effectively gets alignement exceptions on these,
it's quite bad to have them implicitely generated by gcc for memcpy's
since our OFs seem to not implement the alignement handler for them,
thus breaking our boot wrappers.

Finally, the pem32b at least seem to be clear about not encouraging
to use these especially on non-aligned accesses. It looks like a
weird optimisation to do for memcpy...

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list