alignment handler instruction endian-ness

Jon Medhurst (Tixy) tixy at linaro.org
Fri Jul 19 10:01:02 EDT 2013


On Fri, 2013-07-19 at 12:09 +0100, Russell King - ARM Linux wrote:
> On Fri, Jul 19, 2013 at 11:58:45AM +0100, Ben Dooks wrote:
> > I ran in to an issue with the alignment handler when running BE8 where
> > it loads instructions and fails to swap.
> >
> > Is there a better way of swapping instructions for ARM when loading
> > from arbitrary places? Have I missed any other places this could happen?
> 
> Maybe we need a macro which deals with this automatically?

Like the stuff in arch/arm/include/asm/opcodes.h ?

> 	arm_instr_to_cpu(x)
> 	thumb_instr_to_cpu(x)
> 
> These should probably make use of the swab*() macros when an endian swap
> is needed.
> 
> > The following patch is my first attempt at solving the problem for the
> > alignment handler:
> 
> I'd suggest checking this with sparse too - you have some type errors here.
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel





More information about the linux-arm-kernel mailing list