diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2013-02-01 15:23:08 (GMT) |
---|---|---|
committer | Ben Dooks <ben.dooks@codethink.co.uk> | 2013-10-19 19:46:33 (GMT) |
commit | 2f9bf9beddb1649485b47302a5aba9761cbc9084 (patch) | |
tree | 081553c2289fe7f1964550c01b5bc420cf0796cd /arch/arm/kernel/sleep.S | |
parent | 457c2403c513c74f60d5757fd11ae927e5554a38 (diff) | |
download | linux-fsl-qoriq-2f9bf9beddb1649485b47302a5aba9761cbc9084.tar.xz |
ARM: fixup_pv_table bug when CPU_ENDIAN_BE8
The fixup_pv_table assumes that the instructions are in the same
endian configuration as the data, but when the CPU is running in
BE8 the instructions stay in little-endian format.
Make sure if CONFIG_CPU_ENDIAN_BE8 is set that we do all the
alterations to the instructions taking in to account the LDR/STR
will be swapping the data endian-ness.
Since the code is only modifying a byte, we avoid dual-swapping
the data, and just change the bits we clear and ORR in (in the
case where the code is not thumb2).
For thumb2, we add the necessary rev16 instructions to ensure that
the instructions are processed in the correct format, as it was
easier than re-writing the code to contain a mask and shift.
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>
Diffstat (limited to 'arch/arm/kernel/sleep.S')
0 files changed, 0 insertions, 0 deletions