From patchwork Mon Jun 12 20:51:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9782729 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 E34F060352 for ; Mon, 12 Jun 2017 20:51:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA074284A6 for ; Mon, 12 Jun 2017 20:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE5BC284DB; Mon, 12 Jun 2017 20:51:27 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 40E8A284A6 for ; Mon, 12 Jun 2017 20:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752558AbdFLUv0 (ORCPT ); Mon, 12 Jun 2017 16:51:26 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:34110 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbdFLUvZ (ORCPT ); Mon, 12 Jun 2017 16:51:25 -0400 Received: by mail-ot0-f196.google.com with SMTP id a2so12011054oth.1; Mon, 12 Jun 2017 13:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/HFoQXkA6fG/CLG0hSQAB79V5qanKNODbBZh4hI0Ayc=; b=WJ+IFIfUXbBMCc5LscarUV62yNlP/2Ypp7xW6cEZK9x0pf5RKxe8tlvDs1TUKMkeVz 0YUo2vhHp4vAvVf2jlrLDWCB7zM8sWOCxBVxgUfBn7raUI3d6fDpgGEYRp+x67ygiUgM V2UPRG89vOBD/CZUCK/ZyLe/MRMWjf7lrbeqZgT/Jjt98Egq+01V95RtmyLiHehl2v5D k1hFZmDc0cv/M/OgoonNWNA2Qya+7iX/5QVYI02PVk+4mnciA0vL0RHeL4/7NVrnK5c8 qHFxdmIkbMaLUprIFwLxGDDR3tb7YhcYffQVC2vHNi1ctXoH7FdlpUFikMffD26lboGl zCLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/HFoQXkA6fG/CLG0hSQAB79V5qanKNODbBZh4hI0Ayc=; b=ZYdVg6GwuegOQ4ozYDwnGj4iyUM1CaetzjJ+cz/woJHobKqkA3xpQRlTPMKMRMvzKx HzTTjgafqR7ijElKyrixNelKt5h3gTQFHMq3995EgMQHnyAt8iqn8XUbyWDIbP/aA0wr 4SyZ2KwsrqR+eUgclWoJZpZcQWs9WNMxUpu2uOf8799SPrqNns4oW2fFkZlKC+p3QE3l cVYALHmtePuYv9vFvCoWpr/sW1BsGTHfx1kZHCFCU03MQ0BkJFMfGK1P7i0yBdcq7i5B RIn4/dYN3cDlk+mwIahqjtJgHxwtWwMS3Srm0dJ6TqVNjGX/hKx15mTYdtrnNcvife8H Gi9g== X-Gm-Message-State: AODbwcAGc2nD65m010ehQ/vy/Xi2lY/7oPXsfpzrh86pgiFAuYa4vRz5 M5xYoKG66wKggSb3UzdV7S1H0ZTyNQ== X-Received: by 10.157.17.219 with SMTP id y27mr32311106oty.137.1497300684282; Mon, 12 Jun 2017 13:51:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.51.139 with HTTP; Mon, 12 Jun 2017 13:51:23 -0700 (PDT) In-Reply-To: <002f7627-1ce5-eabb-967d-fe93a3660f03@oracle.com> References: <201706102219.7auwXKYx%fengguang.wu@intel.com> <002f7627-1ce5-eabb-967d-fe93a3660f03@oracle.com> From: Arnd Bergmann Date: Mon, 12 Jun 2017 22:51:23 +0200 X-Google-Sender-Auth: U8FK6cNSPBHuLgRJn7e9OzzpTz8 Message-ID: Subject: Re: [PATCH 2/2] include: warn for inconsistent endian config definition To: Babu Moger 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 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 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: 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. 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 --- 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/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))