Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3166362pxb; Mon, 16 Nov 2020 07:27:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfisF8tGFaaeY5v6CQE5HfMT9okEXU6LLqQcSm45GL7+f3h3lNXezX4GZ6d7xVv0PXIWV6 X-Received: by 2002:a05:6402:31b6:: with SMTP id dj22mr16776175edb.348.1605540429070; Mon, 16 Nov 2020 07:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605540429; cv=none; d=google.com; s=arc-20160816; b=pyTZYKlCEQvfHXnupnrDKr/5Wv88rDjF9n4f/+jkY2d78vhDifN1da+ZCCsI1JjVq0 3SEZfKih69saovjMVAmYHi2rqvoChmtHbjwLGhVRvQehxYZwUuQEVULXE7dq714YVW3o tmDgr8KDOR58vaNb3ADjEustuCbsdaIRu6/olT1ewhk+Y3rHLU5zv47zJNjkEBRpVjj1 mZ3psJOOlbo5kCIAP9ftrVUX6wENOiy98yB9c5IJ8byXj6HHDi6lBriWgCnnBMhadXeO xJcAjeYLLunov7h71N2U8+pe5B1oSwUCtPB27mbRhaEcGiB7e3YG9n/TqE3eYcXHZMNG W0+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:user-agent:in-reply-to:references:subject:cc:to:from :message-id:date; bh=BjEjPLLrGI47u3xLOYfhdhjT4e1NlAfFk8Vc1kjPPBQ=; b=cMzgJ21mo0c4MGyyX6XHot4SJBqf3Fn6pXjDoHK9ydUg59w8W3Gp8iwUDwfn30mOd5 f+OlLSZzSp/if7RW+YNofIoEg8B3odIRDfmB8wBLNYhRdv0Tn8BINUmtx2HXPkfMN6xq yAIT8Oke25QyE02dOtYGIvdEt2x72yoQ2DHaBb0oYhj3FWXhoN7lAIj/B04aqnE0ZqZc 8xbleFCgi3hCEviLkAMErh893Gnxf0iKu/3DYz7KwU6Bew/CllzXrkbNLMZ8iV8GIM9r nZZFFnHkRMU1RvDGzfH91tOUEN80phTNVTJsc3ypl2yLeACW+6oh0/GD5bxWSFt1Rb2P h2FQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si11855550eja.517.2020.11.16.07.26.45; Mon, 16 Nov 2020 07:27:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730993AbgKPPXo convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 Nov 2020 10:23:44 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:15703 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgKPPXo (ORCPT ); Mon, 16 Nov 2020 10:23:44 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4CZXsN08X6z9twnc; Mon, 16 Nov 2020 16:23:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 8q6JWAeXMjiq; Mon, 16 Nov 2020 16:23:35 +0100 (CET) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 4CZXsM6Ljpz9v13s; Mon, 16 Nov 2020 16:23:35 +0100 (CET) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 544032561; Mon, 16 Nov 2020 16:26:30 +0100 (CET) Received: from 192.168.4.90 ([192.168.4.90]) by messagerie.c-s.fr (Horde Framework) with HTTP; Mon, 16 Nov 2020 16:26:30 +0100 Date: Mon, 16 Nov 2020 16:26:30 +0100 Message-ID: <20201116162630.Horde.ihSuzv-KmZ3hdBC3_dOsHA6@messagerie.c-s.fr> From: Christophe Leroy To: Michael Ellerman Cc: Segher Boessenkool , Nick Desaulniers , mihai.caraman@freescale.com, Nathan Chancellor , Linus Torvalds , Arnd Bergmann , Brian Cain , =?utf-8?b?RsSBbmctcnXDrCA=?= =?utf-8?b?U8Oybmc=?= , kernel test robot , kbuild-all@lists.01.org, clang-built-linux , LKML , Masahiro Yamada , linuxppc-dev Subject: Re: Error: invalid switch -me200 References: <202011131146.g8dPLQDD-lkp@intel.com> <20201113190824.GA1477315@ubuntu-m3-large-x86> <20201113200444.GA1496675@ubuntu-m3-large-x86> <20201114002037.GW2672@gate.crashing.org> <14e9ce2b-1a83-5353-44c7-b0709796c70e@csgroup.eu> <87h7pp4yzm.fsf@mpe.ellerman.id.au> In-Reply-To: <87h7pp4yzm.fsf@mpe.ellerman.id.au> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Michael Ellerman : > Christophe Leroy writes: >> Le 14/11/2020 à 01:20, Segher Boessenkool a écrit : >>> On Fri, Nov 13, 2020 at 12:14:18PM -0800, Nick Desaulniers wrote: >>>>>>> Error: invalid switch -me200 >>>>>>> Error: unrecognized option -me200 >>>>>> >>>>>> 251 cpu-as-$(CONFIG_E200) += -Wa,-me200 >>>>>> >>>>>> Are those all broken configs, or is Kconfig messed up such that >>>>>> randconfig can select these when it should not? >>>>> >>>>> Hmmm, looks like this flag does not exist in mainline binutils? There is >>>>> a thread in 2010 about this that Segher commented on: >>>>> >>>>> https://lore.kernel.org/linuxppc-dev/9859E645-954D-4D07-8003-FFCD2391AB6E@kernel.crashing.org/ >>>>> >>>>> Guess this config should be eliminated? >>> >>> The help text for this config options says that e200 is used in 55xx, >>> and there *is* an -me5500 GAS flag (which probably does this same >>> thing, too). But is any of this tested, or useful, or wanted? >>> >>> Maybe Christophe knows, cc:ed. >>> >> >> I don't have much clue on this. > > Me either. > >> But I see on wikipedia that e5500 is a 64 bits powerpc >> (https://en.wikipedia.org/wiki/PowerPC_e5500) >> >> What I see is that NXP seems to provide a GCC version that includes >> aditionnal cpu (e200z0 e200z2 >> e200z3 e200z4 e200z6 e200z7): >> >> valid arguments to '-mcpu=' are: 401 403 405 405fp 440 440fp 464 >> 464fp 476 476fp 505 601 602 603 >> 603e 604 604e 620 630 740 7400 7450 750 801 821 823 8540 8548 860 >> 970 G3 G4 G5 a2 cell e200z0 e200z2 >> e200z3 e200z4 e200z6 e200z7 e300c2 e300c3 e500mc e500mc64 e5500 >> e6500 ec603e native power3 power4 >> power5 power5+ power6 power6x power7 power8 powerpc powerpc64 >> powerpc64le rs64 titan " >> >> https://community.nxp.com/t5/MPC5xxx/GCC-generating-not-implemented-instructions/m-p/845049 >> >> Apparently based on binutils 2.28 >> >> https://www.nxp.com/docs/en/release-note/S32DS-POWER-v1-2-RN.pdf >> >> But that's not exactly -me200 though. >> >> Now, I can't see any defconfig that selects CONFIG_E200, so is that >> worth keeping it in the kernel >> at all ? > > There was a commit in 2014 that suggests it worked at least to some > extent then: > > 3477e71d5319 ("powerpc/booke: Restrict SPE exception handlers to > e200/e500 cores") Not sure, that patch seems to be focussed on the new e500mc > > > Presumably there was a non-upstream toolchain where it was supported? > > AFAICS the kernel builds OK with just the cpu-as modification removed: > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index a4d56f0a41d9..16b8336f91dd 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -248,7 +248,6 @@ KBUILD_CFLAGS += $(call > cc-option,-mno-string) > cpu-as-$(CONFIG_40x) += -Wa,-m405 > cpu-as-$(CONFIG_44x) += -Wa,-m440 > cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) > -cpu-as-$(CONFIG_E200) += -Wa,-me200 > cpu-as-$(CONFIG_E500) += -Wa,-me500 > > # When using '-many -mpower4' gas will first try and find a matching power4 > > > So that seems like the obvious fix for now. Or we could do diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index c194c4ae8bc7..a11cf9431e1e 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -67,6 +67,7 @@ config 44x select PHYS_64BIT config E200 + depends on $(cc-option,-me200) bool "Freescale e200" endchoice --- Christophe