[PATCH 09/17] ARM: add atag32_to_cpu() function

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Feb 11 14:30:59 EST 2013


On Mon, Feb 11, 2013 at 07:15:19PM +0000, Ben Dooks wrote:
> It isn't defined, and I have failed to find any information on
> it online. I have no idea if the IXP devices ran their boot-loader
> in big-endian or little-endian format?

It will be native endian, because that's the format which we've supported
up to now.

>> 1. define all tags using a new __atagXX, etc types.
>> 2. always use atagXX_to_cpu() to read these.
>> 3. Implement:
>>
>> #if defined(CONFIG_ATAG_LE)
>> typedef __le32 __atag32;
>> ...
>> #define atag32_to_cpu(x) le32_to_cpu(x)
>> ...
>> #elif defined(CONFIG_ATAG_BE)
>> typedef __be32 __atag32;
>> ...
>> #define atag32_to_cpu(x) be32_to_cpu(x)
>> ...
>> #elif defined(CONFIG_ATAG_NE)
>> typedef __u32 __atag32;
>> ...
>> #define atag32_to_cpu(x) x
>> ...
>> #endif
>>
>> and select the appropriate definition.  Obviously, this is a fundamental
>> configuration just like the overall BE/LE configuration of the kernel.
>
> Ok, should I sort out doing that for the next round of patches?

Yes please.

> Should the ATAG_xx configurations go into arch/arm/Kconfig or
> is there somewhere better for them to go?

arch/arm/Kconfig for the time being.  I've debated about moving some
config options to arch/arm/boot/Kconfig



More information about the linux-arm-kernel mailing list