From patchwork Tue Sep 1 07:39:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 512719 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B26AA140081 for ; Tue, 1 Sep 2015 17:40:42 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=RsJT22I4; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 866971A1E24 for ; Tue, 1 Sep 2015 17:40:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=RsJT22I4; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id D2EA41A0245 for ; Tue, 1 Sep 2015 17:39:24 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=RsJT22I4; dkim-atps=neutral Received: by pacwb2 with SMTP id wb2so713472pac.3 for ; Tue, 01 Sep 2015 00:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1M7KveEMkmwB34+6bHRrUYeT30QY+Trr9H3RXiGTkMg=; b=RsJT22I4Iu98v5zyHVu6iatoISb2ygL5XWSddn+ZV5w2iQz3N+Ute3rWNUb8/jyxVP IBZhX4yUwwM34n14mNeNZ97J4CsAR9GGCXta7RxLGgC4PcCHOG92OYOC8RtK/83O3qOg FWPgW5a/LHlTyMvheMkJZ+nb7pCh5eWuOKU/XGMAuK7xROa3Vvn9+IzOQJU4FAY9mtpG Go9p9wMGQKwEJJ/tY2EviAX2FiF9qrSbm5n05R/fcuZwBuI/6S2arvuj3HmgvOzStRH8 JcMS+YDos2G6jUa6oUAChX4v6V523WCGbhhP/iuX6AoyYH+6fznwsZw6faOkXDdTsf03 fPww== X-Received: by 10.68.99.69 with SMTP id eo5mr44782615pbb.167.1441093162518; Tue, 01 Sep 2015 00:39:22 -0700 (PDT) Received: from localhost (vm.fixme.name. [192.157.208.129]) by smtp.gmail.com with ESMTPSA id mi6sm17017914pdb.1.2015.09.01.00.39.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 00:39:21 -0700 (PDT) Date: Tue, 1 Sep 2015 15:39:01 +0800 From: Boqun Feng To: =?iso-8859-1?Q?C=E9dric?= Le Goater Subject: Re: [Question] Is little endian supported on all the platforms? Message-ID: <20150901073901.GA2060@fixme-laptop.cn.ibm.com> References: <20150831064453.GA1071@fixme-laptop.cn.ibm.com> <1441003958.2720.5.camel@kernel.crashing.org> <20150831075340.GB1071@fixme-laptop.cn.ibm.com> <1441019966.31779.1.camel@ellerman.id.au> <55E444C6.9070706@fr.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55E444C6.9070706@fr.ibm.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Geoff Levand , Scott Wood , Paul Mackerras , Alistair Popple , Olof Johansson , Anatolij Gustschin , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Aug 31, 2015 at 02:12:54PM +0200, Cédric Le Goater wrote: > > > or like this, to be consistent with the other *_CPU configs in Kconfig.cputype : > > --- a/arch/powerpc/platforms/ps3/Kconfig > +++ b/arch/powerpc/platforms/ps3/Kconfig > @@ -1,6 +1,6 @@ > config PPC_PS3 > bool "Sony PS3" > - depends on PPC64 && PPC_BOOK3S > + depends on PPC64 && PPC_BOOK3S && !CPU_LITTLE_ENDIAN > select PPC_CELL > select USB_OHCI_LITTLE_ENDIAN > select USB_OHCI_BIG_ENDIAN_MMIO > Hmm.. this works, however I would prefer to CPU_BIG_ENDIAN rather than !CPU_LITTLE_ENDIAN because CPU_BIG_ENDIAN is more straightforward. Does this look good? Regards, Boqun -------8< Subject: [PATCH] powerpc: Kconfig: remove BE-only platforms in LE kernel build Currently, little endian is only supported on powernv and pseries, however, Kconfig still allow us to include other platforms in a LE kernel, this may result in space wasting or even build errors if some BE-only platforms always assume they are built for a BE kernel. So just modify the Kconfigs in BE-only platforms to remove them from being built for a LE kernel. For 32bit only platforms, nothing needs to be done, because LE depends on PPC64. For 64bit supported platforms, add CPU_BIG_ENDIAN to dependencies explicitly [Suggested-by: Cédric Le Goater ]. Signed-off-by: Boqun Feng --- arch/powerpc/platforms/cell/Kconfig | 4 ++-- arch/powerpc/platforms/maple/Kconfig | 2 +- arch/powerpc/platforms/pasemi/Kconfig | 2 +- arch/powerpc/platforms/powermac/Kconfig | 2 +- arch/powerpc/platforms/ps3/Kconfig | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index b0ac177..429fc59 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig @@ -25,7 +25,7 @@ config PPC_CELL_NATIVE config PPC_IBM_CELL_BLADE bool "IBM Cell Blade" - depends on PPC64 && PPC_BOOK3S + depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN select PPC_CELL_NATIVE select PPC_OF_PLATFORM_PCI select PCI @@ -35,7 +35,7 @@ config PPC_IBM_CELL_BLADE config PPC_CELL_QPACE bool "IBM Cell - QPACE" - depends on PPC64 && PPC_BOOK3S + depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN select PPC_CELL_COMMON config AXON_MSI diff --git a/arch/powerpc/platforms/maple/Kconfig b/arch/powerpc/platforms/maple/Kconfig index 1ea621a..e359d0d 100644 --- a/arch/powerpc/platforms/maple/Kconfig +++ b/arch/powerpc/platforms/maple/Kconfig @@ -1,5 +1,5 @@ config PPC_MAPLE - depends on PPC64 && PPC_BOOK3S + depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN bool "Maple 970FX Evaluation Board" select PCI select MPIC diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig index a2aeb32..00d4b28 100644 --- a/arch/powerpc/platforms/pasemi/Kconfig +++ b/arch/powerpc/platforms/pasemi/Kconfig @@ -1,5 +1,5 @@ config PPC_PASEMI - depends on PPC64 && PPC_BOOK3S + depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN bool "PA Semi SoC-based platforms" default n select MPIC diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig index 607124b..43c6062 100644 --- a/arch/powerpc/platforms/powermac/Kconfig +++ b/arch/powerpc/platforms/powermac/Kconfig @@ -1,6 +1,6 @@ config PPC_PMAC bool "Apple PowerMac based machines" - depends on PPC_BOOK3S + depends on PPC_BOOK3S && CPU_BIG_ENDIAN select MPIC select PCI select PPC_INDIRECT_PCI if PPC32 diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 56f2740..b27f40f 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig @@ -1,6 +1,6 @@ config PPC_PS3 bool "Sony PS3" - depends on PPC64 && PPC_BOOK3S + depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN select PPC_CELL select USB_OHCI_LITTLE_ENDIAN select USB_OHCI_BIG_ENDIAN_MMIO