From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly Date: Wed, 13 Aug 2014 16:16:32 +0800 Message-ID: <53EB1EE0.20002@gmail.com> References: <53EA99C3.90203@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Geert Uytterhoeven Cc: Arnd Bergmann , Andrew Morton , Jean Delvare , Russell King , Catalin Marinas , Will Deacon , Mark Salter , "a-jacquiot@ti.com" , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , "linux-arm-kernel@lists.infradead.org" , linux-c6x-dev@linux-c6x.org, "linux-ia64@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-Arch , linux-kbuild List-Id: linux-arch.vger.kernel.org On 8/13/14 16:03, Geert Uytterhoeven wrote: > CC kbuild > > On Wed, Aug 13, 2014 at 12:48 AM, Chen Gang wrote: >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index c49a775..0510a5d 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -199,6 +199,11 @@ config NEED_DMA_MAP_STATE >> config ARCH_SUPPORTS_UPROBES >> def_bool y >> >> +config CPU_LITTLE_ENDIAN >> + depends on !CPU_BIG_ENDIAN >> + def_bool y >> + >> + >> config ARCH_HAS_DMA_SET_COHERENT_MASK >> bool > > As this is a common symbol, and replicated for all affected architectures, > I'm wondering if we should have the "config CPU_LITTLE_ENDIAN" in > common Kconfig code instead, and make the individual architectures do a > "select CPU_LITTLE_ENDIAN"? > That sounds a good idea to me. > Also we could have "config CPU_BIG_ENDIAN", too, and error out > if none or both are selected (can Kconfig error out?). > It is a good idea to me, welcome any members ideas, especially Kbuild members' ideas, suggestions or completions. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com ([209.85.192.182]:61155 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752264AbaHMIL5 (ORCPT ); Wed, 13 Aug 2014 04:11:57 -0400 Message-ID: <53EB1EE0.20002@gmail.com> Date: Wed, 13 Aug 2014 16:16:32 +0800 From: Chen Gang MIME-Version: 1.0 Subject: Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly References: <53EA99C3.90203@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: Arnd Bergmann , Andrew Morton , Jean Delvare , Russell King , Catalin Marinas , Will Deacon , Mark Salter , "a-jacquiot@ti.com" , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , "linux-arm-kernel@lists.infradead.org" , linux-c6x-dev@linux-c6x.org, "linux-ia64@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-Arch , linux-kbuild Message-ID: <20140813081632.EvUOA4mWv4wVk203z0XYCTvKH6xXF3ojl18oholT26A@z> On 8/13/14 16:03, Geert Uytterhoeven wrote: > CC kbuild > > On Wed, Aug 13, 2014 at 12:48 AM, Chen Gang wrote: >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index c49a775..0510a5d 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -199,6 +199,11 @@ config NEED_DMA_MAP_STATE >> config ARCH_SUPPORTS_UPROBES >> def_bool y >> >> +config CPU_LITTLE_ENDIAN >> + depends on !CPU_BIG_ENDIAN >> + def_bool y >> + >> + >> config ARCH_HAS_DMA_SET_COHERENT_MASK >> bool > > As this is a common symbol, and replicated for all affected architectures, > I'm wondering if we should have the "config CPU_LITTLE_ENDIAN" in > common Kconfig code instead, and make the individual architectures do a > "select CPU_LITTLE_ENDIAN"? > That sounds a good idea to me. > Also we could have "config CPU_BIG_ENDIAN", too, and error out > if none or both are selected (can Kconfig error out?). > It is a good idea to me, welcome any members ideas, especially Kbuild members' ideas, suggestions or completions. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed