From patchwork Mon Jun 12 20:30:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 9782719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0487A602DA for ; Mon, 12 Jun 2017 20:32:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC7C528640 for ; Mon, 12 Jun 2017 20:32:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E10F9286B7; Mon, 12 Jun 2017 20:32:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38989284DC for ; Mon, 12 Jun 2017 20:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513AbdFLUcE (ORCPT ); Mon, 12 Jun 2017 16:32:04 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:46290 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbdFLUcD (ORCPT ); Mon, 12 Jun 2017 16:32:03 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5CKUOEW008988 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Jun 2017 20:30:27 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v5CKUM7S021168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Jun 2017 20:30:23 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v5CKUD54030109; Mon, 12 Jun 2017 20:30:13 GMT Received: from [10.135.190.130] (/10.135.190.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Jun 2017 13:30:13 -0700 Subject: Re: [PATCH 2/2] include: warn for inconsistent endian config definition To: kbuild test robot , Arnd Bergmann Cc: kbuild-all@01.org, ysato@users.sourceforge.jp, geert@linux-m68k.org, jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, jejb@parisc-linux.org, deller@gmx.de, davem@davemloft.net, viro@zeniv.linux.org.uk, mpe@ellerman.id.au, peterz@infradead.org, mingo@redhat.com, jcmvbkbc@gmail.com, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, monstr@monstr.eu References: <201706102219.7auwXKYx%fengguang.wu@intel.com> From: Babu Moger Organization: Oracle Corporation Message-ID: <002f7627-1ce5-eabb-967d-fe93a3660f03@oracle.com> Date: Mon, 12 Jun 2017 15:30:08 -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: <201706102219.7auwXKYx%fengguang.wu@intel.com> Content-Language: en-US X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, On 6/10/2017 9:06 AM, kbuild test robot wrote: > Hi Babu, > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.12-rc4 next-20170609] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Babu-Moger/Define-CPU_BIG_ENDIAN-or-warn-for-inconsistencies/20170610-200424 > config: microblaze-mmu_defconfig (attached as .config) > compiler: microblaze-linux-gcc (GCC) 6.2.0 > reproduce: > wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=microblaze > > All warnings (new ones prefixed by >>): > > In file included from arch/microblaze/include/uapi/asm/byteorder.h:7:0, > from include/asm-generic/bitops/le.h:5, > from include/asm-generic/bitops.h:34, > from arch/microblaze/include/asm/bitops.h:1, > from include/linux/bitops.h:36, > from include/linux/kernel.h:10, > from include/asm-generic/bug.h:15, > from arch/microblaze/include/asm/bug.h:1, > from include/linux/bug.h:4, > from include/linux/page-flags.h:9, > from kernel/bounds.c:9: >>> include/linux/byteorder/big_endian.h:7:2: warning: #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-Wcpp] > #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN > ^~~~~~~ > -- > In file included from arch/microblaze/include/uapi/asm/byteorder.h:7:0, > from include/asm-generic/bitops/le.h:5, > from include/asm-generic/bitops.h:34, > from arch/microblaze/include/asm/bitops.h:1, > from include/linux/bitops.h:36, > from include/linux/kernel.h:10, > from include/asm-generic/bug.h:15, > from arch/microblaze/include/asm/bug.h:1, > from include/linux/bug.h:4, > from include/linux/page-flags.h:9, > from kernel/bounds.c:9: >>> include/linux/byteorder/big_endian.h:7:2: warning: #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-Wcpp] > #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN > ^~~~~~~ > In file included from arch/microblaze/include/uapi/asm/byteorder.h:7:0, > from include/asm-generic/bitops/le.h:5, > from include/asm-generic/bitops.h:34, > from arch/microblaze/include/asm/bitops.h:1, > from include/linux/bitops.h:36, > from include/linux/kernel.h:10, > from include/linux/list.h:8, > from include/linux/rculist.h:9, > from include/linux/pid.h:4, > from include/linux/sched.h:13, > from arch/microblaze/kernel/asm-offsets.c:13: >>> include/linux/byteorder/big_endian.h:7:2: warning: #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-Wcpp] > #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN > ^~~~~~~ > :1326:2: warning: #warning syscall statx not implemented [-Wcpp] > > vim +7 include/linux/byteorder/big_endian.h > > 1 #ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H > 2 #define _LINUX_BYTEORDER_BIG_ENDIAN_H > 3 > 4 #include > 5 > 6 #ifndef CONFIG_CPU_BIG_ENDIAN > > 7 #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN > 8 #endif > 9 > 10 #include > 11 #endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation 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. --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ======================================= diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 85885a5..74aa5de 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -35,6 +35,22 @@ config MICROBLAZE select VIRT_TO_BUS select CPU_NO_EFFICIENT_FFS +# Endianness selection +choice + prompt "Endianness selection" + default CPU_BIG_ENDIAN + help + microblaze architectures can be configured for either little or + big endian formats. Be sure to select the appropriate mode. + +config CPU_BIG_ENDIAN + bool "Big endian" + +config CPU_LITTLE_ENDIAN + bool "Little endian" + +endchoice + config SWAP def_bool n