• Lennert Buytenhek's avatar
    [ARM PATCH] 2473/1: fix alignment trap handler for big-endian · 7f6f4406
    Lennert Buytenhek authored
    Patch from Lennert Buytenhek
    
    The alignment trap handler in arch/arm/mm/alignment.c performs halfword
    and word accesses by translating them into byte accessing and then
    combining the pieces.  However, it assumes little-endian byte ordering
    in doing so, which causes unaligned accesses on big-endian platforms
    to erroneously load or store byteswapped data.
    This patch was pulled from an old 2.4 -ds tree, and appears to fix the
    issue.  It was submitted for 2.4 at the time (ARM patch ID 1205/1206),
    but rejected since big-endian ARM platforms are not supported in 2.4.
    
    Signed-off-by: Lennert Buytenhek
    Signed-off-by: Russell King
    7f6f4406
alignment.c 18.7 KB