From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly Date: Fri, 15 Aug 2014 10:06:56 +0800 Message-ID: <53ED6B40.8000409@gmail.com> References: <53ECE9DD.80004@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=h5EvHdt+8yp+8ser3AXFJOkyXGDS4RVPgKEPlkYBUnk=; b=rS5ZugBS5SXG4UwS6DxAWQVYjb9a3SVguC42GXiEoMrg3tBDzRJY7eT5bbHukJB3gU mbCI7TTxXqU6JrNGH4wwMWgeuvTmKVClB70iuOOcJrZa2YdpqM1mIDyqGCQnl5uA1Wzb wuFkM9QoysYgJeF1m14HGUkEl/Vk/vRQc6BNyERNlgslwjFG1XYKU5GNYBEwa7JUXg4H BNXN/euelb6znGOYgSUnWzSN93Hx5zDT6CBzVfoNimsxjvRpx0X6FGtC1tUcld5BFKcP jDabDG4mhZdMSd9fXdjKHKgHwBrj8p72PjFuMCk+V2PzSNqFIg12HR6CjUMF2rB6HLD7 AlyQ== In-Reply-To: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: List-subscribe: List-owner: List-post: List-archive: Content-Type: text/plain; charset="us-ascii" 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 15 Aug 2014 04:02:53 +0200 (CEST) Received: from mail-pa0-f43.google.com ([209.85.220.43]:41407 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6855142AbaHOCCsVXJjD (ORCPT ); Fri, 15 Aug 2014 04:02:48 +0200 Received: by mail-pa0-f43.google.com with SMTP id lf10so2678051pab.16 for ; Thu, 14 Aug 2014 19:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=h5EvHdt+8yp+8ser3AXFJOkyXGDS4RVPgKEPlkYBUnk=; b=rS5ZugBS5SXG4UwS6DxAWQVYjb9a3SVguC42GXiEoMrg3tBDzRJY7eT5bbHukJB3gU mbCI7TTxXqU6JrNGH4wwMWgeuvTmKVClB70iuOOcJrZa2YdpqM1mIDyqGCQnl5uA1Wzb wuFkM9QoysYgJeF1m14HGUkEl/Vk/vRQc6BNyERNlgslwjFG1XYKU5GNYBEwa7JUXg4H BNXN/euelb6znGOYgSUnWzSN93Hx5zDT6CBzVfoNimsxjvRpx0X6FGtC1tUcld5BFKcP jDabDG4mhZdMSd9fXdjKHKgHwBrj8p72PjFuMCk+V2PzSNqFIg12HR6CjUMF2rB6HLD7 AlyQ== X-Received: by 10.68.68.225 with SMTP id z1mr8209881pbt.110.1408068160696; Thu, 14 Aug 2014 19:02:40 -0700 (PDT) Received: from ShengShiZhuChengdeMacBook-Pro.local ([219.143.82.150]) by mx.google.com with ESMTPSA id ov4sm6603416pbc.86.2014.08.14.19.02.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Aug 2014 19:02:40 -0700 (PDT) Message-ID: <53ED6B40.8000409@gmail.com> Date: Fri, 15 Aug 2014 10:06:56 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 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 Subject: Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly References: <53ECE9DD.80004@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 42115 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: gang.chen.5i5j@gmail.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly Date: Fri, 15 Aug 2014 10:06:56 +0800 Message-ID: <53ED6B40.8000409@gmail.com> References: <53ECE9DD.80004@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 , To: Max Filippov Return-path: In-Reply-To: Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips List-subscribe: List-owner: List-post: List-archive: 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3BF2C1A018C for ; Fri, 15 Aug 2014 12:02:44 +1000 (EST) Received: by mail-pa0-f44.google.com with SMTP id eu11so2695254pac.3 for ; Thu, 14 Aug 2014 19:02:40 -0700 (PDT) Message-ID: <53ED6B40.8000409@gmail.com> Date: Fri, 15 Aug 2014 10:06:56 +0800 From: Chen Gang MIME-Version: 1.0 To: Max Filippov Subject: Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly References: <53ECE9DD.80004@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Cc: Linux/MIPS Mailing List , linux-s390@vger.kernel.org, Aurelien Jacquiot , Catalin Marinas , linux@lists.openrisc.net, Will Deacon , David Howells , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, Guan Xuetao , Jean Delvare , egtvedt@samfundet.no, Jonas Bonn , Liqin Chen , jesper.nilsson@axis.com, linux-am33-list@redhat.com, Russell King , linux-c6x-dev@linux-c6x.org, "David S. Miller" , "linux-xtensa@linux-xtensa.org" , takata@linux-m32r.org, x86@kernel.org, jejb@parisc-linux.org, Ingo Molnar , Geert Uytterhoeven , Lennox Wu , Mark Salter , Matt Turner , hskinnemoen@gmail.com, fenghua.yu@intel.com, James Hogan , Arnd Bergmann , realmz6@gmail.com, linux-kbuild , heiko.carstens@de.ibm.com, jdike@addtoit.com, linux-alpha@vger.kernel.org, adi-buildroot-devel@lists.sourceforge.net, Chris Metcalf , starvik@axis.com, linux-m68k@lists.linux-m68k.org, Ivan Kokshaysky , user-mode-linux-user@lists.sourceforge.net, Thomas Gleixner , linux-metag@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , Richard Henderson , Chris Zankel , Michal Simek , tony.luck@intel.com, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linux-cris-kernel@axis.com, "vgupta@synopsys.com" , "linux-kernel@vger.kernel.org" , Ralf Baechle , rkuo@codeaurora.org, user-mode-linux-devel@lists.sourceforge.net, Richard Weinberger , Martin Schwidefsky , linux390@de.ibm.com, Andrew Morton , yasutake.koichi@jp.panasonic.com, linuxppc-dev@lists.ozlabs.org, deller@gmx.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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