From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <53ED6B40.8000409@gmail.com> Date: Fri, 15 Aug 2014 10:06:56 +0800 From: Chen Gang MIME-Version: 1.0 References: <53ECE9DD.80004@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly To: Max Filippov Cc: Arnd Bergmann , Andrew Morton , Richard Henderson , Ivan Kokshaysky , Matt Turner , "vgupta@synopsys.com" , Geert Uytterhoeven , Jean Delvare , Russell King , Catalin Marinas , Will Deacon , hskinnemoen@gmail.com, egtvedt@samfundet.no, realmz6@gmail.com, Mark Salter , Aurelien Jacquiot , starvik@axis.com, jesper.nilsson@axis.com, David Howells , rkuo@codeaurora.org, tony.luck@intel.com, fenghua.yu@intel.com, takata@linux-m32r.org, James Hogan , Michal Simek , Ralf Baechle , yasutake.koichi@jp.panasonic.com, Jonas Bonn , jejb@parisc-linux.org, deller@gmx.de, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , heiko.carstens@de.ibm.com, Liqin Chen , Lennox Wu , "David S. Miller" , Chris Metcalf , jdike@addtoit.com, Richard Weinberger , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Chris Zankel , linux390@de.ibm.com, x86@kernel.org, linux-alpha@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, Linux/MIPS Mailing List , linux-am33-list@redhat.com, linux@lists.openrisc.net, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, "linux-xtensa@linux-xtensa.org" , linux-kbuild List-ID: On 8/15/14 9:52, Max Filippov wrote: > On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov wrote: >> Hi Chen, >> >> On Thu, Aug 14, 2014 at 8:54 PM, 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. 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