ARM: alignment: correctly decode instructions in BE8 mode.
authorBen Dooks <ben.dooks@codethink.co.uk>
Thu, 18 Jul 2013 20:10:56 +0000 (21:10 +0100)
committerBen Dooks <ben.dooks@codethink.co.uk>
Sat, 19 Oct 2013 19:46:34 +0000 (20:46 +0100)
commit8592edf0dec8159fde379eb7e056eaddbbd697f2
tree9865e21372daae64f705b167a00af979b9ff931f
parent98dec91fa36a4a74f7c44dd2dfb000203656f4f4
ARM: alignment: correctly decode instructions in BE8 mode.

If we are in BE8 mode, we must deal with the instruction stream being
in LE order when data is being loaded in BE order. Ensure the data is
swapped before processing to avoid thre following:

Change to using <asm/opcodes.h> to provide the necessary conversion
functions to change the byte ordering.

This stops the following warning messages from the kernel on a fault:

Unhandled fault: alignment exception (0x001) at 0xbfa09567
Alignment trap: not handling instruction 030091e8 at [<80333e8c>]

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
arch/arm/mm/alignment.c