[PATCH 2/3] support ARM BE8 mode on a little endian machine
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Jan 21 04:46:49 EST 2011
On Wed, Jan 19, 2011 at 02:44:46PM +0800, Stanley.Miao wrote:
> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> index a00055d..a33075b 100644
> --- a/arch/arm/boot/compressed/head.S
> +++ b/arch/arm/boot/compressed/head.S
> @@ -131,6 +131,9 @@ start:
> mov r0, r0
> .endr
>
> +#ifdef CONFIG_BE8_ON_LE
> + setend be
> +#endif
This should not be before the magic numbers.
> b 1f
> .word 0x016f2818 @ Magic numbers to help the loader
> .word start @ absolute load/run zImage address
> diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
> index f1e5a9b..1504d09 100644
> --- a/arch/arm/include/asm/setup.h
> +++ b/arch/arm/include/asm/setup.h
> @@ -173,15 +173,20 @@ struct tagtable {
> int (*parse)(const struct tag *);
> };
>
> +#ifdef CONFIG_BE8_ON_LE
> +#define read_tag(a) le32_to_cpu(a)
> +#else
> +#define read_tag(a) a
> +#endif
I think this is going to cause sparse errors. Has it been checked with
sparse?
What about those structures which contain u8's and u16's ? These can't
be dealt with a le32_to_cpu().
More information about the linux-arm-kernel
mailing list