Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753115AbdFLV0Y (ORCPT ); Mon, 12 Jun 2017 17:26:24 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:40450 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbdFLV0W (ORCPT ); Mon, 12 Jun 2017 17:26:22 -0400 Subject: Re: [PATCH 2/2] include: warn for inconsistent endian config definition To: Arnd Bergmann Cc: kbuild test robot , kbuild-all@01.org, Yoshinori Sato , Geert Uytterhoeven , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , David Miller , Al Viro , Michael Ellerman , Peter Zijlstra , Ingo Molnar , Max Filippov , Linux Kernel Mailing List , "moderated list:H8/300 ARCHITECTURE" , linux-m68k@vger.kernel.org, openrisc@lists.librecores.org, Parisc List , sparclinux , Michal Simek References: <201706102219.7auwXKYx%fengguang.wu@intel.com> <002f7627-1ce5-eabb-967d-fe93a3660f03@oracle.com> From: Babu Moger Organization: Oracle Corporation Message-ID: Date: Mon, 12 Jun 2017 16:24:54 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1419 Lines: 37 On 6/12/2017 3:51 PM, Arnd Bergmann wrote: > On Mon, Jun 12, 2017 at 10:30 PM, Babu Moger wrote: >> Looks like microblaze can be configured to either little or big endian >> formats. How about >> adding a choice statement to address this. >> Here is my proposed patch. > Hi Babu, > > This part looks fine, but I think we also need this one: > > diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile > index 740f2b82a182..1f6c486826a0 100644 > --- a/arch/microblaze/Makefile > +++ b/arch/microblaze/Makefile > @@ -35,6 +35,8 @@ endif > CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div > CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift > CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare > +CPUFLAGS-$(CONFIG_BIG_ENDIAN) += -mbig-endian > +CPUFLAGS-$(CONFIG_LITTLE_ENDIAN) += -mlittle-endian > > CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) > > > That way, we don't have to guess what the toolchain does, but rather > tell it to do whatever is configured, like we do for most other architectures. Ok. Thanks. Arnd. Will update and resend the series. > > Unfortunately we can't do the same thing on xtensa, as that no longer > supports the -mbig-endian/-mbig-endian flags in any recent gcc version > (a long time ago it had them, but they were removed along with many other > options). > > Arnd