[PATCH 05/17] ARM: fixup_pv_table bug when CPU_ENDIAN_BE8

Nicolas Pitre nico at fluxnic.net
Tue Feb 12 16:45:34 EST 2013


On Mon, 11 Feb 2013, Ben Dooks wrote:

> On 09/02/13 03:40, Nicolas Pitre wrote:
> > On Fri, 8 Feb 2013, Ben Dooks wrote:
> > 
> > > 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.
> > > 
> > > Note, not tested against an actual bug, it looked wrong.
> > 
> > You are missing the CONFIG_THUMB2_KERNEL counterpart.
> 
> Sorry, I will have a look into that, although I may need
> some help on that as I don't have any experience with
> CONFIG_THUMB2_KERNEL or a userland to test with.

You don't need to change your userland.  The kernel may be compiled 
using the Thumb2 instruction set even if userland is traditional ARM 
mode.


Nicolas



More information about the linux-arm-kernel mailing list