Thread (14 messages) 14 messages, 5 authors, 2014-08-25

Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly

From: Chen Gang <hidden>
Date: 2014-08-14 22:15:07
Also in: linux-alpha, linux-m68k, linux-mips, linux-um

On 08/15/2014 02:04 AM, Ralf Baechle wrote:
On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:
quoted
Normal architectures:

 - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc

 - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300,
                  score, unicore32, x86

 - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh
Nak for MIPS.  On MIPS Kconfig already always sets one of CPU_BIG_ENDIAN
and CPU_LITTLE_ENDIAN depending on platforms and where both endianess are
supported by a platform, user choice:

config FOO
	bool "foo"
	select SYS_SUPPORTS_LITTLE_ENDIAN

config FOO
	bool "foo"
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_LITTLE_ENDIAN
[...]
choice
        prompt "Endianess selection"
        help
          Some MIPS machines can be configured for either little or big endian
          byte order. These modes require different kernels and a different
          Linux distribution.  In general there is one preferred byteorder for a
          particular system but some systems are just as commonly used in the
          one or the other endianness.

config CPU_BIG_ENDIAN
        bool "Big endian"
        depends on SYS_SUPPORTS_BIG_ENDIAN

config CPU_LITTLE_ENDIAN
        bool "Little endian"
        depends on SYS_SUPPORTS_LITTLE_ENDIAN
        help

endchoice
OK, thanks, I assumes when support both endian, the default choice is
CPU_BIG_ENDIAN, although no default value for choice (originally, I did
worry about it).
So I think you can just drop the MIPS segment from your patch.
If what I assumes is correct, what you said sounds reasonable to me.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help