Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Chen Gang <gang.chen.5i5j@xxxxxxxxx>, Sam Ravnborg <sam@xxxxxxxxxxxx>
- Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Tue, 12 Aug 2014 23:51:34 -0700
- Cc: Arnd Bergmann <arnd@xxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Jean Delvare <jdelvare@xxxxxxx>, linux@xxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, msalter@xxxxxxxxxx, a-jacquiot@xxxxxx, tony.luck@xxxxxxxxx, fenghua.yu@xxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, x86@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx
- In-reply-to: <53EAF85E.3000208@gmail.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <53EA99C3.90203@gmail.com> <20140813050809.GB30459@ravnborg.org> <53EAF85E.3000208@gmail.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0
On 08/12/2014 10:32 PM, Chen Gang wrote:
>
> Yeah, we need.
>
>> The solution you suggest assumes that an arch is either little or big endian.
>> But we cannot ignore the hybriads that can do both.
>>
>
> For the architectures which can do both, for me, they are: sh, powerpc,
> m32r, and mips (may mark CPU_LITTLE_ENDIAN), also are: arm/arm64, and
> c6x (may mark !CPU_BIG_ENDIAN).
>
> For the architectures which only support little endian: x86, and ia64.
>
> The left, I assumes they are big endian (no any 'ENDIAN' can be found
> in their Kconfig files). In my memory, except related with Intel, all
> are (or support) big endian.
>
I'm quite certain that is wrong. From memory, for example, I believe
CRIS is littleendian, and sure enough:
: tazenda 103 ; less arch/cris/include/uapi/asm/byteorder.h
#ifndef _CRIS_BYTEORDER_H
#define _CRIS_BYTEORDER_H
#include <linux/byteorder/little_endian.h>
#endif
As far as I know, endianism is always a compile-time option on Linux, so
we should be able to relatively easily define the architecture so that
we either have hardwired littleendian, bigendian, or prompt.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]