All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 16:54 ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 16:54 UTC (permalink / raw)
  To: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

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

Special architectures:

 - Deside by compiler: microblaze, tile, xtensa.

 - Deside by building host: um

 - Next, need improve Kbuild to probe endian to deside whether need mark
   __BUILDING_TIME_BIG_ENDIAN__ before real config.

Another improvements:

 - score: use '\t' instead of ' '.

 - s390: sort the select value in alpha order.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/alpha/Kconfig      |  1 +
 arch/arc/Kconfig        |  1 +
 arch/arm/Kconfig        |  1 +
 arch/arm64/Kconfig      |  1 +
 arch/avr32/Kconfig      |  1 +
 arch/blackfin/Kconfig   |  1 +
 arch/c6x/Kconfig        |  1 +
 arch/cris/Kconfig       |  1 +
 arch/frv/Kconfig        |  1 +
 arch/hexagon/Kconfig    |  1 +
 arch/ia64/Kconfig       |  1 +
 arch/m32r/Kconfig       |  1 +
 arch/m68k/Kconfig       |  1 +
 arch/metag/Kconfig      |  1 +
 arch/microblaze/Kconfig |  2 ++
 arch/mips/Kconfig       |  1 +
 arch/mn10300/Kconfig    |  1 +
 arch/openrisc/Kconfig   |  1 +
 arch/parisc/Kconfig     |  1 +
 arch/powerpc/Kconfig    |  1 +
 arch/s390/Kconfig       |  3 ++-
 arch/score/Kconfig      | 21 +++++++++++----------
 arch/sparc/Kconfig      |  1 +
 arch/tile/Kconfig       |  2 ++
 arch/um/Kconfig.common  |  2 ++
 arch/unicore32/Kconfig  |  1 +
 arch/x86/Kconfig        |  1 +
 arch/xtensa/Kconfig     |  2 ++
 init/Kconfig            |  6 ++++++
 29 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index b7ff9a3..1cb7426 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -27,6 +27,7 @@ config ALPHA
 	select MODULES_USE_ELF_RELA
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
+	select CPU_LITTLE_ENDIAN
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 9596b0a..e939abd 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -35,6 +35,7 @@ config ARC
 	select OF_EARLY_FLATTREE
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32cbbd5..3a806b3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -12,6 +12,7 @@ config ARM
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 62b4ae1..c5a91de 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -17,6 +17,7 @@ config ARM64
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index b6878eb..fab44ee 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -17,6 +17,7 @@ config AVR32
 	select GENERIC_CLOCKEVENTS
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
+	select CPU_BIG_ENDIAN
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index ed30699..348f16d 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -40,6 +40,7 @@ config BLACKFIN
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 77ea09b..7e74d14 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -17,6 +17,7 @@ config C6X
 	select OF_EARLY_FLATTREE
 	select GENERIC_CLOCKEVENTS
 	select MODULES_USE_ELF_RELA
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	def_bool n
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 52731e2..405a097 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -52,6 +52,7 @@ config CRIS
 	select CLONE_BACKWARDS2
 	select OLD_SIGSUSPEND
 	select OLD_SIGACTION
+	select CPU_LITTLE_ENDIAN
 
 config HZ
 	int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 34aa193..aa21ccc 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -14,6 +14,7 @@ config FRV
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN
 
 config ZONE_DMA
 	bool
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 4dc89d1..ee91285 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -28,6 +28,7 @@ config HEXAGON
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CPU_DEVICES
 	select HAVE_DMA_ATTRS
+	select CPU_LITTLE_ENDIAN
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
 	  performance and low power across a wide variety of applications.
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index c84c88b..54f32c7 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -49,6 +49,7 @@ config IA64
 	select MODULES_USE_ELF_RELA
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_LITTLE_ENDIAN
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 9e44bbd..1932483 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -16,6 +16,7 @@ config M32R
 	select ARCH_USES_GETTIMEOFFSET
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN if !CPU_LITTLE_ENDIAN
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 87b7c75..7a7fe25 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -23,6 +23,7 @@ config M68K
 	select MODULES_USE_ELF_RELA
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
+	select CPU_BIG_ENDIAN
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 0b389a8..e57c6a0 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -29,6 +29,7 @@ config METAG
 	select OF
 	select OF_EARLY_FLATTREE
 	select SPARSE_IRQ
+	select CPU_LITTLE_ENDIAN
 
 config STACKTRACE_SUPPORT
 	def_bool y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 40e1c1d..d80ae78 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -7,6 +7,8 @@ config MICROBLAZE
 	select CLKSRC_OF
 	select CLONE_BACKWARDS3
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 900c7e5..671d822 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -52,6 +52,7 @@ config MIPS
 	select HAVE_CC_STACKPROTECTOR
 	select CPU_PM if CPU_IDLE
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 menu "Machine selection"
 
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index a648de1..60fb249 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -13,6 +13,7 @@ config MN10300
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config AM33_2
 	def_bool n
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 88e8336..4757b7d 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -23,6 +23,7 @@ config OPENRISC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
 	select OR1K_PIC
+	select CPU_BIG_ENDIAN
 
 config MMU
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 6e75e20..dc82137 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -29,6 +29,7 @@ config PARISC
 	select TTY # Needed for pdc_cons.c
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_BIG_ENDIAN
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4bc7b62..644c6d4 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -147,6 +147,7 @@ config PPC
 	select ARCH_USE_CMPXCHG_LOCKREF if PPC64
 	select HAVE_ARCH_AUDITSYSCALL
 	select ARCH_SUPPORTS_ATOMIC_RMW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config GENERIC_CSUM
 	def_bool CPU_LITTLE_ENDIAN
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 05c78bb..8691c6f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -62,6 +62,7 @@ config S390
 	def_bool y
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
+	select ARCH_HAS_SG_CHAIN
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select ARCH_INLINE_READ_LOCK
 	select ARCH_INLINE_READ_LOCK_BH
@@ -97,6 +98,7 @@ config S390
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS2
+	select CPU_BIG_ENDIAN
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES if !SMP
 	select GENERIC_FIND_FIRST_BIT
@@ -145,7 +147,6 @@ config S390
 	select TTY
 	select VIRT_CPU_ACCOUNTING
 	select VIRT_TO_BUS
-	select ARCH_HAS_SG_CHAIN
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4ac8cae..713b290 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -1,19 +1,20 @@
 menu "Machine selection"
 
 config SCORE
-       def_bool y
-       select GENERIC_IRQ_SHOW
-       select GENERIC_IOMAP
-       select GENERIC_ATOMIC64
-       select HAVE_MEMBLOCK
-       select HAVE_MEMBLOCK_NODE_MAP
-       select ARCH_DISCARD_MEMBLOCK
-       select GENERIC_CPU_DEVICES
-       select GENERIC_CLOCKEVENTS
-       select HAVE_MOD_ARCH_SPECIFIC
+	def_bool y
+	select GENERIC_IRQ_SHOW
+	select GENERIC_IOMAP
+	select GENERIC_ATOMIC64
+	select HAVE_MEMBLOCK
+	select HAVE_MEMBLOCK_NODE_MAP
+	select ARCH_DISCARD_MEMBLOCK
+	select GENERIC_CPU_DEVICES
+	select GENERIC_CLOCKEVENTS
+	select HAVE_MOD_ARCH_SPECIFIC
 	select VIRT_TO_BUS
 	select MODULES_USE_ELF_REL
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN
 
 choice
 	prompt "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a537816..9de09e6 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -43,6 +43,7 @@ config SPARC
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
 	select ARCH_HAS_SG_CHAIN
+	select CPU_BIG_ENDIAN
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 7fcd492..e042479 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -27,6 +27,8 @@ config TILE
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select HAVE_DEBUG_STACKOVERFLOW
 	select ARCH_WANT_FRAME_POINTERS
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 6915d28..f696ec2 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -8,6 +8,8 @@ config UML
 	select GENERIC_IO
 	select GENERIC_CLOCKEVENTS
 	select TTY # Needed for line.c
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 928237a..02be244 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -18,6 +18,7 @@ config UNICORE32
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
 	select MODULES_USE_ELF_REL
+	select CPU_LITTLE_ENDIAN
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1164b7d..9b83e33 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -136,6 +136,7 @@ config X86
 	select HAVE_ACPI_APEI if ACPI
 	select HAVE_ACPI_APEI_NMI if ACPI
 	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
+	select CPU_LITTLE_ENDIAN
 
 config INSTRUCTION_DECODER
 	def_bool y
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3a617af..a3e8f7e 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -22,6 +22,8 @@ config XTENSA
 	select HAVE_IRQ_TIME_ACCOUNTING
 	select HAVE_PERF_EVENTS
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
diff --git a/init/Kconfig b/init/Kconfig
index 9565224..6dd3b20 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -23,6 +23,12 @@ config CONSTRUCTORS
 config IRQ_WORK
 	bool
 
+config CPU_LITTLE_ENDIAN
+	bool
+
+config CPU_BIG_ENDIAN
+	bool
+
 config BUILDTIME_EXTABLE_SORT
 	bool
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 16:54 ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 16:54 UTC (permalink / raw)
  To: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, cmetcalf, jdike, Richard Weinberger, gxt, tglx,
	mingo, hpa, chris, jcmvbkbc
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

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

Special architectures:

 - Deside by compiler: microblaze, tile, xtensa.

 - Deside by building host: um

 - Next, need improve Kbuild to probe endian to deside whether need mark
   __BUILDING_TIME_BIG_ENDIAN__ before real config.

Another improvements:

 - score: use '\t' instead of ' '.

 - s390: sort the select value in alpha order.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/alpha/Kconfig      |  1 +
 arch/arc/Kconfig        |  1 +
 arch/arm/Kconfig        |  1 +
 arch/arm64/Kconfig      |  1 +
 arch/avr32/Kconfig      |  1 +
 arch/blackfin/Kconfig   |  1 +
 arch/c6x/Kconfig        |  1 +
 arch/cris/Kconfig       |  1 +
 arch/frv/Kconfig        |  1 +
 arch/hexagon/Kconfig    |  1 +
 arch/ia64/Kconfig       |  1 +
 arch/m32r/Kconfig       |  1 +
 arch/m68k/Kconfig       |  1 +
 arch/metag/Kconfig      |  1 +
 arch/microblaze/Kconfig |  2 ++
 arch/mips/Kconfig       |  1 +
 arch/mn10300/Kconfig    |  1 +
 arch/openrisc/Kconfig   |  1 +
 arch/parisc/Kconfig     |  1 +
 arch/powerpc/Kconfig    |  1 +
 arch/s390/Kconfig       |  3 ++-
 arch/score/Kconfig      | 21 +++++++++++----------
 arch/sparc/Kconfig      |  1 +
 arch/tile/Kconfig       |  2 ++
 arch/um/Kconfig.common  |  2 ++
 arch/unicore32/Kconfig  |  1 +
 arch/x86/Kconfig        |  1 +
 arch/xtensa/Kconfig     |  2 ++
 init/Kconfig            |  6 ++++++
 29 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index b7ff9a3..1cb7426 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -27,6 +27,7 @@ config ALPHA
 	select MODULES_USE_ELF_RELA
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
+	select CPU_LITTLE_ENDIAN
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 9596b0a..e939abd 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -35,6 +35,7 @@ config ARC
 	select OF_EARLY_FLATTREE
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32cbbd5..3a806b3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -12,6 +12,7 @@ config ARM
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 62b4ae1..c5a91de 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -17,6 +17,7 @@ config ARM64
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index b6878eb..fab44ee 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -17,6 +17,7 @@ config AVR32
 	select GENERIC_CLOCKEVENTS
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
+	select CPU_BIG_ENDIAN
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index ed30699..348f16d 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -40,6 +40,7 @@ config BLACKFIN
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 77ea09b..7e74d14 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -17,6 +17,7 @@ config C6X
 	select OF_EARLY_FLATTREE
 	select GENERIC_CLOCKEVENTS
 	select MODULES_USE_ELF_RELA
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	def_bool n
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 52731e2..405a097 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -52,6 +52,7 @@ config CRIS
 	select CLONE_BACKWARDS2
 	select OLD_SIGSUSPEND
 	select OLD_SIGACTION
+	select CPU_LITTLE_ENDIAN
 
 config HZ
 	int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 34aa193..aa21ccc 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -14,6 +14,7 @@ config FRV
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN
 
 config ZONE_DMA
 	bool
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 4dc89d1..ee91285 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -28,6 +28,7 @@ config HEXAGON
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CPU_DEVICES
 	select HAVE_DMA_ATTRS
+	select CPU_LITTLE_ENDIAN
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
 	  performance and low power across a wide variety of applications.
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index c84c88b..54f32c7 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -49,6 +49,7 @@ config IA64
 	select MODULES_USE_ELF_RELA
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_LITTLE_ENDIAN
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 9e44bbd..1932483 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -16,6 +16,7 @@ config M32R
 	select ARCH_USES_GETTIMEOFFSET
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN if !CPU_LITTLE_ENDIAN
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 87b7c75..7a7fe25 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -23,6 +23,7 @@ config M68K
 	select MODULES_USE_ELF_RELA
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
+	select CPU_BIG_ENDIAN
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 0b389a8..e57c6a0 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -29,6 +29,7 @@ config METAG
 	select OF
 	select OF_EARLY_FLATTREE
 	select SPARSE_IRQ
+	select CPU_LITTLE_ENDIAN
 
 config STACKTRACE_SUPPORT
 	def_bool y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 40e1c1d..d80ae78 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -7,6 +7,8 @@ config MICROBLAZE
 	select CLKSRC_OF
 	select CLONE_BACKWARDS3
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 900c7e5..671d822 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -52,6 +52,7 @@ config MIPS
 	select HAVE_CC_STACKPROTECTOR
 	select CPU_PM if CPU_IDLE
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 menu "Machine selection"
 
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index a648de1..60fb249 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -13,6 +13,7 @@ config MN10300
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config AM33_2
 	def_bool n
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 88e8336..4757b7d 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -23,6 +23,7 @@ config OPENRISC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
 	select OR1K_PIC
+	select CPU_BIG_ENDIAN
 
 config MMU
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 6e75e20..dc82137 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -29,6 +29,7 @@ config PARISC
 	select TTY # Needed for pdc_cons.c
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_BIG_ENDIAN
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4bc7b62..644c6d4 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -147,6 +147,7 @@ config PPC
 	select ARCH_USE_CMPXCHG_LOCKREF if PPC64
 	select HAVE_ARCH_AUDITSYSCALL
 	select ARCH_SUPPORTS_ATOMIC_RMW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config GENERIC_CSUM
 	def_bool CPU_LITTLE_ENDIAN
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 05c78bb..8691c6f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -62,6 +62,7 @@ config S390
 	def_bool y
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
+	select ARCH_HAS_SG_CHAIN
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select ARCH_INLINE_READ_LOCK
 	select ARCH_INLINE_READ_LOCK_BH
@@ -97,6 +98,7 @@ config S390
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS2
+	select CPU_BIG_ENDIAN
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES if !SMP
 	select GENERIC_FIND_FIRST_BIT
@@ -145,7 +147,6 @@ config S390
 	select TTY
 	select VIRT_CPU_ACCOUNTING
 	select VIRT_TO_BUS
-	select ARCH_HAS_SG_CHAIN
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4ac8cae..713b290 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -1,19 +1,20 @@
 menu "Machine selection"
 
 config SCORE
-       def_bool y
-       select GENERIC_IRQ_SHOW
-       select GENERIC_IOMAP
-       select GENERIC_ATOMIC64
-       select HAVE_MEMBLOCK
-       select HAVE_MEMBLOCK_NODE_MAP
-       select ARCH_DISCARD_MEMBLOCK
-       select GENERIC_CPU_DEVICES
-       select GENERIC_CLOCKEVENTS
-       select HAVE_MOD_ARCH_SPECIFIC
+	def_bool y
+	select GENERIC_IRQ_SHOW
+	select GENERIC_IOMAP
+	select GENERIC_ATOMIC64
+	select HAVE_MEMBLOCK
+	select HAVE_MEMBLOCK_NODE_MAP
+	select ARCH_DISCARD_MEMBLOCK
+	select GENERIC_CPU_DEVICES
+	select GENERIC_CLOCKEVENTS
+	select HAVE_MOD_ARCH_SPECIFIC
 	select VIRT_TO_BUS
 	select MODULES_USE_ELF_REL
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN
 
 choice
 	prompt "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a537816..9de09e6 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -43,6 +43,7 @@ config SPARC
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
 	select ARCH_HAS_SG_CHAIN
+	select CPU_BIG_ENDIAN
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 7fcd492..e042479 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -27,6 +27,8 @@ config TILE
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select HAVE_DEBUG_STACKOVERFLOW
 	select ARCH_WANT_FRAME_POINTERS
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 6915d28..f696ec2 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -8,6 +8,8 @@ config UML
 	select GENERIC_IO
 	select GENERIC_CLOCKEVENTS
 	select TTY # Needed for line.c
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 928237a..02be244 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -18,6 +18,7 @@ config UNICORE32
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
 	select MODULES_USE_ELF_REL
+	select CPU_LITTLE_ENDIAN
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1164b7d..9b83e33 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -136,6 +136,7 @@ config X86
 	select HAVE_ACPI_APEI if ACPI
 	select HAVE_ACPI_APEI_NMI if ACPI
 	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
+	select CPU_LITTLE_ENDIAN
 
 config INSTRUCTION_DECODER
 	def_bool y
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3a617af..a3e8f7e 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -22,6 +22,8 @@ config XTENSA
 	select HAVE_IRQ_TIME_ACCOUNTING
 	select HAVE_PERF_EVENTS
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
diff --git a/init/Kconfig b/init/Kconfig
index 9565224..6dd3b20 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -23,6 +23,12 @@ config CONSTRUCTORS
 config IRQ_WORK
 	bool
 
+config CPU_LITTLE_ENDIAN
+	bool
+
+config CPU_BIG_ENDIAN
+	bool
+
 config BUILDTIME_EXTABLE_SORT
 	bool
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 16:54 ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 16:54 UTC (permalink / raw)
  To: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, cmetcalf, jdike, Richard Weinberger, gxt, tglx,
	mingo, hpa, chris, jcmvbkbc
  Cc: linux-m32r-ja, linux-mips, linux-ia64, linux, sparclinux,
	linux-s390, linux-am33-list, linux-c6x-dev, linux-hexagon, x86,
	linux-xtensa, user-mode-linux-devel, adi-buildroot-devel,
	linux-m68k, user-mode-linux-user, linux-metag, linux-arm-kernel,
	linux-m32r, linux-parisc, linux-cris-kernel, linux-kernel,
	linux-alpha, linux390, linuxppc-dev

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

Special architectures:

 - Deside by compiler: microblaze, tile, xtensa.

 - Deside by building host: um

 - Next, need improve Kbuild to probe endian to deside whether need mark
   __BUILDING_TIME_BIG_ENDIAN__ before real config.

Another improvements:

 - score: use '\t' instead of ' '.

 - s390: sort the select value in alpha order.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/alpha/Kconfig      |  1 +
 arch/arc/Kconfig        |  1 +
 arch/arm/Kconfig        |  1 +
 arch/arm64/Kconfig      |  1 +
 arch/avr32/Kconfig      |  1 +
 arch/blackfin/Kconfig   |  1 +
 arch/c6x/Kconfig        |  1 +
 arch/cris/Kconfig       |  1 +
 arch/frv/Kconfig        |  1 +
 arch/hexagon/Kconfig    |  1 +
 arch/ia64/Kconfig       |  1 +
 arch/m32r/Kconfig       |  1 +
 arch/m68k/Kconfig       |  1 +
 arch/metag/Kconfig      |  1 +
 arch/microblaze/Kconfig |  2 ++
 arch/mips/Kconfig       |  1 +
 arch/mn10300/Kconfig    |  1 +
 arch/openrisc/Kconfig   |  1 +
 arch/parisc/Kconfig     |  1 +
 arch/powerpc/Kconfig    |  1 +
 arch/s390/Kconfig       |  3 ++-
 arch/score/Kconfig      | 21 +++++++++++----------
 arch/sparc/Kconfig      |  1 +
 arch/tile/Kconfig       |  2 ++
 arch/um/Kconfig.common  |  2 ++
 arch/unicore32/Kconfig  |  1 +
 arch/x86/Kconfig        |  1 +
 arch/xtensa/Kconfig     |  2 ++
 init/Kconfig            |  6 ++++++
 29 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index b7ff9a3..1cb7426 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -27,6 +27,7 @@ config ALPHA
 	select MODULES_USE_ELF_RELA
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
+	select CPU_LITTLE_ENDIAN
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 9596b0a..e939abd 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -35,6 +35,7 @@ config ARC
 	select OF_EARLY_FLATTREE
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config TRACE_IRQFLAGS_SUPPORT
 	def_bool y
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32cbbd5..3a806b3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -12,6 +12,7 @@ config ARM
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 62b4ae1..c5a91de 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -17,6 +17,7 @@ config ARM64
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select CPU_PM if (SUSPEND || CPU_IDLE)
 	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index b6878eb..fab44ee 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -17,6 +17,7 @@ config AVR32
 	select GENERIC_CLOCKEVENTS
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
+	select CPU_BIG_ENDIAN
 	help
 	  AVR32 is a high-performance 32-bit RISC microprocessor core,
 	  designed for cost-sensitive embedded applications, with particular
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index ed30699..348f16d 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -40,6 +40,7 @@ config BLACKFIN
 	select HAVE_MOD_ARCH_SPECIFIC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config GENERIC_CSUM
 	def_bool y
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 77ea09b..7e74d14 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -17,6 +17,7 @@ config C6X
 	select OF_EARLY_FLATTREE
 	select GENERIC_CLOCKEVENTS
 	select MODULES_USE_ELF_RELA
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	def_bool n
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 52731e2..405a097 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -52,6 +52,7 @@ config CRIS
 	select CLONE_BACKWARDS2
 	select OLD_SIGSUSPEND
 	select OLD_SIGACTION
+	select CPU_LITTLE_ENDIAN
 
 config HZ
 	int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 34aa193..aa21ccc 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -14,6 +14,7 @@ config FRV
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN
 
 config ZONE_DMA
 	bool
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 4dc89d1..ee91285 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -28,6 +28,7 @@ config HEXAGON
 	select MODULES_USE_ELF_RELA
 	select GENERIC_CPU_DEVICES
 	select HAVE_DMA_ATTRS
+	select CPU_LITTLE_ENDIAN
 	---help---
 	  Qualcomm Hexagon is a processor architecture designed for high
 	  performance and low power across a wide variety of applications.
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index c84c88b..54f32c7 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -49,6 +49,7 @@ config IA64
 	select MODULES_USE_ELF_RELA
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_LITTLE_ENDIAN
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 9e44bbd..1932483 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -16,6 +16,7 @@ config M32R
 	select ARCH_USES_GETTIMEOFFSET
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_BIG_ENDIAN if !CPU_LITTLE_ENDIAN
 
 config SBUS
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 87b7c75..7a7fe25 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -23,6 +23,7 @@ config M68K
 	select MODULES_USE_ELF_RELA
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
+	select CPU_BIG_ENDIAN
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 0b389a8..e57c6a0 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -29,6 +29,7 @@ config METAG
 	select OF
 	select OF_EARLY_FLATTREE
 	select SPARSE_IRQ
+	select CPU_LITTLE_ENDIAN
 
 config STACKTRACE_SUPPORT
 	def_bool y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 40e1c1d..d80ae78 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -7,6 +7,8 @@ config MICROBLAZE
 	select CLKSRC_OF
 	select CLONE_BACKWARDS3
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 900c7e5..671d822 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -52,6 +52,7 @@ config MIPS
 	select HAVE_CC_STACKPROTECTOR
 	select CPU_PM if CPU_IDLE
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 menu "Machine selection"
 
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index a648de1..60fb249 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -13,6 +13,7 @@ config MN10300
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
 	select HAVE_DEBUG_STACKOVERFLOW
+	select CPU_LITTLE_ENDIAN
 
 config AM33_2
 	def_bool n
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 88e8336..4757b7d 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -23,6 +23,7 @@ config OPENRISC
 	select MODULES_USE_ELF_RELA
 	select HAVE_DEBUG_STACKOVERFLOW
 	select OR1K_PIC
+	select CPU_BIG_ENDIAN
 
 config MMU
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 6e75e20..dc82137 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -29,6 +29,7 @@ config PARISC
 	select TTY # Needed for pdc_cons.c
 	select HAVE_DEBUG_STACKOVERFLOW
 	select HAVE_ARCH_AUDITSYSCALL
+	select CPU_BIG_ENDIAN
 
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4bc7b62..644c6d4 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -147,6 +147,7 @@ config PPC
 	select ARCH_USE_CMPXCHG_LOCKREF if PPC64
 	select HAVE_ARCH_AUDITSYSCALL
 	select ARCH_SUPPORTS_ATOMIC_RMW
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config GENERIC_CSUM
 	def_bool CPU_LITTLE_ENDIAN
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 05c78bb..8691c6f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -62,6 +62,7 @@ config S390
 	def_bool y
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
+	select ARCH_HAS_SG_CHAIN
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select ARCH_INLINE_READ_LOCK
 	select ARCH_INLINE_READ_LOCK_BH
@@ -97,6 +98,7 @@ config S390
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS2
+	select CPU_BIG_ENDIAN
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CPU_DEVICES if !SMP
 	select GENERIC_FIND_FIRST_BIT
@@ -145,7 +147,6 @@ config S390
 	select TTY
 	select VIRT_CPU_ACCOUNTING
 	select VIRT_TO_BUS
-	select ARCH_HAS_SG_CHAIN
 
 config SCHED_OMIT_FRAME_POINTER
 	def_bool y
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4ac8cae..713b290 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -1,19 +1,20 @@
 menu "Machine selection"
 
 config SCORE
-       def_bool y
-       select GENERIC_IRQ_SHOW
-       select GENERIC_IOMAP
-       select GENERIC_ATOMIC64
-       select HAVE_MEMBLOCK
-       select HAVE_MEMBLOCK_NODE_MAP
-       select ARCH_DISCARD_MEMBLOCK
-       select GENERIC_CPU_DEVICES
-       select GENERIC_CLOCKEVENTS
-       select HAVE_MOD_ARCH_SPECIFIC
+	def_bool y
+	select GENERIC_IRQ_SHOW
+	select GENERIC_IOMAP
+	select GENERIC_ATOMIC64
+	select HAVE_MEMBLOCK
+	select HAVE_MEMBLOCK_NODE_MAP
+	select ARCH_DISCARD_MEMBLOCK
+	select GENERIC_CPU_DEVICES
+	select GENERIC_CLOCKEVENTS
+	select HAVE_MOD_ARCH_SPECIFIC
 	select VIRT_TO_BUS
 	select MODULES_USE_ELF_REL
 	select CLONE_BACKWARDS
+	select CPU_LITTLE_ENDIAN
 
 choice
 	prompt "System type"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a537816..9de09e6 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -43,6 +43,7 @@ config SPARC
 	select ODD_RT_SIGACTION
 	select OLD_SIGSUSPEND
 	select ARCH_HAS_SG_CHAIN
+	select CPU_BIG_ENDIAN
 
 config SPARC32
 	def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 7fcd492..e042479 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -27,6 +27,8 @@ config TILE
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
 	select HAVE_DEBUG_STACKOVERFLOW
 	select ARCH_WANT_FRAME_POINTERS
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 # FIXME: investigate whether we need/want these options.
 #	select HAVE_IOREMAP_PROT
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 6915d28..f696ec2 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -8,6 +8,8 @@ config UML
 	select GENERIC_IO
 	select GENERIC_CLOCKEVENTS
 	select TTY # Needed for line.c
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config MMU
 	bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 928237a..02be244 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -18,6 +18,7 @@ config UNICORE32
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IOMAP
 	select MODULES_USE_ELF_REL
+	select CPU_LITTLE_ENDIAN
 	help
 	  UniCore-32 is 32-bit Instruction Set Architecture,
 	  including a series of low-power-consumption RISC chip
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1164b7d..9b83e33 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -136,6 +136,7 @@ config X86
 	select HAVE_ACPI_APEI if ACPI
 	select HAVE_ACPI_APEI_NMI if ACPI
 	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
+	select CPU_LITTLE_ENDIAN
 
 config INSTRUCTION_DECODER
 	def_bool y
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3a617af..a3e8f7e 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -22,6 +22,8 @@ config XTENSA
 	select HAVE_IRQ_TIME_ACCOUNTING
 	select HAVE_PERF_EVENTS
 	select COMMON_CLK
+	select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
diff --git a/init/Kconfig b/init/Kconfig
index 9565224..6dd3b20 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -23,6 +23,12 @@ config CONSTRUCTORS
 config IRQ_WORK
 	bool
 
+config CPU_LITTLE_ENDIAN
+	bool
+
+config CPU_BIG_ENDIAN
+	bool
+
 config BUILDTIME_EXTABLE_SORT
 	bool
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 16:54 ` Chen Gang
  (?)
@ 2014-08-14 18:04   ` Ralf Baechle
  -1 siblings, 0 replies; 58+ messages in thread
From: Ralf Baechle @ 2014-08-14 18:04 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Mart

On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:

> 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

So I think you can just drop the MIPS segment from your patch.

  Ralf

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:04   ` Ralf Baechle
  0 siblings, 0 replies; 58+ messages in thread
From: Ralf Baechle @ 2014-08-14 18:04 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, Lennox Wu, David S. Miller, cmetcalf,
	jdike, Richard Weinberger, gxt, tglx, mingo, hpa, chris,
	jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:

> 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

So I think you can just drop the MIPS segment from your patch.

  Ralf

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:04   ` Ralf Baechle
  0 siblings, 0 replies; 58+ messages in thread
From: Ralf Baechle @ 2014-08-14 18:04 UTC (permalink / raw)
  To: Chen Gang
  Cc: linux-m32r-ja, linux-mips, linux-m68k, a-jacquiot,
	catalin.marinas, linux, will.deacon, dhowells, jcmvbkbc, paulus,
	hpa, sparclinux, linux-hexagon, linux-s390, gxt, Jean Delvare,
	egtvedt, jonas, Liqin Chen, jesper.nilsson, linux-am33-list,
	linux, linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86,
	jejb, mingo, Geert Uytterhoeven, Lennox Wu, msalter, mattst88,
	hskinnemoen, fenghua.yu, james.hogan, Arnd Bergmann, realmz6,
	heiko.carstens, jdike, linux-alpha, adi-buildroot-devel,
	cmetcalf, starvik, linux-m32r, ink, user-mode-linux-user, tglx,
	linux-metag, linux-arm-kernel, rth, chris, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel, vgupta,
	linux-kernel, rkuo, user-mode-linux-devel, Richard Weinberger,
	Martin Schwidefsky, linux390, akpm, yasutake.koichi,
	linuxppc-dev, deller

On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:

> 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

So I think you can just drop the MIPS segment from your patch.

  Ralf

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 16:54 ` Chen Gang
                     ` (3 preceding siblings ...)
  (?)
@ 2014-08-14 18:21   ` Vineet Gupta
  -1 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja,
	linux-m68k@lists.linux-m68k.org

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> Another improvements:
>
>  - score: use '\t' instead of ' '.
>
>  - s390: sort the select value in alpha order.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/alpha/Kconfig      |  1 +
>  arch/arc/Kconfig        |  1 +
>  arch/arm/Kconfig        |  1 +
>  arch/arm64/Kconfig      |  1 +
>  arch/avr32/Kconfig      |  1 +
>  arch/blackfin/Kconfig   |  1 +
>  arch/c6x/Kconfig        |  1 +
>  arch/cris/Kconfig       |  1 +
>  arch/frv/Kconfig        |  1 +
>  arch/hexagon/Kconfig    |  1 +
>  arch/ia64/Kconfig       |  1 +
>  arch/m32r/Kconfig       |  1 +
>  arch/m68k/Kconfig       |  1 +
>  arch/metag/Kconfig      |  1 +
>  arch/microblaze/Kconfig |  2 ++
>  arch/mips/Kconfig       |  1 +
>  arch/mn10300/Kconfig    |  1 +
>  arch/openrisc/Kconfig   |  1 +
>  arch/parisc/Kconfig     |  1 +
>  arch/powerpc/Kconfig    |  1 +
>  arch/s390/Kconfig       |  3 ++-
>  arch/score/Kconfig      | 21 +++++++++++----------
>  arch/sparc/Kconfig      |  1 +
>  arch/tile/Kconfig       |  2 ++
>  arch/um/Kconfig.common  |  2 ++
>  arch/unicore32/Kconfig  |  1 +
>  arch/x86/Kconfig        |  1 +
>  arch/xtensa/Kconfig     |  2 ++
>  init/Kconfig            |  6 ++++++
>  29 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b7ff9a3..1cb7426 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -27,6 +27,7 @@ config ALPHA
>  	select MODULES_USE_ELF_RELA
>  	select ODD_RT_SIGACTION
>  	select OLD_SIGSUSPEND
> +	select CPU_LITTLE_ENDIAN
>  	help
>  	  The Alpha is a 64-bit general-purpose processor designed and
>  	  marketed by the Digital Equipment Corporation of blessed memory,
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9596b0a..e939abd 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -35,6 +35,7 @@ config ARC
>  	select OF_EARLY_FLATTREE
>  	select PERF_USE_VMALLOC
>  	select HAVE_DEBUG_STACKOVERFLOW
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN

It is not clear what exactly are you trying to fix. What doesn't work w/o this
patch !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:21   ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot, starvik, jesper.nilsson, dhowells, rkuo,
	tony.luck, fenghua.yu, takata, james.hogan, Michal Simek, ralf,
	yasutake.koichi, jonas, jejb, deller, Benjamin Herrenschmidt,
	paulus, mpe, Martin Schwidefsky, heiko.carstens, Liqin Chen,
	Lennox Wu, David S. Miller, cmetcalf, jdike, Richard Weinberger,
	gxt, tglx, mingo, hpa, chris, jcmvbkbc
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> Another improvements:
>
>  - score: use '\t' instead of ' '.
>
>  - s390: sort the select value in alpha order.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/alpha/Kconfig      |  1 +
>  arch/arc/Kconfig        |  1 +
>  arch/arm/Kconfig        |  1 +
>  arch/arm64/Kconfig      |  1 +
>  arch/avr32/Kconfig      |  1 +
>  arch/blackfin/Kconfig   |  1 +
>  arch/c6x/Kconfig        |  1 +
>  arch/cris/Kconfig       |  1 +
>  arch/frv/Kconfig        |  1 +
>  arch/hexagon/Kconfig    |  1 +
>  arch/ia64/Kconfig       |  1 +
>  arch/m32r/Kconfig       |  1 +
>  arch/m68k/Kconfig       |  1 +
>  arch/metag/Kconfig      |  1 +
>  arch/microblaze/Kconfig |  2 ++
>  arch/mips/Kconfig       |  1 +
>  arch/mn10300/Kconfig    |  1 +
>  arch/openrisc/Kconfig   |  1 +
>  arch/parisc/Kconfig     |  1 +
>  arch/powerpc/Kconfig    |  1 +
>  arch/s390/Kconfig       |  3 ++-
>  arch/score/Kconfig      | 21 +++++++++++----------
>  arch/sparc/Kconfig      |  1 +
>  arch/tile/Kconfig       |  2 ++
>  arch/um/Kconfig.common  |  2 ++
>  arch/unicore32/Kconfig  |  1 +
>  arch/x86/Kconfig        |  1 +
>  arch/xtensa/Kconfig     |  2 ++
>  init/Kconfig            |  6 ++++++
>  29 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b7ff9a3..1cb7426 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -27,6 +27,7 @@ config ALPHA
>  	select MODULES_USE_ELF_RELA
>  	select ODD_RT_SIGACTION
>  	select OLD_SIGSUSPEND
> +	select CPU_LITTLE_ENDIAN
>  	help
>  	  The Alpha is a 64-bit general-purpose processor designed and
>  	  marketed by the Digital Equipment Corporation of blessed memory,
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9596b0a..e939abd 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -35,6 +35,7 @@ config ARC
>  	select OF_EARLY_FLATTREE
>  	select PERF_USE_VMALLOC
>  	select HAVE_DEBUG_STACKOVERFLOW
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN

It is not clear what exactly are you trying to fix. What doesn't work w/o this
patch !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:21   ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot, starvik, jesper.nilsson, dhowells, rkuo,
	tony.luck, fenghua.yu, takata, james.hogan, Michal Simek, ralf,
	yasutake.koichi, jonas, jejb, deller, Benjamin Herrenschmidt,
	paulus, mpe, Martin Schwidefsky, heiko.carstens, Liqin Chen,
	Lennox Wu, David S. Miller, cmetcalf, jdike, Richard Weinberger,
	gxt, tglx, mingo, hpa, chris, jcmvbkbc
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> Another improvements:
>
>  - score: use '\t' instead of ' '.
>
>  - s390: sort the select value in alpha order.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/alpha/Kconfig      |  1 +
>  arch/arc/Kconfig        |  1 +
>  arch/arm/Kconfig        |  1 +
>  arch/arm64/Kconfig      |  1 +
>  arch/avr32/Kconfig      |  1 +
>  arch/blackfin/Kconfig   |  1 +
>  arch/c6x/Kconfig        |  1 +
>  arch/cris/Kconfig       |  1 +
>  arch/frv/Kconfig        |  1 +
>  arch/hexagon/Kconfig    |  1 +
>  arch/ia64/Kconfig       |  1 +
>  arch/m32r/Kconfig       |  1 +
>  arch/m68k/Kconfig       |  1 +
>  arch/metag/Kconfig      |  1 +
>  arch/microblaze/Kconfig |  2 ++
>  arch/mips/Kconfig       |  1 +
>  arch/mn10300/Kconfig    |  1 +
>  arch/openrisc/Kconfig   |  1 +
>  arch/parisc/Kconfig     |  1 +
>  arch/powerpc/Kconfig    |  1 +
>  arch/s390/Kconfig       |  3 ++-
>  arch/score/Kconfig      | 21 +++++++++++----------
>  arch/sparc/Kconfig      |  1 +
>  arch/tile/Kconfig       |  2 ++
>  arch/um/Kconfig.common  |  2 ++
>  arch/unicore32/Kconfig  |  1 +
>  arch/x86/Kconfig        |  1 +
>  arch/xtensa/Kconfig     |  2 ++
>  init/Kconfig            |  6 ++++++
>  29 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b7ff9a3..1cb7426 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -27,6 +27,7 @@ config ALPHA
>  	select MODULES_USE_ELF_RELA
>  	select ODD_RT_SIGACTION
>  	select OLD_SIGSUSPEND
> +	select CPU_LITTLE_ENDIAN
>  	help
>  	  The Alpha is a 64-bit general-purpose processor designed and
>  	  marketed by the Digital Equipment Corporation of blessed memory,
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9596b0a..e939abd 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -35,6 +35,7 @@ config ARC
>  	select OF_EARLY_FLATTREE
>  	select PERF_USE_VMALLOC
>  	select HAVE_DEBUG_STACKOVERFLOW
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN

It is not clear what exactly are you trying to fix. What doesn't work w/o this
patch !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:21   ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot, starvik, jesper.nilsson, dhowells, rkuo,
	tony.luck, fenghua.yu, takata, james.hogan, Michal Simek, ralf,
	yasutake.koichi, jonas, jejb, deller, Benjamin Herrenschmidt,
	paulus, mpe, Martin Schwidefsky, heiko.carstens, Liqin Chen,
	Lennox Wu, David S. Miller, cmetcalf, jdike, Richard Weinberger,
	gxt, tglx, mingo, hpa, chris, jcmvbkbc
  Cc: linux-m32r-ja, linux-mips, linux-ia64, linux, sparclinux,
	linux-s390, linux-am33-list, linux-c6x-dev, linux-hexagon, x86,
	linux-xtensa, user-mode-linux-devel, adi-buildroot-devel,
	linux-m68k, user-mode-linux-user, linux-metag, linux-arm-kernel,
	linux-m32r, linux-parisc, linux-cris-kernel, linux-kernel,
	linux-alpha, linux390, linuxppc-dev

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:=0A=
> Normal architectures:=0A=
>=0A=
>  - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc=0A=
>=0A=
>  - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300,=
=0A=
>                   score, unicore32, x86=0A=
>=0A=
>  - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh=
=0A=
>=0A=
> Special architectures:=0A=
>=0A=
>  - Deside by compiler: microblaze, tile, xtensa.=0A=
>=0A=
>  - Deside by building host: um=0A=
>=0A=
>  - Next, need improve Kbuild to probe endian to deside whether need mark=
=0A=
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.=0A=
>=0A=
> Another improvements:=0A=
>=0A=
>  - score: use '\t' instead of ' '.=0A=
>=0A=
>  - s390: sort the select value in alpha order.=0A=
>=0A=
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>=0A=
> ---=0A=
>  arch/alpha/Kconfig      |  1 +=0A=
>  arch/arc/Kconfig        |  1 +=0A=
>  arch/arm/Kconfig        |  1 +=0A=
>  arch/arm64/Kconfig      |  1 +=0A=
>  arch/avr32/Kconfig      |  1 +=0A=
>  arch/blackfin/Kconfig   |  1 +=0A=
>  arch/c6x/Kconfig        |  1 +=0A=
>  arch/cris/Kconfig       |  1 +=0A=
>  arch/frv/Kconfig        |  1 +=0A=
>  arch/hexagon/Kconfig    |  1 +=0A=
>  arch/ia64/Kconfig       |  1 +=0A=
>  arch/m32r/Kconfig       |  1 +=0A=
>  arch/m68k/Kconfig       |  1 +=0A=
>  arch/metag/Kconfig      |  1 +=0A=
>  arch/microblaze/Kconfig |  2 ++=0A=
>  arch/mips/Kconfig       |  1 +=0A=
>  arch/mn10300/Kconfig    |  1 +=0A=
>  arch/openrisc/Kconfig   |  1 +=0A=
>  arch/parisc/Kconfig     |  1 +=0A=
>  arch/powerpc/Kconfig    |  1 +=0A=
>  arch/s390/Kconfig       |  3 ++-=0A=
>  arch/score/Kconfig      | 21 +++++++++++----------=0A=
>  arch/sparc/Kconfig      |  1 +=0A=
>  arch/tile/Kconfig       |  2 ++=0A=
>  arch/um/Kconfig.common  |  2 ++=0A=
>  arch/unicore32/Kconfig  |  1 +=0A=
>  arch/x86/Kconfig        |  1 +=0A=
>  arch/xtensa/Kconfig     |  2 ++=0A=
>  init/Kconfig            |  6 ++++++=0A=
>  29 files changed, 49 insertions(+), 11 deletions(-)=0A=
>=0A=
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig=0A=
> index b7ff9a3..1cb7426 100644=0A=
> --- a/arch/alpha/Kconfig=0A=
> +++ b/arch/alpha/Kconfig=0A=
> @@ -27,6 +27,7 @@ config ALPHA=0A=
>  	select MODULES_USE_ELF_RELA=0A=
>  	select ODD_RT_SIGACTION=0A=
>  	select OLD_SIGSUSPEND=0A=
> +	select CPU_LITTLE_ENDIAN=0A=
>  	help=0A=
>  	  The Alpha is a 64-bit general-purpose processor designed and=0A=
>  	  marketed by the Digital Equipment Corporation of blessed memory,=0A=
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig=0A=
> index 9596b0a..e939abd 100644=0A=
> --- a/arch/arc/Kconfig=0A=
> +++ b/arch/arc/Kconfig=0A=
> @@ -35,6 +35,7 @@ config ARC=0A=
>  	select OF_EARLY_FLATTREE=0A=
>  	select PERF_USE_VMALLOC=0A=
>  	select HAVE_DEBUG_STACKOVERFLOW=0A=
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN=0A=
=0A=
It is not clear what exactly are you trying to fix. What doesn't work w/o t=
his=0A=
patch !=0A=
=0A=
-Vineet=0A=

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:21   ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot, starvik, jesper.nilsson, dhowells, rkuo,
	tony.luck, fenghua.yu, takata, james.hogan, Michal Simek, ralf,
	yasutake.koichi, jonas, jejb, deller, Benjamin
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> Another improvements:
>
>  - score: use '\t' instead of ' '.
>
>  - s390: sort the select value in alpha order.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/alpha/Kconfig      |  1 +
>  arch/arc/Kconfig        |  1 +
>  arch/arm/Kconfig        |  1 +
>  arch/arm64/Kconfig      |  1 +
>  arch/avr32/Kconfig      |  1 +
>  arch/blackfin/Kconfig   |  1 +
>  arch/c6x/Kconfig        |  1 +
>  arch/cris/Kconfig       |  1 +
>  arch/frv/Kconfig        |  1 +
>  arch/hexagon/Kconfig    |  1 +
>  arch/ia64/Kconfig       |  1 +
>  arch/m32r/Kconfig       |  1 +
>  arch/m68k/Kconfig       |  1 +
>  arch/metag/Kconfig      |  1 +
>  arch/microblaze/Kconfig |  2 ++
>  arch/mips/Kconfig       |  1 +
>  arch/mn10300/Kconfig    |  1 +
>  arch/openrisc/Kconfig   |  1 +
>  arch/parisc/Kconfig     |  1 +
>  arch/powerpc/Kconfig    |  1 +
>  arch/s390/Kconfig       |  3 ++-
>  arch/score/Kconfig      | 21 +++++++++++----------
>  arch/sparc/Kconfig      |  1 +
>  arch/tile/Kconfig       |  2 ++
>  arch/um/Kconfig.common  |  2 ++
>  arch/unicore32/Kconfig  |  1 +
>  arch/x86/Kconfig        |  1 +
>  arch/xtensa/Kconfig     |  2 ++
>  init/Kconfig            |  6 ++++++
>  29 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b7ff9a3..1cb7426 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -27,6 +27,7 @@ config ALPHA
>  	select MODULES_USE_ELF_RELA
>  	select ODD_RT_SIGACTION
>  	select OLD_SIGSUSPEND
> +	select CPU_LITTLE_ENDIAN
>  	help
>  	  The Alpha is a 64-bit general-purpose processor designed and
>  	  marketed by the Digital Equipment Corporation of blessed memory,
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9596b0a..e939abd 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -35,6 +35,7 @@ config ARC
>  	select OF_EARLY_FLATTREE
>  	select PERF_USE_VMALLOC
>  	select HAVE_DEBUG_STACKOVERFLOW
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN

It is not clear what exactly are you trying to fix. What doesn't work w/o this
patch !

-Vineet


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:21   ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 18:21 UTC (permalink / raw)
  To: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Vineet.Gupta1, Geert Uytterhoeven, Jean Delvare, linux,
	catalin.marinas, will.deacon, hskinnemoen, egtvedt, realmz6,
	msalter, a-jacquiot
  Cc: linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k

On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> Another improvements:
>
>  - score: use '\t' instead of ' '.
>
>  - s390: sort the select value in alpha order.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/alpha/Kconfig      |  1 +
>  arch/arc/Kconfig        |  1 +
>  arch/arm/Kconfig        |  1 +
>  arch/arm64/Kconfig      |  1 +
>  arch/avr32/Kconfig      |  1 +
>  arch/blackfin/Kconfig   |  1 +
>  arch/c6x/Kconfig        |  1 +
>  arch/cris/Kconfig       |  1 +
>  arch/frv/Kconfig        |  1 +
>  arch/hexagon/Kconfig    |  1 +
>  arch/ia64/Kconfig       |  1 +
>  arch/m32r/Kconfig       |  1 +
>  arch/m68k/Kconfig       |  1 +
>  arch/metag/Kconfig      |  1 +
>  arch/microblaze/Kconfig |  2 ++
>  arch/mips/Kconfig       |  1 +
>  arch/mn10300/Kconfig    |  1 +
>  arch/openrisc/Kconfig   |  1 +
>  arch/parisc/Kconfig     |  1 +
>  arch/powerpc/Kconfig    |  1 +
>  arch/s390/Kconfig       |  3 ++-
>  arch/score/Kconfig      | 21 +++++++++++----------
>  arch/sparc/Kconfig      |  1 +
>  arch/tile/Kconfig       |  2 ++
>  arch/um/Kconfig.common  |  2 ++
>  arch/unicore32/Kconfig  |  1 +
>  arch/x86/Kconfig        |  1 +
>  arch/xtensa/Kconfig     |  2 ++
>  init/Kconfig            |  6 ++++++
>  29 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> index b7ff9a3..1cb7426 100644
> --- a/arch/alpha/Kconfig
> +++ b/arch/alpha/Kconfig
> @@ -27,6 +27,7 @@ config ALPHA
>  	select MODULES_USE_ELF_RELA
>  	select ODD_RT_SIGACTION
>  	select OLD_SIGSUSPEND
> +	select CPU_LITTLE_ENDIAN
>  	help
>  	  The Alpha is a 64-bit general-purpose processor designed and
>  	  marketed by the Digital Equipment Corporation of blessed memory,
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index 9596b0a..e939abd 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -35,6 +35,7 @@ config ARC
>  	select OF_EARLY_FLATTREE
>  	select PERF_USE_VMALLOC
>  	select HAVE_DEBUG_STACKOVERFLOW
> +	select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN

It is not clear what exactly are you trying to fix. What doesn't work w/o this
patch !

-Vineet


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 18:21   ` Vineet Gupta
  (?)
@ 2014-08-14 18:27     ` Lennox Wu
  -1 siblings, 0 replies; 58+ messages in thread
From: Lennox Wu @ 2014-08-14 18:27 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: linux-m32r-ja, linux-mips, a-jacquiot, catalin.marinas, linux,
	will.deacon, dhowells, jcmvbkbc, paulus, hpa, sparclinux,
	linux-hexagon, gxt, Jean Delvare, egtvedt, jonas, Liqin Chen,
	jesper.nilsson,


[-- Attachment #1.1: Type: text/plain, Size: 3012 bytes --]

I don't think it's necessary, what's the benfit?




2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:

> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> > 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
> >
> > Special architectures:
> >
> >  - Deside by compiler: microblaze, tile, xtensa.
> >
> >  - Deside by building host: um
> >
> >  - Next, need improve Kbuild to probe endian to deside whether need mark
> >    __BUILDING_TIME_BIG_ENDIAN__ before real config.
> >
> > Another improvements:
> >
> >  - score: use '\t' instead of ' '.
> >
> >  - s390: sort the select value in alpha order.
> >
> > Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> > ---
> >  arch/alpha/Kconfig      |  1 +
> >  arch/arc/Kconfig        |  1 +
> >  arch/arm/Kconfig        |  1 +
> >  arch/arm64/Kconfig      |  1 +
> >  arch/avr32/Kconfig      |  1 +
> >  arch/blackfin/Kconfig   |  1 +
> >  arch/c6x/Kconfig        |  1 +
> >  arch/cris/Kconfig       |  1 +
> >  arch/frv/Kconfig        |  1 +
> >  arch/hexagon/Kconfig    |  1 +
> >  arch/ia64/Kconfig       |  1 +
> >  arch/m32r/Kconfig       |  1 +
> >  arch/m68k/Kconfig       |  1 +
> >  arch/metag/Kconfig      |  1 +
> >  arch/microblaze/Kconfig |  2 ++
> >  arch/mips/Kconfig       |  1 +
> >  arch/mn10300/Kconfig    |  1 +
> >  arch/openrisc/Kconfig   |  1 +
> >  arch/parisc/Kconfig     |  1 +
> >  arch/powerpc/Kconfig    |  1 +
> >  arch/s390/Kconfig       |  3 ++-
> >  arch/score/Kconfig      | 21 +++++++++++----------
> >  arch/sparc/Kconfig      |  1 +
> >  arch/tile/Kconfig       |  2 ++
> >  arch/um/Kconfig.common  |  2 ++
> >  arch/unicore32/Kconfig  |  1 +
> >  arch/x86/Kconfig        |  1 +
> >  arch/xtensa/Kconfig     |  2 ++
> >  init/Kconfig            |  6 ++++++
> >  29 files changed, 49 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> > index b7ff9a3..1cb7426 100644
> > --- a/arch/alpha/Kconfig
> > +++ b/arch/alpha/Kconfig
> > @@ -27,6 +27,7 @@ config ALPHA
> >       select MODULES_USE_ELF_RELA
> >       select ODD_RT_SIGACTION
> >       select OLD_SIGSUSPEND
> > +     select CPU_LITTLE_ENDIAN
> >       help
> >         The Alpha is a 64-bit general-purpose processor designed and
> >         marketed by the Digital Equipment Corporation of blessed memory,
> > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> > index 9596b0a..e939abd 100644
> > --- a/arch/arc/Kconfig
> > +++ b/arch/arc/Kconfig
> > @@ -35,6 +35,7 @@ config ARC
> >       select OF_EARLY_FLATTREE
> >       select PERF_USE_VMALLOC
> >       select HAVE_DEBUG_STACKOVERFLOW
> > +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>
> It is not clear what exactly are you trying to fix. What doesn't work w/o
> this
> patch !
>
> -Vineet
>

[-- Attachment #1.2: Type: text/html, Size: 4242 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:27     ` Lennox Wu
  0 siblings, 0 replies; 58+ messages in thread
From: Lennox Wu @ 2014-08-14 18:27 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: linux-m32r-ja, linux-mips, a-jacquiot, catalin.marinas, linux,
	will.deacon, dhowells, jcmvbkbc, paulus, hpa, sparclinux,
	linux-hexagon, gxt, Jean Delvare, egtvedt, jonas, Liqin Chen,
	jesper.nilsson, linux-am33-list, linux, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, mingo,
	Geert Uytterhoeven, msalter, mattst88, hskinnemoen, fenghua.yu,
	james.hogan, Chen Gang, Arnd Bergmann, realmz6, heiko.carstens,
	jdike, linux-alpha, adi-buildroot-devel, cmetcalf, starvik,
	linux-m68k, linux-m32r, ink, user-mode-linux-user, tglx,
	linux-metag, linux-arm-kernel, rth, chris, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel,
	linux-s390, linux-kernel, ralf, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, akpm,
	yasutake.koichi, linuxppc-dev, deller

[-- Attachment #1: Type: text/plain, Size: 3012 bytes --]

I don't think it's necessary, what's the benfit?




2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:

> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> > 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
> >
> > Special architectures:
> >
> >  - Deside by compiler: microblaze, tile, xtensa.
> >
> >  - Deside by building host: um
> >
> >  - Next, need improve Kbuild to probe endian to deside whether need mark
> >    __BUILDING_TIME_BIG_ENDIAN__ before real config.
> >
> > Another improvements:
> >
> >  - score: use '\t' instead of ' '.
> >
> >  - s390: sort the select value in alpha order.
> >
> > Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> > ---
> >  arch/alpha/Kconfig      |  1 +
> >  arch/arc/Kconfig        |  1 +
> >  arch/arm/Kconfig        |  1 +
> >  arch/arm64/Kconfig      |  1 +
> >  arch/avr32/Kconfig      |  1 +
> >  arch/blackfin/Kconfig   |  1 +
> >  arch/c6x/Kconfig        |  1 +
> >  arch/cris/Kconfig       |  1 +
> >  arch/frv/Kconfig        |  1 +
> >  arch/hexagon/Kconfig    |  1 +
> >  arch/ia64/Kconfig       |  1 +
> >  arch/m32r/Kconfig       |  1 +
> >  arch/m68k/Kconfig       |  1 +
> >  arch/metag/Kconfig      |  1 +
> >  arch/microblaze/Kconfig |  2 ++
> >  arch/mips/Kconfig       |  1 +
> >  arch/mn10300/Kconfig    |  1 +
> >  arch/openrisc/Kconfig   |  1 +
> >  arch/parisc/Kconfig     |  1 +
> >  arch/powerpc/Kconfig    |  1 +
> >  arch/s390/Kconfig       |  3 ++-
> >  arch/score/Kconfig      | 21 +++++++++++----------
> >  arch/sparc/Kconfig      |  1 +
> >  arch/tile/Kconfig       |  2 ++
> >  arch/um/Kconfig.common  |  2 ++
> >  arch/unicore32/Kconfig  |  1 +
> >  arch/x86/Kconfig        |  1 +
> >  arch/xtensa/Kconfig     |  2 ++
> >  init/Kconfig            |  6 ++++++
> >  29 files changed, 49 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> > index b7ff9a3..1cb7426 100644
> > --- a/arch/alpha/Kconfig
> > +++ b/arch/alpha/Kconfig
> > @@ -27,6 +27,7 @@ config ALPHA
> >       select MODULES_USE_ELF_RELA
> >       select ODD_RT_SIGACTION
> >       select OLD_SIGSUSPEND
> > +     select CPU_LITTLE_ENDIAN
> >       help
> >         The Alpha is a 64-bit general-purpose processor designed and
> >         marketed by the Digital Equipment Corporation of blessed memory,
> > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> > index 9596b0a..e939abd 100644
> > --- a/arch/arc/Kconfig
> > +++ b/arch/arc/Kconfig
> > @@ -35,6 +35,7 @@ config ARC
> >       select OF_EARLY_FLATTREE
> >       select PERF_USE_VMALLOC
> >       select HAVE_DEBUG_STACKOVERFLOW
> > +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>
> It is not clear what exactly are you trying to fix. What doesn't work w/o
> this
> patch !
>
> -Vineet
>

[-- Attachment #2: Type: text/html, Size: 4242 bytes --]

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 18:27     ` Lennox Wu
  0 siblings, 0 replies; 58+ messages in thread
From: Lennox Wu @ 2014-08-14 18:27 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Chen Gang, Arnd Bergmann, akpm, rth, ink, mattst88,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, David S. Miller,
	cmetcalf, jdike, Richard Weinberger, gxt, tglx, mingo, hpa,
	chris, jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

[-- Attachment #1: Type: text/plain, Size: 3012 bytes --]

I don't think it's necessary, what's the benfit?




2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:

> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
> > 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
> >
> > Special architectures:
> >
> >  - Deside by compiler: microblaze, tile, xtensa.
> >
> >  - Deside by building host: um
> >
> >  - Next, need improve Kbuild to probe endian to deside whether need mark
> >    __BUILDING_TIME_BIG_ENDIAN__ before real config.
> >
> > Another improvements:
> >
> >  - score: use '\t' instead of ' '.
> >
> >  - s390: sort the select value in alpha order.
> >
> > Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> > ---
> >  arch/alpha/Kconfig      |  1 +
> >  arch/arc/Kconfig        |  1 +
> >  arch/arm/Kconfig        |  1 +
> >  arch/arm64/Kconfig      |  1 +
> >  arch/avr32/Kconfig      |  1 +
> >  arch/blackfin/Kconfig   |  1 +
> >  arch/c6x/Kconfig        |  1 +
> >  arch/cris/Kconfig       |  1 +
> >  arch/frv/Kconfig        |  1 +
> >  arch/hexagon/Kconfig    |  1 +
> >  arch/ia64/Kconfig       |  1 +
> >  arch/m32r/Kconfig       |  1 +
> >  arch/m68k/Kconfig       |  1 +
> >  arch/metag/Kconfig      |  1 +
> >  arch/microblaze/Kconfig |  2 ++
> >  arch/mips/Kconfig       |  1 +
> >  arch/mn10300/Kconfig    |  1 +
> >  arch/openrisc/Kconfig   |  1 +
> >  arch/parisc/Kconfig     |  1 +
> >  arch/powerpc/Kconfig    |  1 +
> >  arch/s390/Kconfig       |  3 ++-
> >  arch/score/Kconfig      | 21 +++++++++++----------
> >  arch/sparc/Kconfig      |  1 +
> >  arch/tile/Kconfig       |  2 ++
> >  arch/um/Kconfig.common  |  2 ++
> >  arch/unicore32/Kconfig  |  1 +
> >  arch/x86/Kconfig        |  1 +
> >  arch/xtensa/Kconfig     |  2 ++
> >  init/Kconfig            |  6 ++++++
> >  29 files changed, 49 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
> > index b7ff9a3..1cb7426 100644
> > --- a/arch/alpha/Kconfig
> > +++ b/arch/alpha/Kconfig
> > @@ -27,6 +27,7 @@ config ALPHA
> >       select MODULES_USE_ELF_RELA
> >       select ODD_RT_SIGACTION
> >       select OLD_SIGSUSPEND
> > +     select CPU_LITTLE_ENDIAN
> >       help
> >         The Alpha is a 64-bit general-purpose processor designed and
> >         marketed by the Digital Equipment Corporation of blessed memory,
> > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> > index 9596b0a..e939abd 100644
> > --- a/arch/arc/Kconfig
> > +++ b/arch/arc/Kconfig
> > @@ -35,6 +35,7 @@ config ARC
> >       select OF_EARLY_FLATTREE
> >       select PERF_USE_VMALLOC
> >       select HAVE_DEBUG_STACKOVERFLOW
> > +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>
> It is not clear what exactly are you trying to fix. What doesn't work w/o
> this
> patch !
>
> -Vineet
>

[-- Attachment #2: Type: text/html, Size: 4242 bytes --]

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 18:04   ` Ralf Baechle
  (?)
@ 2014-08-14 22:14     ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:14 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Mart

On 08/15/2014 02:04 AM, Ralf Baechle wrote:
> On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:
> 
>> 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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 22:14     ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:14 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, Lennox Wu, David S. Miller, cmetcalf,
	jdike, Richard Weinberger, gxt, tglx, mingo, hpa, chris,
	jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

On 08/15/2014 02:04 AM, Ralf Baechle wrote:
> On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:
> 
>> 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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 22:14     ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:14 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-m32r-ja, linux-mips, linux-m68k, a-jacquiot,
	catalin.marinas, linux, will.deacon, dhowells, jcmvbkbc, paulus,
	hpa, sparclinux, linux-hexagon, linux-s390, gxt, Jean Delvare,
	egtvedt, jonas, Liqin Chen, jesper.nilsson, linux-am33-list,
	linux, linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86,
	jejb, mingo, Geert Uytterhoeven, Lennox Wu, msalter, mattst88,
	hskinnemoen, fenghua.yu, james.hogan, Arnd Bergmann, realmz6,
	heiko.carstens, jdike, linux-alpha, adi-buildroot-devel,
	cmetcalf, starvik, linux-m32r, ink, user-mode-linux-user, tglx,
	linux-metag, linux-arm-kernel, rth, chris, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel, vgupta,
	linux-kernel, rkuo, user-mode-linux-devel, Richard Weinberger,
	Martin Schwidefsky, linux390, akpm, yasutake.koichi,
	linuxppc-dev, deller

On 08/15/2014 02:04 AM, Ralf Baechle wrote:
> On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote:
> 
>> 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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 18:27     ` Lennox Wu
  (?)
  (?)
@ 2014-08-14 22:22       ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:22 UTC (permalink / raw)
  To: Lennox Wu
  Cc: Vineet Gupta, Arnd Bergmann, akpm, rth, ink, mattst88,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik,

On 08/15/2014 02:27 AM, Lennox Wu wrote:
> I don't think it's necessary, what's the benfit?
> 
> 2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:
> 
>> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
[...]
>>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
>>> index 9596b0a..e939abd 100644
>>> --- a/arch/arc/Kconfig
>>> +++ b/arch/arc/Kconfig
>>> @@ -35,6 +35,7 @@ config ARC
>>>       select OF_EARLY_FLATTREE
>>>       select PERF_USE_VMALLOC
>>>       select HAVE_DEBUG_STACKOVERFLOW
>>> +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>
>> It is not clear what exactly are you trying to fix. What doesn't work w/o
>> this
>> patch !
>>

For many individual modules may need check CPU_LITTLE_ENDIAN or
CPU_BIG_ENDIAN, which is an architecture's attribute.

Or they have to list many architectures which they support, which they
don't support. And still, it is not precise.

For architecture API, endian is a main architecture's attribute which
may be used by outside, so every architecture need let outside know
about it, explicitly.


Thanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 22:22       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:22 UTC (permalink / raw)
  To: Lennox Wu
  Cc: Vineet Gupta, Arnd Bergmann, akpm, rth, ink, mattst88,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, David S. Miller,
	cmetcalf, jdike, Richard Weinberger, gxt, tglx, mingo, hpa,
	chris, jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

On 08/15/2014 02:27 AM, Lennox Wu wrote:
> I don't think it's necessary, what's the benfit?
> 
> 2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:
> 
>> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
[...]
>>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
>>> index 9596b0a..e939abd 100644
>>> --- a/arch/arc/Kconfig
>>> +++ b/arch/arc/Kconfig
>>> @@ -35,6 +35,7 @@ config ARC
>>>       select OF_EARLY_FLATTREE
>>>       select PERF_USE_VMALLOC
>>>       select HAVE_DEBUG_STACKOVERFLOW
>>> +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>
>> It is not clear what exactly are you trying to fix. What doesn't work w/o
>> this
>> patch !
>>

For many individual modules may need check CPU_LITTLE_ENDIAN or
CPU_BIG_ENDIAN, which is an architecture's attribute.

Or they have to list many architectures which they support, which they
don't support. And still, it is not precise.

For architecture API, endian is a main architecture's attribute which
may be used by outside, so every architecture need let outside know
about it, explicitly.


Thanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 22:22       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:22 UTC (permalink / raw)
  To: Lennox Wu
  Cc: Vineet Gupta, Arnd Bergmann, akpm, rth, ink, mattst88,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, ralf, yasutake.koichi, jonas,
	jejb, deller, Benjamin Herrenschmidt, paulus, mpe,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, David S. Miller,
	cmetcalf, jdike, Richard Weinberger, gxt, tglx, mingo, hpa,
	chris, jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

On 08/15/2014 02:27 AM, Lennox Wu wrote:
> I don't think it's necessary, what's the benfit?
> 
> 2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:
> 
>> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
[...]
>>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
>>> index 9596b0a..e939abd 100644
>>> --- a/arch/arc/Kconfig
>>> +++ b/arch/arc/Kconfig
>>> @@ -35,6 +35,7 @@ config ARC
>>>       select OF_EARLY_FLATTREE
>>>       select PERF_USE_VMALLOC
>>>       select HAVE_DEBUG_STACKOVERFLOW
>>> +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>
>> It is not clear what exactly are you trying to fix. What doesn't work w/o
>> this
>> patch !
>>

For many individual modules may need check CPU_LITTLE_ENDIAN or
CPU_BIG_ENDIAN, which is an architecture's attribute.

Or they have to list many architectures which they support, which they
don't support. And still, it is not precise.

For architecture API, endian is a main architecture's attribute which
may be used by outside, so every architecture need let outside know
about it, explicitly.


Thanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 22:22       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-14 22:22 UTC (permalink / raw)
  To: Lennox Wu
  Cc: linux-m32r-ja, linux-mips, a-jacquiot, catalin.marinas, linux,
	will.deacon, dhowells, jcmvbkbc, paulus, hpa, sparclinux,
	linux-hexagon, gxt, Jean Delvare, egtvedt, jonas, Liqin Chen,
	jesper.nilsson, linux-am33-list, linux, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, mingo,
	Geert Uytterhoeven, msalter, mattst88, jdike, hskinnemoen,
	fenghua.yu, james.hogan, Arnd Bergmann, realmz6, heiko.carstens,
	Vineet Gupta, linux-alpha, adi-buildroot-devel, cmetcalf,
	starvik, linux-m68k, linux-m32r, ink, user-mode-linux-user, tglx,
	linux-metag, linux-arm-kernel, rth, chris, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel,
	linux-s390, linux-kernel, ralf, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, akpm,
	yasutake.koichi, linuxppc-dev, deller

On 08/15/2014 02:27 AM, Lennox Wu wrote:
> I don't think it's necessary, what's the benfit?
> 
> 2014-08-15 2:21 GMT+08:00 Vineet Gupta <Vineet.Gupta1@synopsys.com>:
> 
>> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote:
[...]
>>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
>>> index 9596b0a..e939abd 100644
>>> --- a/arch/arc/Kconfig
>>> +++ b/arch/arc/Kconfig
>>> @@ -35,6 +35,7 @@ config ARC
>>>       select OF_EARLY_FLATTREE
>>>       select PERF_USE_VMALLOC
>>>       select HAVE_DEBUG_STACKOVERFLOW
>>> +     select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>
>> It is not clear what exactly are you trying to fix. What doesn't work w/o
>> this
>> patch !
>>

For many individual modules may need check CPU_LITTLE_ENDIAN or
CPU_BIG_ENDIAN, which is an architecture's attribute.

Or they have to list many architectures which they support, which they
don't support. And still, it is not precise.

For architecture API, endian is a main architecture's attribute which
may be used by outside, so every architecture need let outside know
about it, explicitly.


Thanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 22:22       ` Chen Gang
                           ` (3 preceding siblings ...)
  (?)
@ 2014-08-14 23:12         ` Vineet Gupta
  -1 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
> For many individual modules may need check CPU_LITTLE_ENDIAN or
> CPU_BIG_ENDIAN, which is an architecture's attribute.
>
> Or they have to list many architectures which they support, which they
> don't support. And still, it is not precise.
>
> For architecture API, endian is a main architecture's attribute which
> may be used by outside, so every architecture need let outside know
> about it, explicitly.

I don't think that is correct. The modules need to use standard API e.g. swab
which will take care of proper endian handling anyways. Why would a module do
anything endian specific outside of those APIs.

And again is this churn just theoretical or do you really have a issue at hand ! I
would not accept a change for ARC unless you prove that something is broken (or
atleast potentially broken) !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 23:12         ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson,
	dhowells, rkuo, tony.luck, fenghua.yu, takata, james.hogan,
	Michal Simek, ralf, yasutake.koichi, jonas, jejb, deller,
	Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, David S. Miller, cmetcalf, jdike,
	Richard Weinberger, gxt, tglx, mingo, hpa, chris, jcmvbkbc,
	linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
> For many individual modules may need check CPU_LITTLE_ENDIAN or
> CPU_BIG_ENDIAN, which is an architecture's attribute.
>
> Or they have to list many architectures which they support, which they
> don't support. And still, it is not precise.
>
> For architecture API, endian is a main architecture's attribute which
> may be used by outside, so every architecture need let outside know
> about it, explicitly.

I don't think that is correct. The modules need to use standard API e.g. swab
which will take care of proper endian handling anyways. Why would a module do
anything endian specific outside of those APIs.

And again is this churn just theoretical or do you really have a issue at hand ! I
would not accept a change for ARC unless you prove that something is broken (or
atleast potentially broken) !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 23:12         ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson,
	dhowells, rkuo, tony.luck, fenghua.yu, takata, james.hogan,
	Michal Simek, ralf, yasutake.koichi, jonas, jejb, deller,
	Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, David S. Miller, cmetcalf, jdike,
	Richard Weinberger, gxt, tglx, mingo, hpa, chris, jcmvbkbc,
	linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
> For many individual modules may need check CPU_LITTLE_ENDIAN or
> CPU_BIG_ENDIAN, which is an architecture's attribute.
>
> Or they have to list many architectures which they support, which they
> don't support. And still, it is not precise.
>
> For architecture API, endian is a main architecture's attribute which
> may be used by outside, so every architecture need let outside know
> about it, explicitly.

I don't think that is correct. The modules need to use standard API e.g. swab
which will take care of proper endian handling anyways. Why would a module do
anything endian specific outside of those APIs.

And again is this churn just theoretical or do you really have a issue at hand ! I
would not accept a change for ARC unless you prove that something is broken (or
atleast potentially broken) !

-Vineet

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 23:12         ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: linux-m32r-ja, linux-mips, a-jacquiot, catalin.marinas, linux,
	will.deacon, dhowells, jcmvbkbc, paulus, hpa, sparclinux,
	linux-hexagon, gxt, Jean Delvare, egtvedt, jonas, Liqin Chen,
	jesper.nilsson, linux-am33-list, linux, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, mingo,
	Geert Uytterhoeven, msalter, mattst88, hskinnemoen, fenghua.yu,
	james.hogan, Arnd Bergmann, realmz6, heiko.carstens, jdike,
	linux-alpha, adi-buildroot-devel, cmetcalf, starvik, linux-m68k,
	linux-m32r, ink, user-mode-linux-user, tglx, linux-metag,
	linux-arm-kernel, rth, chris, Michal Simek, tony.luck,
	linux-ia64, linux-parisc, linux-cris-kernel, linux-s390,
	linux-kernel, ralf, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, akpm,
	yasutake.koichi, linuxppc-dev, deller

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:=0A=
> For many individual modules may need check CPU_LITTLE_ENDIAN or=0A=
> CPU_BIG_ENDIAN, which is an architecture's attribute.=0A=
>=0A=
> Or they have to list many architectures which they support, which they=0A=
> don't support. And still, it is not precise.=0A=
>=0A=
> For architecture API, endian is a main architecture's attribute which=0A=
> may be used by outside, so every architecture need let outside know=0A=
> about it, explicitly.=0A=
=0A=
I don't think that is correct. The modules need to use standard API e.g. sw=
ab=0A=
which will take care of proper endian handling anyways. Why would a module =
do=0A=
anything endian specific outside of those APIs.=0A=
=0A=
And again is this churn just theoretical or do you really have a issue at h=
and ! I=0A=
would not accept a change for ARC unless you prove that something is broken=
 (or=0A=
atleast potentially broken) !=0A=
=0A=
-Vineet=0A=

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 23:12         ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson,
	dhowells, rkuo, tony.luck, fenghua.yu, takata, james.hogan,
	Michal Simek, ralf, yasutake.koichi, jonas, jejb, deller,
	Benjamin

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
> For many individual modules may need check CPU_LITTLE_ENDIAN or
> CPU_BIG_ENDIAN, which is an architecture's attribute.
>
> Or they have to list many architectures which they support, which they
> don't support. And still, it is not precise.
>
> For architecture API, endian is a main architecture's attribute which
> may be used by outside, so every architecture need let outside know
> about it, explicitly.

I don't think that is correct. The modules need to use standard API e.g. swab
which will take care of proper endian handling anyways. Why would a module do
anything endian specific outside of those APIs.

And again is this churn just theoretical or do you really have a issue at hand ! I
would not accept a change for ARC unless you prove that something is broken (or
atleast potentially broken) !

-Vineet


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-14 23:12         ` Vineet Gupta
  0 siblings, 0 replies; 58+ messages in thread
From: Vineet Gupta @ 2014-08-14 23:12 UTC (permalink / raw)
  To: Chen Gang, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson

On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
> For many individual modules may need check CPU_LITTLE_ENDIAN or
> CPU_BIG_ENDIAN, which is an architecture's attribute.
>
> Or they have to list many architectures which they support, which they
> don't support. And still, it is not precise.
>
> For architecture API, endian is a main architecture's attribute which
> may be used by outside, so every architecture need let outside know
> about it, explicitly.

I don't think that is correct. The modules need to use standard API e.g. swab
which will take care of proper endian handling anyways. Why would a module do
anything endian specific outside of those APIs.

And again is this churn just theoretical or do you really have a issue at hand ! I
would not accept a change for ARC unless you prove that something is broken (or
atleast potentially broken) !

-Vineet


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 23:12         ` Vineet Gupta
                             ` (2 preceding siblings ...)
  (?)
@ 2014-08-15  1:29           ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  1:29 UTC (permalink / raw)
  To: Vineet Gupta, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson



On 8/15/14 7:12, Vineet Gupta wrote:
> On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
>> For many individual modules may need check CPU_LITTLE_ENDIAN or
>> CPU_BIG_ENDIAN, which is an architecture's attribute.
>>
>> Or they have to list many architectures which they support, which they
>> don't support. And still, it is not precise.
>>
>> For architecture API, endian is a main architecture's attribute which
>> may be used by outside, so every architecture need let outside know
>> about it, explicitly.
> 
> I don't think that is correct. The modules need to use standard API e.g. swab
> which will take care of proper endian handling anyways. Why would a module do
> anything endian specific outside of those APIs.
> 

For building time, modules can check endians with various API. But for
config time, at present, we have no related standard API for it.

> And again is this churn just theoretical or do you really have a issue at hand ! I
> would not accept a change for ARC unless you prove that something is broken (or
> atleast potentially broken) !
> 

An issue for allmodconfig under microblaze, the original patch is below
(I guess, not only one module may match this case):


-------- Forwarded Message --------
Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture
Date: Tue, 05 Aug 2014 02:24:09 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: isdn@linux-pingi.de
CC: davem@davemloft.net, Jean Delvare <jdelvare@suse.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, monstr@monstr.eu

For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN,
so skip microblaze, just like skip all other architectures which have
no CONFIG_*_ENDIAN.

The related error (with allmodconfig under microblaze):

    CC [M]  drivers/isdn/hisax/nj_s.o
  drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
  drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now"
   #error "not running on big endian machines now"
    ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/isdn/hisax/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 97465ac..eb83d94 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,7 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card





Thanks.
-- 
Chen Gang

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

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:29           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  1:29 UTC (permalink / raw)
  To: Vineet Gupta, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson,
	dhowells, rkuo, tony.luck, fenghua.yu, takata, james.hogan,
	Michal Simek, ralf, yasutake.koichi, jonas, jejb, deller,
	Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, David S. Miller, cmetcalf, jdike,
	Richard Weinberger, gxt, tglx, mingo, hpa, chris, jcmvbkbc,
	linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa



On 8/15/14 7:12, Vineet Gupta wrote:
> On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
>> For many individual modules may need check CPU_LITTLE_ENDIAN or
>> CPU_BIG_ENDIAN, which is an architecture's attribute.
>>
>> Or they have to list many architectures which they support, which they
>> don't support. And still, it is not precise.
>>
>> For architecture API, endian is a main architecture's attribute which
>> may be used by outside, so every architecture need let outside know
>> about it, explicitly.
> 
> I don't think that is correct. The modules need to use standard API e.g. swab
> which will take care of proper endian handling anyways. Why would a module do
> anything endian specific outside of those APIs.
> 

For building time, modules can check endians with various API. But for
config time, at present, we have no related standard API for it.

> And again is this churn just theoretical or do you really have a issue at hand ! I
> would not accept a change for ARC unless you prove that something is broken (or
> atleast potentially broken) !
> 

An issue for allmodconfig under microblaze, the original patch is below
(I guess, not only one module may match this case):


-------- Forwarded Message --------
Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture
Date: Tue, 05 Aug 2014 02:24:09 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: isdn@linux-pingi.de
CC: davem@davemloft.net, Jean Delvare <jdelvare@suse.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, monstr@monstr.eu

For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN,
so skip microblaze, just like skip all other architectures which have
no CONFIG_*_ENDIAN.

The related error (with allmodconfig under microblaze):

    CC [M]  drivers/isdn/hisax/nj_s.o
  drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
  drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now"
   #error "not running on big endian machines now"
    ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/isdn/hisax/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 97465ac..eb83d94 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,7 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card





Thanks.
-- 
Chen Gang

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

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:29           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  1:29 UTC (permalink / raw)
  To: Vineet Gupta, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson,
	dhowells, rkuo, tony.luck, fenghua.yu, takata, james.hogan,
	Michal Simek, ralf, yasutake.koichi, jonas, jejb, deller,
	Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, David S. Miller, cmetcalf, jdike,
	Richard Weinberger, gxt, tglx, mingo, hpa, chris, jcmvbkbc,
	linux390, x86, linux-alpha, linux-kernel, linux-arm-kernel,
	adi-buildroot-devel, linux-c6x-dev, linux-cris-kernel,
	linux-hexagon, linux-ia64, linux-m32r, linux-m32r-ja, linux-m68k,
	linux-metag, linux-mips, linux-am33-list, linux, linux-parisc,
	linuxppc-dev, linux-s390, sparclinux, user-mode-linux-devel,
	user-mode-linux-user, linux-xtensa



On 8/15/14 7:12, Vineet Gupta wrote:
> On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
>> For many individual modules may need check CPU_LITTLE_ENDIAN or
>> CPU_BIG_ENDIAN, which is an architecture's attribute.
>>
>> Or they have to list many architectures which they support, which they
>> don't support. And still, it is not precise.
>>
>> For architecture API, endian is a main architecture's attribute which
>> may be used by outside, so every architecture need let outside know
>> about it, explicitly.
> 
> I don't think that is correct. The modules need to use standard API e.g. swab
> which will take care of proper endian handling anyways. Why would a module do
> anything endian specific outside of those APIs.
> 

For building time, modules can check endians with various API. But for
config time, at present, we have no related standard API for it.

> And again is this churn just theoretical or do you really have a issue at hand ! I
> would not accept a change for ARC unless you prove that something is broken (or
> atleast potentially broken) !
> 

An issue for allmodconfig under microblaze, the original patch is below
(I guess, not only one module may match this case):


-------- Forwarded Message --------
Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture
Date: Tue, 05 Aug 2014 02:24:09 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: isdn@linux-pingi.de
CC: davem@davemloft.net, Jean Delvare <jdelvare@suse.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, monstr@monstr.eu

For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN,
so skip microblaze, just like skip all other architectures which have
no CONFIG_*_ENDIAN.

The related error (with allmodconfig under microblaze):

    CC [M]  drivers/isdn/hisax/nj_s.o
  drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
  drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now"
   #error "not running on big endian machines now"
    ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/isdn/hisax/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 97465ac..eb83d94 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,7 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card





Thanks.
-- 
Chen Gang

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

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:29           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  1:29 UTC (permalink / raw)
  To: Vineet Gupta, Lennox Wu
  Cc: linux-m32r-ja, linux-mips, a-jacquiot, catalin.marinas, linux,
	will.deacon, dhowells, jcmvbkbc, paulus, hpa, sparclinux,
	linux-hexagon, gxt, Jean Delvare, egtvedt, jonas, Liqin Chen,
	jesper.nilsson, linux-am33-list, linux, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, mingo,
	Geert Uytterhoeven, msalter, mattst88, hskinnemoen, fenghua.yu,
	james.hogan, Arnd Bergmann, realmz6, heiko.carstens, jdike,
	linux-alpha, adi-buildroot-devel, cmetcalf, starvik, linux-m68k,
	linux-m32r, ink, user-mode-linux-user, tglx, linux-metag,
	linux-arm-kernel, rth, chris, Michal Simek, tony.luck,
	linux-ia64, linux-parisc, linux-cris-kernel, linux-s390,
	linux-kernel, ralf, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, akpm,
	yasutake.koichi, linuxppc-dev, deller



On 8/15/14 7:12, Vineet Gupta wrote:
> On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
>> For many individual modules may need check CPU_LITTLE_ENDIAN or
>> CPU_BIG_ENDIAN, which is an architecture's attribute.
>>
>> Or they have to list many architectures which they support, which they
>> don't support. And still, it is not precise.
>>
>> For architecture API, endian is a main architecture's attribute which
>> may be used by outside, so every architecture need let outside know
>> about it, explicitly.
> 
> I don't think that is correct. The modules need to use standard API e.g. swab
> which will take care of proper endian handling anyways. Why would a module do
> anything endian specific outside of those APIs.
> 

For building time, modules can check endians with various API. But for
config time, at present, we have no related standard API for it.

> And again is this churn just theoretical or do you really have a issue at hand ! I
> would not accept a change for ARC unless you prove that something is broken (or
> atleast potentially broken) !
> 

An issue for allmodconfig under microblaze, the original patch is below
(I guess, not only one module may match this case):


-------- Forwarded Message --------
Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture
Date: Tue, 05 Aug 2014 02:24:09 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: isdn@linux-pingi.de
CC: davem@davemloft.net, Jean Delvare <jdelvare@suse.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, monstr@monstr.eu

For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN,
so skip microblaze, just like skip all other architectures which have
no CONFIG_*_ENDIAN.

The related error (with allmodconfig under microblaze):

    CC [M]  drivers/isdn/hisax/nj_s.o
  drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
  drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now"
   #error "not running on big endian machines now"
    ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/isdn/hisax/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 97465ac..eb83d94 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,7 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card





Thanks.
-- 
Chen Gang

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

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:29           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  1:29 UTC (permalink / raw)
  To: Vineet Gupta, Lennox Wu
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, Geert Uytterhoeven,
	Jean Delvare, linux, catalin.marinas, will.deacon, hskinnemoen,
	egtvedt, realmz6, msalter, a-jacquiot, starvik, jesper.nilsson



On 8/15/14 7:12, Vineet Gupta wrote:
> On Thursday 14 August 2014 03:22 PM, Chen Gang wrote:
>> For many individual modules may need check CPU_LITTLE_ENDIAN or
>> CPU_BIG_ENDIAN, which is an architecture's attribute.
>>
>> Or they have to list many architectures which they support, which they
>> don't support. And still, it is not precise.
>>
>> For architecture API, endian is a main architecture's attribute which
>> may be used by outside, so every architecture need let outside know
>> about it, explicitly.
> 
> I don't think that is correct. The modules need to use standard API e.g. swab
> which will take care of proper endian handling anyways. Why would a module do
> anything endian specific outside of those APIs.
> 

For building time, modules can check endians with various API. But for
config time, at present, we have no related standard API for it.

> And again is this churn just theoretical or do you really have a issue at hand ! I
> would not accept a change for ARC unless you prove that something is broken (or
> atleast potentially broken) !
> 

An issue for allmodconfig under microblaze, the original patch is below
(I guess, not only one module may match this case):


-------- Forwarded Message --------
Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture
Date: Tue, 05 Aug 2014 02:24:09 +0800
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: isdn@linux-pingi.de
CC: davem@davemloft.net, Jean Delvare <jdelvare@suse.de>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>, monstr@monstr.eu

For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN,
so skip microblaze, just like skip all other architectures which have
no CONFIG_*_ENDIAN.

The related error (with allmodconfig under microblaze):

    CC [M]  drivers/isdn/hisax/nj_s.o
  drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
  drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now"
   #error "not running on big endian machines now"
    ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 drivers/isdn/hisax/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
index 97465ac..eb83d94 100644
--- a/drivers/isdn/hisax/Kconfig
+++ b/drivers/isdn/hisax/Kconfig
@@ -237,7 +237,7 @@ config HISAX_MIC
 
 config HISAX_NETJET
 	bool "NETjet card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the NetJet from Traverse
@@ -249,7 +249,7 @@ config HISAX_NETJET
 
 config HISAX_NETJET_U
 	bool "NETspider U card"
-	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
+	depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE))
 	depends on VIRT_TO_BUS
 	help
 	  This enables HiSax support for the Netspider U interface ISDN card





Thanks.
-- 
Chen Gang

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


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 16:54 ` Chen Gang
  (?)
  (?)
@ 2014-08-15  1:47   ` Max Filippov
  -1 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:47 UTC (permalink / raw)
  To: Chen Gang
  Cc: linux-m32r-ja, Linux/MIPS Mailing List, linux-s390,
	Benjamin Herrenschmidt, Aurelien Jacquiot, Catalin Marinas,
	linux, Will Deacon, David Howells, Paul Mackerras,
	H. Peter Anvin, sparclinux, linux-hexagon, Guan Xuetao,
	Jean Delvare, egtvedt, Liqin Chen, jesper.nilsson,
	linux-am33-list, Russell King, linux-c6x-dev, David S. Miller,
	linux-xtensa, Michael Ellerman, takata

Hi Chen,

On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

[...]

> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
> index 3a617af..a3e8f7e 100644
> --- a/arch/xtensa/Kconfig
> +++ b/arch/xtensa/Kconfig
> @@ -22,6 +22,8 @@ config XTENSA
>         select HAVE_IRQ_TIME_ACCOUNTING
>         select HAVE_PERF_EVENTS
>         select COMMON_CLK
> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>         help
>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>           primarily for embedded systems.  These processors are both

I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:47   ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:47 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, Linux/MIPS Mailing List,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

Hi Chen,

On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

[...]

> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
> index 3a617af..a3e8f7e 100644
> --- a/arch/xtensa/Kconfig
> +++ b/arch/xtensa/Kconfig
> @@ -22,6 +22,8 @@ config XTENSA
>         select HAVE_IRQ_TIME_ACCOUNTING
>         select HAVE_PERF_EVENTS
>         select COMMON_CLK
> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>         help
>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>           primarily for embedded systems.  These processors are both

I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:47   ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:47 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, Linux/MIPS Mailing List,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa

Hi Chen,

On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

[...]

> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
> index 3a617af..a3e8f7e 100644
> --- a/arch/xtensa/Kconfig
> +++ b/arch/xtensa/Kconfig
> @@ -22,6 +22,8 @@ config XTENSA
>         select HAVE_IRQ_TIME_ACCOUNTING
>         select HAVE_PERF_EVENTS
>         select COMMON_CLK
> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>         help
>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>           primarily for embedded systems.  These processors are both

I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:47   ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:47 UTC (permalink / raw)
  To: Chen Gang
  Cc: linux-m32r-ja, Linux/MIPS Mailing List, linux-s390,
	Aurelien Jacquiot, Catalin Marinas, linux, Will Deacon,
	David Howells, Paul Mackerras, H. Peter Anvin, sparclinux,
	linux-hexagon, Guan Xuetao, Jean Delvare, egtvedt, Jonas Bonn,
	Liqin Chen, jesper.nilsson, linux-am33-list, Russell King,
	linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86, jejb,
	Ingo Molnar, Geert Uytterhoeven, Lennox Wu, Mark Salter,
	Matt Turner, hskinnemoen, fenghua.yu, James Hogan, Arnd Bergmann,
	realmz6, heiko.carstens, jdike, linux-alpha, adi-buildroot-devel,
	Chris Metcalf, starvik, linux-m68k, linux-m32r, Ivan Kokshaysky,
	user-mode-linux-user, Thomas Gleixner, linux-metag,
	linux-arm-kernel, Richard Henderson, Chris Zankel, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel, vgupta,
	linux-kernel, Ralf Baechle, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, Andrew Morton,
	yasutake.koichi, linuxppc-dev, deller

Hi Chen,

On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> 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
>
> Special architectures:
>
>  - Deside by compiler: microblaze, tile, xtensa.
>
>  - Deside by building host: um
>
>  - Next, need improve Kbuild to probe endian to deside whether need mark
>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

[...]

> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
> index 3a617af..a3e8f7e 100644
> --- a/arch/xtensa/Kconfig
> +++ b/arch/xtensa/Kconfig
> @@ -22,6 +22,8 @@ config XTENSA
>         select HAVE_IRQ_TIME_ACCOUNTING
>         select HAVE_PERF_EVENTS
>         select COMMON_CLK
> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>         help
>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>           primarily for embedded systems.  These processors are both

I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-15  1:47   ` Max Filippov
  (?)
  (?)
@ 2014-08-15  1:52     ` Max Filippov
  -1 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:52 UTC (permalink / raw)
  To: Chen Gang
  Cc: Linux/MIPS Mailing List, linux-s390, Benjamin Herrenschmidt,
	Aurelien Jacquiot, Catalin Marinas, linux, Will Deacon,
	David Howells, Paul Mackerras, H. Peter Anvin, sparclinux,
	linux-hexagon, Guan Xuetao, Jean Delvare, egtvedt, Liqin Chen,
	jesper.nilsson, linux-am33-list, Russell King, linux-c6x-dev,
	David S. Miller, linux-xtensa, Michael Ellerman, takata, x86,
	jejb

On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hi Chen,
>
> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>> 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
>>
>> Special architectures:
>>
>>  - Deside by compiler: microblaze, tile, xtensa.
>>
>>  - Deside by building host: um
>>
>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> [...]
>
>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>> index 3a617af..a3e8f7e 100644
>> --- a/arch/xtensa/Kconfig
>> +++ b/arch/xtensa/Kconfig
>> @@ -22,6 +22,8 @@ config XTENSA
>>         select HAVE_IRQ_TIME_ACCOUNTING
>>         select HAVE_PERF_EVENTS
>>         select COMMON_CLK
>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>         help
>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>           primarily for embedded systems.  These processors are both
>
> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't

Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
compiler endianness.

> find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
> something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:52     ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:52 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k,
	linux-metag, Linux/MIPS Mailing List, linux-am33-list, linux,
	linux-parisc, linuxppc-dev, linux-s390, sparclinux,
	user-mode-linux-devel, user-mode-linux-user, linux-xtensa

On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hi Chen,
>
> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>> 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
>>
>> Special architectures:
>>
>>  - Deside by compiler: microblaze, tile, xtensa.
>>
>>  - Deside by building host: um
>>
>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> [...]
>
>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>> index 3a617af..a3e8f7e 100644
>> --- a/arch/xtensa/Kconfig
>> +++ b/arch/xtensa/Kconfig
>> @@ -22,6 +22,8 @@ config XTENSA
>>         select HAVE_IRQ_TIME_ACCOUNTING
>>         select HAVE_PERF_EVENTS
>>         select COMMON_CLK
>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>         help
>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>           primarily for embedded systems.  These processors are both
>
> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't

Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
compiler endianness.

> find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
> something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:52     ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:52 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k,
	linux-metag, Linux/MIPS Mailing List, linux-am33-list, linux,
	linux-parisc, linuxppc-dev, linux-s390, sparclinux,
	user-mode-linux-devel, user-mode-linux-user, linux-xtensa

On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hi Chen,
>
> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>> 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
>>
>> Special architectures:
>>
>>  - Deside by compiler: microblaze, tile, xtensa.
>>
>>  - Deside by building host: um
>>
>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> [...]
>
>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>> index 3a617af..a3e8f7e 100644
>> --- a/arch/xtensa/Kconfig
>> +++ b/arch/xtensa/Kconfig
>> @@ -22,6 +22,8 @@ config XTENSA
>>         select HAVE_IRQ_TIME_ACCOUNTING
>>         select HAVE_PERF_EVENTS
>>         select COMMON_CLK
>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>         help
>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>           primarily for embedded systems.  These processors are both
>
> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't

Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
compiler endianness.

> find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
> something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  1:52     ` Max Filippov
  0 siblings, 0 replies; 58+ messages in thread
From: Max Filippov @ 2014-08-15  1:52 UTC (permalink / raw)
  To: Chen Gang
  Cc: Linux/MIPS Mailing List, linux-s390, Aurelien Jacquiot,
	Catalin Marinas, linux, Will Deacon, David Howells,
	Paul Mackerras, H. Peter Anvin, sparclinux, linux-hexagon,
	Guan Xuetao, Jean Delvare, egtvedt, Jonas Bonn, Liqin Chen,
	jesper.nilsson, linux-am33-list, Russell King, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, Ingo Molnar,
	Geert Uytterhoeven, Lennox Wu, Mark Salter, Matt Turner,
	hskinnemoen, fenghua.yu, James Hogan, Arnd Bergmann, realmz6,
	heiko.carstens, jdike, linux-alpha, adi-buildroot-devel,
	Chris Metcalf, starvik, linux-m68k, Ivan Kokshaysky,
	user-mode-linux-user, Thomas Gleixner, linux-metag,
	linux-arm-kernel, Richard Henderson, Chris Zankel, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel, vgupta,
	linux-kernel, Ralf Baechle, rkuo, user-mode-linux-devel,
	Richard Weinberger, Martin Schwidefsky, linux390, Andrew Morton,
	yasutake.koichi, linuxppc-dev, deller

On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hi Chen,
>
> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>> 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
>>
>> Special architectures:
>>
>>  - Deside by compiler: microblaze, tile, xtensa.
>>
>>  - Deside by building host: um
>>
>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.
>
> [...]
>
>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>> index 3a617af..a3e8f7e 100644
>> --- a/arch/xtensa/Kconfig
>> +++ b/arch/xtensa/Kconfig
>> @@ -22,6 +22,8 @@ config XTENSA
>>         select HAVE_IRQ_TIME_ACCOUNTING
>>         select HAVE_PERF_EVENTS
>>         select COMMON_CLK
>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>         help
>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>           primarily for embedded systems.  These processors are both
>
> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't

Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
compiler endianness.

> find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
> something?

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-15  1:52     ` Max Filippov
                         ` (2 preceding siblings ...)
  (?)
@ 2014-08-15  2:06       ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  2:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan

On 8/15/14 9:52, Max Filippov wrote:
> On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Chen,
>>
>> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>>> 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
>>>
>>> Special architectures:
>>>
>>>  - Deside by compiler: microblaze, tile, xtensa.
>>>
>>>  - Deside by building host: um
>>>
>>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

Please check this comments, thanks.

>>
>> [...]
>>
>>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>>> index 3a617af..a3e8f7e 100644
>>> --- a/arch/xtensa/Kconfig
>>> +++ b/arch/xtensa/Kconfig
>>> @@ -22,6 +22,8 @@ config XTENSA
>>>         select HAVE_IRQ_TIME_ACCOUNTING
>>>         select HAVE_PERF_EVENTS
>>>         select COMMON_CLK
>>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>>         help
>>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>>           primarily for embedded systems.  These processors are both
>>
>> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
>> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
> 
> Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
> compiler endianness.
> 

Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need
be improved for it, just the comments said.

If this patch can be pass checking, I shall improve the Kbuild for it,
also will modify some individual drivers to use CPU_*_ENDIAN.

I guess, we need Cc to kbuild for getting more ideas, suggestions, or
completions.



THanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  2:06       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  2:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k,
	linux-metag, Linux/MIPS Mailing List, linux-am33-list, linux,
	linux-parisc, linuxppc-dev, linux-s390, sparclinux,
	user-mode-linux-devel, user-mode-linux-user, linux-xtensa,
	linux-kbuild

On 8/15/14 9:52, Max Filippov wrote:
> On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Chen,
>>
>> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>>> 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
>>>
>>> Special architectures:
>>>
>>>  - Deside by compiler: microblaze, tile, xtensa.
>>>
>>>  - Deside by building host: um
>>>
>>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

Please check this comments, thanks.

>>
>> [...]
>>
>>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>>> index 3a617af..a3e8f7e 100644
>>> --- a/arch/xtensa/Kconfig
>>> +++ b/arch/xtensa/Kconfig
>>> @@ -22,6 +22,8 @@ config XTENSA
>>>         select HAVE_IRQ_TIME_ACCOUNTING
>>>         select HAVE_PERF_EVENTS
>>>         select COMMON_CLK
>>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>>         help
>>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>>           primarily for embedded systems.  These processors are both
>>
>> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
>> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
> 
> Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
> compiler endianness.
> 

Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need
be improved for it, just the comments said.

If this patch can be pass checking, I shall improve the Kbuild for it,
also will modify some individual drivers to use CPU_*_ENDIAN.

I guess, we need Cc to kbuild for getting more ideas, suggestions, or
completions.



THanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  2:06       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  2:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan,
	Michal Simek, Ralf Baechle, yasutake.koichi, Jonas Bonn, jejb,
	deller, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Martin Schwidefsky, heiko.carstens, Liqin Chen, Lennox Wu,
	David S. Miller, Chris Metcalf, jdike, Richard Weinberger,
	Guan Xuetao, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chris Zankel, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m68k,
	linux-metag, Linux/MIPS Mailing List, linux-am33-list, linux,
	linux-parisc, linuxppc-dev, linux-s390, sparclinux,
	user-mode-linux-devel, user-mode-linux-user, linux-xtensa,
	linux-kbuild

On 8/15/14 9:52, Max Filippov wrote:
> On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Chen,
>>
>> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>>> 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
>>>
>>> Special architectures:
>>>
>>>  - Deside by compiler: microblaze, tile, xtensa.
>>>
>>>  - Deside by building host: um
>>>
>>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

Please check this comments, thanks.

>>
>> [...]
>>
>>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>>> index 3a617af..a3e8f7e 100644
>>> --- a/arch/xtensa/Kconfig
>>> +++ b/arch/xtensa/Kconfig
>>> @@ -22,6 +22,8 @@ config XTENSA
>>>         select HAVE_IRQ_TIME_ACCOUNTING
>>>         select HAVE_PERF_EVENTS
>>>         select COMMON_CLK
>>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>>         help
>>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>>           primarily for embedded systems.  These processors are both
>>
>> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
>> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
> 
> Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
> compiler endianness.
> 

Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need
be improved for it, just the comments said.

If this patch can be pass checking, I shall improve the Kbuild for it,
also will modify some individual drivers to use CPU_*_ENDIAN.

I guess, we need Cc to kbuild for getting more ideas, suggestions, or
completions.



THanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  2:06       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  2:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: Linux/MIPS Mailing List, linux-s390, Aurelien Jacquiot,
	Catalin Marinas, linux, Will Deacon, David Howells,
	Paul Mackerras, H. Peter Anvin, sparclinux, linux-hexagon,
	Guan Xuetao, Jean Delvare, egtvedt, Jonas Bonn, Liqin Chen,
	jesper.nilsson, linux-am33-list, Russell King, linux-c6x-dev,
	David S. Miller, linux-xtensa, takata, x86, jejb, Ingo Molnar,
	Geert Uytterhoeven, Lennox Wu, Mark Salter, Matt Turner,
	hskinnemoen, fenghua.yu, James Hogan, Arnd Bergmann, realmz6,
	linux-kbuild, heiko.carstens, jdike, linux-alpha,
	adi-buildroot-devel, Chris Metcalf, starvik, linux-m68k,
	Ivan Kokshaysky, user-mode-linux-user, Thomas Gleixner,
	linux-metag, linux-arm-kernel, Richard Henderson, Chris Zankel,
	Michal Simek, tony.luck, linux-ia64, linux-parisc,
	linux-cris-kernel, vgupta, linux-kernel, Ralf Baechle, rkuo,
	user-mode-linux-devel, Richard Weinberger, Martin Schwidefsky,
	linux390, Andrew Morton, yasutake.koichi, linuxppc-dev, deller

On 8/15/14 9:52, Max Filippov wrote:
> On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Chen,
>>
>> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>>> 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
>>>
>>> Special architectures:
>>>
>>>  - Deside by compiler: microblaze, tile, xtensa.
>>>
>>>  - Deside by building host: um
>>>
>>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

Please check this comments, thanks.

>>
>> [...]
>>
>>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>>> index 3a617af..a3e8f7e 100644
>>> --- a/arch/xtensa/Kconfig
>>> +++ b/arch/xtensa/Kconfig
>>> @@ -22,6 +22,8 @@ config XTENSA
>>>         select HAVE_IRQ_TIME_ACCOUNTING
>>>         select HAVE_PERF_EVENTS
>>>         select COMMON_CLK
>>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>>         help
>>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>>           primarily for embedded systems.  These processors are both
>>
>> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
>> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
> 
> Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
> compiler endianness.
> 

Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need
be improved for it, just the comments said.

If this patch can be pass checking, I shall improve the Kbuild for it,
also will modify some individual drivers to use CPU_*_ENDIAN.

I guess, we need Cc to kbuild for getting more ideas, suggestions, or
completions.



THanks.
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  2:06       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  2:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: Arnd Bergmann, Andrew Morton, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, vgupta, Geert Uytterhoeven, Jean Delvare,
	Russell King, Catalin Marinas, Will Deacon, hskinnemoen, egtvedt,
	realmz6, Mark Salter, Aurelien Jacquiot, starvik, jesper.nilsson,
	David Howells, rkuo, tony.luck, fenghua.yu, takata, James Hogan

On 8/15/14 9:52, Max Filippov wrote:
> On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Chen,
>>
>> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
>>> 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
>>>
>>> Special architectures:
>>>
>>>  - Deside by compiler: microblaze, tile, xtensa.
>>>
>>>  - Deside by building host: um
>>>
>>>  - Next, need improve Kbuild to probe endian to deside whether need mark
>>>    __BUILDING_TIME_BIG_ENDIAN__ before real config.

Please check this comments, thanks.

>>
>> [...]
>>
>>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
>>> index 3a617af..a3e8f7e 100644
>>> --- a/arch/xtensa/Kconfig
>>> +++ b/arch/xtensa/Kconfig
>>> @@ -22,6 +22,8 @@ config XTENSA
>>>         select HAVE_IRQ_TIME_ACCOUNTING
>>>         select HAVE_PERF_EVENTS
>>>         select COMMON_CLK
>>> +       select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
>>> +       select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
>>>         help
>>>           Xtensa processors are 32-bit RISC machines designed by Tensilica
>>>           primarily for embedded systems.  These processors are both
>>
>> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
>> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
> 
> Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
> compiler endianness.
> 

Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need
be improved for it, just the comments said.

If this patch can be pass checking, I shall improve the Kbuild for it,
also will modify some individual drivers to use CPU_*_ENDIAN.

I guess, we need Cc to kbuild for getting more ideas, suggestions, or
completions.



THanks.
-- 
Chen Gang

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


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-14 22:14     ` Chen Gang
  (?)
@ 2014-08-15  9:01       ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  9:01 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Mart



On 8/15/14 6:14, Chen Gang wrote:
> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>
> 
> 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.
> 
> 

So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
other members don't need think of.

By the way, for sh, it is almost the same case, except it contents the
default value, for me, it is clear enough, so I skip sh architecture in
this patch.


Thanks
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  9:01       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  9:01 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, Lennox Wu, David S. Miller, cmetcalf,
	jdike, Richard Weinberger, gxt, tglx, mingo, hpa, chris,
	jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa, linux-sh



On 8/15/14 6:14, Chen Gang wrote:
> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>
> 
> 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.
> 
> 

So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
other members don't need think of.

By the way, for sh, it is almost the same case, except it contents the
default value, for me, it is clear enough, so I skip sh architecture in
this patch.


Thanks
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-15  9:01       ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-15  9:01 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-m32r-ja, linux-mips, linux-m68k, a-jacquiot,
	catalin.marinas, linux, will.deacon, dhowells, jcmvbkbc, paulus,
	hpa, sparclinux, linux-hexagon, linux-s390, gxt, Jean Delvare,
	egtvedt, jonas, Liqin Chen, jesper.nilsson, linux-am33-list,
	linux, linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86,
	jejb, linux-sh, mingo, Geert Uytterhoeven, Lennox Wu, msalter,
	mattst88, hskinnemoen, fenghua.yu, james.hogan, Arnd Bergmann,
	realmz6, heiko.carstens, jdike, linux-alpha, adi-buildroot-devel,
	cmetcalf, starvik, linux-m32r, ink, user-mode-linux-user, tglx,
	linux-metag, linux-arm-kernel, rth, chris, Michal Simek,
	tony.luck, linux-ia64, linux-parisc, linux-cris-kernel, vgupta,
	linux-kernel, rkuo, user-mode-linux-devel, Richard Weinberger,
	Martin Schwidefsky, linux390, akpm, yasutake.koichi,
	linuxppc-dev, deller



On 8/15/14 6:14, Chen Gang wrote:
> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>
> 
> 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.
> 
> 

So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
other members don't need think of.

By the way, for sh, it is almost the same case, except it contents the
default value, for me, it is clear enough, so I skip sh architecture in
this patch.


Thanks
-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-15  9:01       ` Chen Gang
                           ` (2 preceding siblings ...)
  (?)
@ 2014-08-24  8:38         ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-24  8:38 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen

Hello Maintainers:

Is this patch OK? If it pass basic checking, please let me know, and I
shall try to make another related patch for KBuild (I can do nothing
related with Kbuild, before get confirmation for this patch).

Thanks.

On 8/15/14 17:01, Chen Gang wrote:
> 
> 
> On 8/15/14 6:14, Chen Gang wrote:
>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>
>>
>> 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.
>>
>>
> 
> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
> other members don't need think of.
> 
> By the way, for sh, it is almost the same case, except it contents the
> default value, for me, it is clear enough, so I skip sh architecture in
> this patch.
> 
> 
> Thanks
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-24  8:38         ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-24  8:38 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen

Hello Maintainers:

Is this patch OK? If it pass basic checking, please let me know, and I
shall try to make another related patch for KBuild (I can do nothing
related with Kbuild, before get confirmation for this patch).

Thanks.

On 8/15/14 17:01, Chen Gang wrote:
> 
> 
> On 8/15/14 6:14, Chen Gang wrote:
>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>
>>
>> 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.
>>
>>
> 
> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
> other members don't need think of.
> 
> By the way, for sh, it is almost the same case, except it contents the
> default value, for me, it is clear enough, so I skip sh architecture in
> this patch.
> 
> 
> Thanks
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-24  8:38         ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-24  8:38 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, Lennox Wu, David S. Miller, cmetcalf,
	jdike, Richard Weinberger, gxt, tglx, mingo, hpa, chris,
	jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa, linux-sh, torvalds

Hello Maintainers:

Is this patch OK? If it pass basic checking, please let me know, and I
shall try to make another related patch for KBuild (I can do nothing
related with Kbuild, before get confirmation for this patch).

Thanks.

On 8/15/14 17:01, Chen Gang wrote:
> 
> 
> On 8/15/14 6:14, Chen Gang wrote:
>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>
>>
>> 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.
>>
>>
> 
> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
> other members don't need think of.
> 
> By the way, for sh, it is almost the same case, except it contents the
> default value, for me, it is clear enough, so I skip sh architecture in
> this patch.
> 
> 
> Thanks
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-24  8:38         ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-24  8:38 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen

Hello Maintainers:

Is this patch OK? If it pass basic checking, please let me know, and I
shall try to make another related patch for KBuild (I can do nothing
related with Kbuild, before get confirmation for this patch).

Thanks.

On 8/15/14 17:01, Chen Gang wrote:
> 
> 
> On 8/15/14 6:14, Chen Gang wrote:
>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>
>>
>> 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.
>>
>>
> 
> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
> other members don't need think of.
> 
> By the way, for sh, it is almost the same case, except it contents the
> default value, for me, it is clear enough, so I skip sh architecture in
> this patch.
> 
> 
> Thanks
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-24  8:38         ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-24  8:38 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-m32r-ja, linux-mips, linux-m68k, a-jacquiot,
	catalin.marinas, linux, will.deacon, dhowells, jcmvbkbc, paulus,
	hpa, sparclinux, linux-hexagon, linux-s390, gxt, Jean Delvare,
	egtvedt, jonas, Liqin Chen, jesper.nilsson, linux-am33-list,
	linux, linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86,
	jejb, torvalds, linux-sh, mingo, Geert Uytterhoeven, Lennox Wu,
	msalter, mattst88, hskinnemoen, fenghua.yu, james.hogan,
	Arnd Bergmann, realmz6, heiko.carstens, jdike, linux-alpha,
	adi-buildroot-devel, cmetcalf, starvik, linux-m32r, ink,
	user-mode-linux-user, tglx, linux-metag, linux-arm-kernel, rth,
	chris, Michal Simek, tony.luck, linux-ia64, linux-parisc,
	linux-cris-kernel, vgupta, linux-kernel, rkuo,
	user-mode-linux-devel, Richard Weinberger, Martin Schwidefsky,
	linux390, akpm, yasutake.koichi, linuxppc-dev, deller

Hello Maintainers:

Is this patch OK? If it pass basic checking, please let me know, and I
shall try to make another related patch for KBuild (I can do nothing
related with Kbuild, before get confirmation for this patch).

Thanks.

On 8/15/14 17:01, Chen Gang wrote:
> 
> 
> On 8/15/14 6:14, Chen Gang wrote:
>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>
>>
>> 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.
>>
>>
> 
> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
> other members don't need think of.
> 
> By the way, for sh, it is almost the same case, except it contents the
> default value, for me, it is clear enough, so I skip sh architecture in
> this patch.
> 
> 
> Thanks
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
  2014-08-24  8:38         ` Chen Gang
  (?)
  (?)
@ 2014-08-25 12:26           ` Chen Gang
  -1 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-25 12:26 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Mart

Hello all:

It seems no any additional rejections for it. I guess, I need split the
'big' patch into pieces, and each send to its' related mailing list, so
let it not like a spam. And the schedule may like:

 - Firstly, send patch for "init/Kconfig" to add CPU_*_ENDIAN. If pass
   checking (hope it can be passed checking), then

 - Send each related patch to each related architectures which already
   knew their ENDIAN attributes in config time (24 patches, I guess),
   then

 - Make patch for Kbuild to support __BUILDING_TIME_BIG_ENDIAN__, and
   pass checking (hope I can finish), then

 - Finish left architectures which need __BUILDING_TIME_BIG_ENDIAN__
   (4 patches, I guess).

Welcome any ideas, suggestions, or completions. And if no additional
reply, I shall not send any additional information any more to avoid
spam to other members.


Thanks.

On 08/24/2014 04:38 PM, Chen Gang wrote:
> Hello Maintainers:
> 
> Is this patch OK? If it pass basic checking, please let me know, and I
> shall try to make another related patch for KBuild (I can do nothing
> related with Kbuild, before get confirmation for this patch).
> 
> Thanks.
> 
> On 8/15/14 17:01, Chen Gang wrote:
>>
>>
>> On 8/15/14 6:14, Chen Gang wrote:
>>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>>
>>>
>>> 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.
>>>
>>>
>>
>> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
>> other members don't need think of.
>>
>> By the way, for sh, it is almost the same case, except it contents the
>> default value, for me, it is clear enough, so I skip sh architecture in
>> this patch.
>>
>>
>> Thanks
>>
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-25 12:26           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-25 12:26 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Mart

Hello all:

It seems no any additional rejections for it. I guess, I need split the
'big' patch into pieces, and each send to its' related mailing list, so
let it not like a spam. And the schedule may like:

 - Firstly, send patch for "init/Kconfig" to add CPU_*_ENDIAN. If pass
   checking (hope it can be passed checking), then

 - Send each related patch to each related architectures which already
   knew their ENDIAN attributes in config time (24 patches, I guess),
   then

 - Make patch for Kbuild to support __BUILDING_TIME_BIG_ENDIAN__, and
   pass checking (hope I can finish), then

 - Finish left architectures which need __BUILDING_TIME_BIG_ENDIAN__
   (4 patches, I guess).

Welcome any ideas, suggestions, or completions. And if no additional
reply, I shall not send any additional information any more to avoid
spam to other members.


Thanks.

On 08/24/2014 04:38 PM, Chen Gang wrote:
> Hello Maintainers:
> 
> Is this patch OK? If it pass basic checking, please let me know, and I
> shall try to make another related patch for KBuild (I can do nothing
> related with Kbuild, before get confirmation for this patch).
> 
> Thanks.
> 
> On 8/15/14 17:01, Chen Gang wrote:
>>
>>
>> On 8/15/14 6:14, Chen Gang wrote:
>>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>>
>>>
>>> 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.
>>>
>>>
>>
>> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
>> other members don't need think of.
>>
>> By the way, for sh, it is almost the same case, except it contents the
>> default value, for me, it is clear enough, so I skip sh architecture in
>> this patch.
>>
>>
>> Thanks
>>
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-25 12:26           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-25 12:26 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Arnd Bergmann, akpm, rth, ink, mattst88, vgupta,
	Geert Uytterhoeven, Jean Delvare, linux, catalin.marinas,
	will.deacon, hskinnemoen, egtvedt, realmz6, msalter, a-jacquiot,
	starvik, jesper.nilsson, dhowells, rkuo, tony.luck, fenghua.yu,
	takata, james.hogan, Michal Simek, yasutake.koichi, jonas, jejb,
	deller, Benjamin Herrenschmidt, paulus, mpe, Martin Schwidefsky,
	heiko.carstens, Liqin Chen, Lennox Wu, David S. Miller, cmetcalf,
	jdike, Richard Weinberger, gxt, tglx, mingo, hpa, chris,
	jcmvbkbc, linux390, x86, linux-alpha, linux-kernel,
	linux-arm-kernel, adi-buildroot-devel, linux-c6x-dev,
	linux-cris-kernel, linux-hexagon, linux-ia64, linux-m32r,
	linux-m32r-ja, linux-m68k, linux-metag, linux-mips,
	linux-am33-list, linux, linux-parisc, linuxppc-dev, linux-s390,
	sparclinux, user-mode-linux-devel, user-mode-linux-user,
	linux-xtensa, linux-sh, torvalds

Hello all:

It seems no any additional rejections for it. I guess, I need split the
'big' patch into pieces, and each send to its' related mailing list, so
let it not like a spam. And the schedule may like:

 - Firstly, send patch for "init/Kconfig" to add CPU_*_ENDIAN. If pass
   checking (hope it can be passed checking), then

 - Send each related patch to each related architectures which already
   knew their ENDIAN attributes in config time (24 patches, I guess),
   then

 - Make patch for Kbuild to support __BUILDING_TIME_BIG_ENDIAN__, and
   pass checking (hope I can finish), then

 - Finish left architectures which need __BUILDING_TIME_BIG_ENDIAN__
   (4 patches, I guess).

Welcome any ideas, suggestions, or completions. And if no additional
reply, I shall not send any additional information any more to avoid
spam to other members.


Thanks.

On 08/24/2014 04:38 PM, Chen Gang wrote:
> Hello Maintainers:
> 
> Is this patch OK? If it pass basic checking, please let me know, and I
> shall try to make another related patch for KBuild (I can do nothing
> related with Kbuild, before get confirmation for this patch).
> 
> Thanks.
> 
> On 8/15/14 17:01, Chen Gang wrote:
>>
>>
>> On 8/15/14 6:14, Chen Gang wrote:
>>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>>
>>>
>>> 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.
>>>
>>>
>>
>> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
>> other members don't need think of.
>>
>> By the way, for sh, it is almost the same case, except it contents the
>> default value, for me, it is clear enough, so I skip sh architecture in
>> this patch.
>>
>>
>> Thanks
>>
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
@ 2014-08-25 12:26           ` Chen Gang
  0 siblings, 0 replies; 58+ messages in thread
From: Chen Gang @ 2014-08-25 12:26 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-m32r-ja, linux-mips, linux-m68k, a-jacquiot,
	catalin.marinas, linux, will.deacon, dhowells, jcmvbkbc, paulus,
	hpa, sparclinux, linux-hexagon, linux-s390, gxt, Jean Delvare,
	egtvedt, jonas, Liqin Chen, jesper.nilsson, linux-am33-list,
	linux, linux-c6x-dev, David S. Miller, linux-xtensa, takata, x86,
	jejb, torvalds, linux-sh, mingo, Geert Uytterhoeven, Lennox Wu,
	msalter, mattst88, hskinnemoen, fenghua.yu, james.hogan,
	Arnd Bergmann, realmz6, heiko.carstens, jdike, linux-alpha,
	adi-buildroot-devel, cmetcalf, starvik, linux-m32r, ink,
	user-mode-linux-user, tglx, linux-metag, linux-arm-kernel, rth,
	chris, Michal Simek, tony.luck, linux-ia64, linux-parisc,
	linux-cris-kernel, vgupta, linux-kernel, rkuo,
	user-mode-linux-devel, Richard Weinberger, Martin Schwidefsky,
	linux390, akpm, yasutake.koichi, linuxppc-dev, deller

Hello all:

It seems no any additional rejections for it. I guess, I need split the
'big' patch into pieces, and each send to its' related mailing list, so
let it not like a spam. And the schedule may like:

 - Firstly, send patch for "init/Kconfig" to add CPU_*_ENDIAN. If pass
   checking (hope it can be passed checking), then

 - Send each related patch to each related architectures which already
   knew their ENDIAN attributes in config time (24 patches, I guess),
   then

 - Make patch for Kbuild to support __BUILDING_TIME_BIG_ENDIAN__, and
   pass checking (hope I can finish), then

 - Finish left architectures which need __BUILDING_TIME_BIG_ENDIAN__
   (4 patches, I guess).

Welcome any ideas, suggestions, or completions. And if no additional
reply, I shall not send any additional information any more to avoid
spam to other members.


Thanks.

On 08/24/2014 04:38 PM, Chen Gang wrote:
> Hello Maintainers:
> 
> Is this patch OK? If it pass basic checking, please let me know, and I
> shall try to make another related patch for KBuild (I can do nothing
> related with Kbuild, before get confirmation for this patch).
> 
> Thanks.
> 
> On 8/15/14 17:01, Chen Gang wrote:
>>
>>
>> On 8/15/14 6:14, Chen Gang wrote:
>>> On 08/15/2014 02:04 AM, Ralf Baechle wrote:
>>>>
>>>
>>> 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.
>>>
>>>
>>
>> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let
>> other members don't need think of.
>>
>> By the way, for sh, it is almost the same case, except it contents the
>> default value, for me, it is clear enough, so I skip sh architecture in
>> this patch.
>>
>>
>> Thanks
>>
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2014-08-25 12:27 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14 16:54 [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly Chen Gang
2014-08-14 16:54 ` Chen Gang
2014-08-14 16:54 ` Chen Gang
2014-08-14 18:04 ` Ralf Baechle
2014-08-14 18:04   ` Ralf Baechle
2014-08-14 18:04   ` Ralf Baechle
2014-08-14 22:14   ` Chen Gang
2014-08-14 22:14     ` Chen Gang
2014-08-14 22:14     ` Chen Gang
2014-08-15  9:01     ` Chen Gang
2014-08-15  9:01       ` Chen Gang
2014-08-15  9:01       ` Chen Gang
2014-08-24  8:38       ` Chen Gang
2014-08-24  8:38         ` Chen Gang
2014-08-24  8:38         ` Chen Gang
2014-08-24  8:38         ` Chen Gang
2014-08-24  8:38         ` Chen Gang
2014-08-25 12:26         ` Chen Gang
2014-08-25 12:26           ` Chen Gang
2014-08-25 12:26           ` Chen Gang
2014-08-25 12:26           ` Chen Gang
2014-08-14 18:21 ` Vineet Gupta
2014-08-14 18:21   ` Vineet Gupta
2014-08-14 18:21   ` Vineet Gupta
2014-08-14 18:21   ` Vineet Gupta
2014-08-14 18:21   ` Vineet Gupta
2014-08-14 18:21   ` Vineet Gupta
2014-08-14 18:27   ` Lennox Wu
2014-08-14 18:27     ` Lennox Wu
2014-08-14 18:27     ` Lennox Wu
2014-08-14 22:22     ` Chen Gang
2014-08-14 22:22       ` Chen Gang
2014-08-14 22:22       ` Chen Gang
2014-08-14 22:22       ` Chen Gang
2014-08-14 23:12       ` Vineet Gupta
2014-08-14 23:12         ` Vineet Gupta
2014-08-14 23:12         ` Vineet Gupta
2014-08-14 23:12         ` Vineet Gupta
2014-08-14 23:12         ` Vineet Gupta
2014-08-14 23:12         ` Vineet Gupta
2014-08-15  1:29         ` Chen Gang
2014-08-15  1:29           ` Chen Gang
2014-08-15  1:29           ` Chen Gang
2014-08-15  1:29           ` Chen Gang
2014-08-15  1:29           ` Chen Gang
2014-08-15  1:47 ` Max Filippov
2014-08-15  1:47   ` Max Filippov
2014-08-15  1:47   ` Max Filippov
2014-08-15  1:47   ` Max Filippov
2014-08-15  1:52   ` Max Filippov
2014-08-15  1:52     ` Max Filippov
2014-08-15  1:52     ` Max Filippov
2014-08-15  1:52     ` Max Filippov
2014-08-15  2:06     ` Chen Gang
2014-08-15  2:06       ` Chen Gang
2014-08-15  2:06       ` Chen Gang
2014-08-15  2:06       ` Chen Gang
2014-08-15  2:06       ` Chen Gang

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.