All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Sam Ravnborg <sam@ravnborg.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	akpm@linux-foundation.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Jean Delvare <jdelvare@suse.de>,
	linux@arm.linux.org.uk, catalin.marinas@arm.com,
	will.deacon@arm.com, msalter@redhat.com, a-jacquiot@ti.com,
	tony.luck@intel.com, fenghua.yu@intel.com, tglx@linutronix.de,
	mingo@redhat.com, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
Date: Wed, 13 Aug 2014 15:44:18 +0800	[thread overview]
Message-ID: <53EB1752.9010601@gmail.com> (raw)
In-Reply-To: <53EB0AF6.6060208@zytor.com>



On 8/13/14 14:51, H. Peter Anvin wrote:
> 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
> 

OK, what you said sounds reasonable to me. After search "endian" in
"./arch", xtensa also can be support both big endian or little endian.

> 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.
> 

Yeah, but that may break building and re-config manually. So it is still
necessary to check little endian or big endian during configuration time
("make *config").


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Sam Ravnborg <sam@ravnborg.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	akpm@linux-foundation.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Jean Delvare <jdelvare@suse.de>,
	linux@arm.linux.org.uk, catalin.marinas@arm.com,
	will.deacon@arm.com, msalter@redhat.com, a-jacquiot@ti.com,
	tony.luck@intel.com, fenghua.yu@intel.com, tglx@linutronix.de,
	mingo@redhat.com, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl
Date: Wed, 13 Aug 2014 07:44:18 +0000	[thread overview]
Message-ID: <53EB1752.9010601@gmail.com> (raw)
In-Reply-To: <53EB0AF6.6060208@zytor.com>



On 8/13/14 14:51, H. Peter Anvin wrote:
> 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
> 

OK, what you said sounds reasonable to me. After search "endian" in
"./arch", xtensa also can be support both big endian or little endian.

> 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.
> 

Yeah, but that may break building and re-config manually. So it is still
necessary to check little endian or big endian during configuration time
("make *config").


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

WARNING: multiple messages have this Message-ID (diff)
From: gang.chen.5i5j@gmail.com (Chen Gang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
Date: Wed, 13 Aug 2014 15:44:18 +0800	[thread overview]
Message-ID: <53EB1752.9010601@gmail.com> (raw)
In-Reply-To: <53EB0AF6.6060208@zytor.com>



On 8/13/14 14:51, H. Peter Anvin wrote:
> 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
> 

OK, what you said sounds reasonable to me. After search "endian" in
"./arch", xtensa also can be support both big endian or little endian.

> 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.
> 

Yeah, but that may break building and re-config manually. So it is still
necessary to check little endian or big endian during configuration time
("make *config").


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2014-08-13  7:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12 22:48 [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-12 22:48 ` Chen Gang
2014-08-12 22:48 ` Chen Gang
2014-08-13  5:08 ` Sam Ravnborg
2014-08-13  5:08   ` Sam Ravnborg
2014-08-13  5:08   ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Sam Ravnborg
2014-08-13  5:32   ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-13  5:32     ` Chen Gang
2014-08-13  5:32     ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Chen Gang
2014-08-13  6:51     ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly H. Peter Anvin
2014-08-13  6:51       ` H. Peter Anvin
2014-08-13  6:51       ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl H. Peter Anvin
2014-08-13  7:44       ` Chen Gang [this message]
2014-08-13  7:44         ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-13  7:44         ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Chen Gang
2014-08-13  8:03 ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Geert Uytterhoeven
2014-08-13  8:03   ` Geert Uytterhoeven
2014-08-13  8:03   ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Geert Uytterhoeven
2014-08-13  8:16   ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-13  8:16     ` Chen Gang
2014-08-13  8:16     ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Chen Gang
2014-08-22 11:09   ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Michal Marek
2014-08-22 11:09     ` Michal Marek
2014-08-22 11:09     ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Michal Marek
2014-08-23  2:31     ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-23  2:31       ` Chen Gang
2014-08-23  2:31       ` [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitl Chen Gang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53EB1752.9010601@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=a-jacquiot@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=hpa@zytor.com \
    --cc=jdelvare@suse.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@redhat.com \
    --cc=msalter@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.