From mboxrd@z Thu Jan 1 00:00:00 1970 From: Babu Moger Subject: Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN) Date: Thu, 25 May 2017 15:22:13 -0500 Message-ID: <0b20ab53-a154-0b57-e842-4636b6048e40@oracle.com> References: <8ddc7276-6296-2284-51d3-01093ccbeccb@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: sparclinux-owner@vger.kernel.org To: Arnd Bergmann Cc: Geert Uytterhoeven , "David S. Miller" , Peter Zijlstra , Ingo Molnar , sparclinux , "linux-kernel@vger.kernel.org" , Linux-Arch , "devicetree@vger.kernel.org" , "linux-serial@vger.kernel.org" List-Id: linux-arch.vger.kernel.org On 5/25/2017 3:09 PM, Arnd Bergmann wrote: > On Thu, May 25, 2017 at 4:51 PM, Babu Moger wrote: >> On 5/24/2017 5:18 AM, Arnd Bergmann wrote: >>>> I guess the time is ripe for adding (both) symbols to all architectures? >>> Good idea. I think we can do most of this by adding a few lines to >>> arch/Kconfig: >>> >>> config CPU_BIG_ENDIAN >>> bool >>> >>> config CPU_LITTLE_ENDIAN >>> def_bool !CPU_BIG_ENDIAN >>> >>> This way, we only need to add 'select CPU_BIG_ENDIAN' to the >>> architectures that are always big-endian, and we don't need to >>> change anything for the ones that have a single 'CPU_BIG_ENDIAN' >>> option. >>> >>> The three architectures that have a 'choice' statement (mips, ppc and >>> sh) will have to convert, and m32r will have to replace the >> >> what to you mean by "(mips, ppc andsh) will have to convert"? Do you expect >> any changes here? >> > Kconfig does not allow you to have the same symbol as both a regular > 'bool' and also 'bool within choice', so those three have to replace the > choice with a user-visible 'config CPU_BIG_ENDIAN' option like the > other ones have. Ok. I will address it in my next version. Thanks > > I also notice that for arch/s390/Kconfig you now have both the > 'select CPU_BIG_ENDIAN' and the 'config CPU_BIG_ENDIAN > def_bool y', I'd remove the second one in the same patch. Sure. Will correct it. > Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:50744 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163145AbdEYUW7 (ORCPT ); Thu, 25 May 2017 16:22:59 -0400 Subject: Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN) References: <8ddc7276-6296-2284-51d3-01093ccbeccb@oracle.com> From: Babu Moger Message-ID: <0b20ab53-a154-0b57-e842-4636b6048e40@oracle.com> Date: Thu, 25 May 2017 15:22:13 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-arch-owner@vger.kernel.org List-ID: To: Arnd Bergmann Cc: Geert Uytterhoeven , "David S. Miller" , Peter Zijlstra , Ingo Molnar , sparclinux , "linux-kernel@vger.kernel.org" , Linux-Arch , "devicetree@vger.kernel.org" , "linux-serial@vger.kernel.org" Message-ID: <20170525202213.l8O2DU2f8wTB-_3Ylqrr30YxxFd3k-eQM_4cC_yZbKA@z> On 5/25/2017 3:09 PM, Arnd Bergmann wrote: > On Thu, May 25, 2017 at 4:51 PM, Babu Moger wrote: >> On 5/24/2017 5:18 AM, Arnd Bergmann wrote: >>>> I guess the time is ripe for adding (both) symbols to all architectures? >>> Good idea. I think we can do most of this by adding a few lines to >>> arch/Kconfig: >>> >>> config CPU_BIG_ENDIAN >>> bool >>> >>> config CPU_LITTLE_ENDIAN >>> def_bool !CPU_BIG_ENDIAN >>> >>> This way, we only need to add 'select CPU_BIG_ENDIAN' to the >>> architectures that are always big-endian, and we don't need to >>> change anything for the ones that have a single 'CPU_BIG_ENDIAN' >>> option. >>> >>> The three architectures that have a 'choice' statement (mips, ppc and >>> sh) will have to convert, and m32r will have to replace the >> >> what to you mean by "(mips, ppc andsh) will have to convert"? Do you expect >> any changes here? >> > Kconfig does not allow you to have the same symbol as both a regular > 'bool' and also 'bool within choice', so those three have to replace the > choice with a user-visible 'config CPU_BIG_ENDIAN' option like the > other ones have. Ok. I will address it in my next version. Thanks > > I also notice that for arch/s390/Kconfig you now have both the > 'select CPU_BIG_ENDIAN' and the 'config CPU_BIG_ENDIAN > def_bool y', I'd remove the second one in the same patch. Sure. Will correct it. > Arnd