* [PATCH] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
@ 2014-08-11 21:18 Chen Gang
2014-08-11 22:53 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2014-08-11 21:18 UTC (permalink / raw)
To: linux-arm-kernel
x86, ia64, and arm(64) are little endian, and also another architectures
may be little endian (mips, sh, powerpc, and m32r) which already marked
CPU_LITTLE_ENDIAN explicitly.
Some drivers (e.g. some of "drivers/isdn/hisax") may only support little
endian (CPU_LITTLE_ENDIAN), and some drivers may only support big endian
(!CPU_LITTLE_ENDIAN).
So export all little endian architectures within kernel wide, so can let
Kconfig easier for the modules which only support little endian or only
big endian.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
arch/arm/Kconfig | 3 +++
arch/arm64/Kconfig | 3 +++
arch/ia64/Kconfig | 3 +++
arch/x86/Kconfig | 3 +++
4 files changed, 12 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c49a775..bfc2c65 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -199,6 +199,9 @@ config NEED_DMA_MAP_STATE
config ARCH_SUPPORTS_UPROBES
def_bool y
+config CPU_LITTLE_ENDIAN
+ def_bool y
+
config ARCH_HAS_DMA_SET_COHERENT_MASK
bool
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 62b4ae1..69b893e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -129,6 +129,9 @@ config KERNEL_MODE_NEON
config FIX_EARLYCON_MEM
def_bool y
+config CPU_LITTLE_ENDIAN
+ def_bool y
+
source "init/Kconfig"
source "kernel/Kconfig.freezer"
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 64aefb7..fa12d34 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -133,6 +133,9 @@ config AUDIT_ARCH
bool
default y
+config CPU_LITTLE_ENDIAN
+ def_bool y
+
menuconfig PARAVIRT_GUEST
bool "Paravirtualized guest support"
depends on BROKEN
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 541e7cc..a1b3568 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -270,6 +270,9 @@ config ARCH_SUPPORTS_UPROBES
config FIX_EARLYCON_MEM
def_bool y
+config CPU_LITTLE_ENDIAN
+ def_bool y
+
source "init/Kconfig"
source "kernel/Kconfig.freezer"
--
1.7.11.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
2014-08-11 21:18 [PATCH] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
@ 2014-08-11 22:53 ` Russell King - ARM Linux
2014-08-12 3:27 ` Chen Gang
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2014-08-11 22:53 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Aug 12, 2014 at 05:18:44AM +0800, Chen Gang wrote:
> x86, ia64, and arm(64) are little endian, and also another architectures
> may be little endian (mips, sh, powerpc, and m32r) which already marked
> CPU_LITTLE_ENDIAN explicitly.
This is incorrect. ARM can be either endian.
arch/arm/mm/Kconfig:
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN
help
Say Y if you plan on running a kernel in big-endian mode.
Note that your board must be properly built and your board
port must properly enable any big-endian related features
of your chipset/board/processor.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly
2014-08-11 22:53 ` Russell King - ARM Linux
@ 2014-08-12 3:27 ` Chen Gang
0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2014-08-12 3:27 UTC (permalink / raw)
To: linux-arm-kernel
On 8/12/14 6:53, Russell King - ARM Linux wrote:
> On Tue, Aug 12, 2014 at 05:18:44AM +0800, Chen Gang wrote:
>> x86, ia64, and arm(64) are little endian, and also another architectures
>> may be little endian (mips, sh, powerpc, and m32r) which already marked
>> CPU_LITTLE_ENDIAN explicitly.
>
> This is incorrect. ARM can be either endian.
>
> arch/arm/mm/Kconfig:
>
> config CPU_BIG_ENDIAN
> bool "Build big-endian kernel"
> depends on ARCH_SUPPORTS_BIG_ENDIAN
> help
> Say Y if you plan on running a kernel in big-endian mode.
> Note that your board must be properly built and your board
> port must properly enable any big-endian related features
> of your chipset/board/processor.
>
OK, thanks, I shall check all CPU_BIG_ENDIAN and send patch v2 for it.
And still welcome another ideas, suggestions or completions, especially
for another architectures.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-12 3:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 21:18 [PATCH] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Chen Gang
2014-08-11 22:53 ` Russell King - ARM Linux
2014-08-12 3:27 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).