kernel oops due to unaligned access with lswi

Kumar Gala kumar.gala at motorola.com
Mon Nov 17 04:49:32 EST 2003


If Ben's comments are correct simply removing -mstring as an option
passed to the build should get the desired behavior.

- kumar

On Nov 16, 2003, at 4:17 AM, Benjamin Herrenschmidt wrote:

>
> 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