Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2875079pxb; Sun, 15 Nov 2020 22:09:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJymOgxkGIzuZL7GLwk3pPIbk1Ibzct7GwhWm5zz/X7mhZypsZIR1nK3s2AbjqchQs0F8NHc X-Received: by 2002:a50:e443:: with SMTP id e3mr14645667edm.160.1605506948442; Sun, 15 Nov 2020 22:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605506948; cv=none; d=google.com; s=arc-20160816; b=GiabMTaE45N1BWC2JWv7fwrtWtSY6LCV0udhD0b+4CIgDOMWUz9xNQcEJDDVAivTT4 xRrZi+pYmMpb8Q8eULvIzHl84N8HX4TYA9xioj6J/OePwWRVUkNWbNEV6SAXJVsmo+du M8BO6p2BS3vApnB8glgKaoz/roGroVclJTeq+V7z4V/e7/BLKg7gjDHaqoXT11LDMwjS fEbRhc35tzt8zDIGu6kJkx6JpWgn+WLfdT8y2jjdZyFXY/q+OJPuxiWbm6vaF3bzk3GF ElxnaIprgbIErcRZR9ueOMsrTr2vQ6qx1Mi34To+fpGc7DrVerlpQU+WfG0e0se8LeTX bl5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=ch299mk90KmXSAg70K0CKihxvg+MpWTVqz982X09CgQ=; b=hEmPSNlt92u9wcohkGqyONU38/7Oym6oGhZW99gVOwQHPpJAeH/qtG1ywKBbTwbKXv fKpI56mD1RAt0l9sEXHbcLbl/2mE+B+cWRT55gm957w3oJyrYnUrjMIfpP9ySc4NZCph qF49J0eEvjePInv7e02u/KI79CGHoijSe0NVaixVa1aycHKiwbbcv1YcOUSOGfCyTJKN xfo2ane2+N64cwAyIaP1WeYVRPfR6w1CLDpI7jgZTT3QS/LM1Jeals6rfJ+b+8sKi0Zv fBwyH0LLnurHsz+zbInNvo1ibxd+g6o54v7IRpEXfY8JVH0HKY1+KeHo7BxbZPb/KEoy X2DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=DuqXwDq6; 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 f15si8889314edj.239.2020.11.15.22.08.46; Sun, 15 Nov 2020 22:09:08 -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; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=DuqXwDq6; 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 S1726146AbgKPGGb (ORCPT + 99 others); Mon, 16 Nov 2020 01:06:31 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:49967 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgKPGGa (ORCPT ); Mon, 16 Nov 2020 01:06:30 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4CZJVT5pSnz9sPB; Mon, 16 Nov 2020 17:06:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1605506788; bh=vqYCYo4MARa/47/zGrLgKczDlUHji65lqYdbUx/3osI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DuqXwDq6U0b7naSqRQmRagUgb6qDI0kHN9U8xiS4ATTzm5VNnNhY2Jlay9CRTF8eU kR5dblk1m7rLD2GaP88/AUsPePKENcZdk/XyIubpEcyY5SN68siZadygmgHKbAaxk5 hC8Mclnk1XiykNhfenWjZ0XGPbNjzce56uhhXfInzv8vkb7BtuPRZf0/lzwO2blwEY tCa9rRt3d/PCw0fi3QDwn1BImmPAs24JeAHRBOfHObYvfcyER2eE6yp9U04EHphPx3 GCFKl8UGBNPFzBEnRtBYNPNhbzvOcj5boVd8IwGT51vnSOOTqhTKfR3YwJ5L/SgcU+ r4i73rYuMbxMQ== From: Michael Ellerman To: Christophe Leroy , Segher Boessenkool , Nick Desaulniers , mihai.caraman@freescale.com Cc: Nathan Chancellor , Linus Torvalds , Arnd Bergmann , Brian Cain , =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , kernel test robot , kbuild-all@lists.01.org, clang-built-linux , LKML , Masahiro Yamada , linuxppc-dev Subject: Re: Error: invalid switch -me200 In-Reply-To: <14e9ce2b-1a83-5353-44c7-b0709796c70e@csgroup.eu> 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> Date: Mon, 16 Nov 2020 17:06:21 +1100 Message-ID: <87h7pp4yzm.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > Le 14/11/2020 =C3=A0 01:20, Segher Boessenkool a =C3=A9crit=C2=A0: >> 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) +=3D -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-FFCD2391A= B6E@kernel.crashing.org/ >>>> >>>> Guess this config should be eliminated? >>=20 >> 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? >>=20 >> Maybe Christophe knows, cc:ed. >>=20 > > I don't have much clue on this. Me either. > But I see on wikipedia that e5500 is a 64 bits powerpc (https://en.wikipe= dia.org/wiki/PowerPC_e5500) > > What I see is that NXP seems to provide a GCC version that includes aditi= onnal cpu (e200z0 e200z2=20 > e200z3 e200z4 e200z6 e200z7): > > valid arguments to '-mcpu=3D' are: 401 403 405 405fp 440 440fp 464 464fp = 476 476fp 505 601 602 603=20 > 603e 604 604e 620 630 740 7400 7450 750 801 821 823 8540 8548 860 970 G3 = G4 G5 a2 cell e200z0 e200z2=20 > e200z3 e200z4 e200z6 e200z7 e300c2 e300c3 e500mc e500mc64 e5500 e6500 ec6= 03e native power3 power4=20 > power5 power5+ power6 power6x power7 power8 powerpc powerpc64 powerpc64le= rs64 titan " > > https://community.nxp.com/t5/MPC5xxx/GCC-generating-not-implemented-instr= uctions/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=20 > 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/e50= 0 cores") 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 +=3D $(call cc-option,-mno-= string) cpu-as-$(CONFIG_40x) +=3D -Wa,-m405 cpu-as-$(CONFIG_44x) +=3D -Wa,-m440 cpu-as-$(CONFIG_ALTIVEC) +=3D $(call as-option,-Wa$(comma)-maltivec) -cpu-as-$(CONFIG_E200) +=3D -Wa,-me200 cpu-as-$(CONFIG_E500) +=3D -Wa,-me500 # When using '-many -mpower4' gas will first try and find a matching power4 So that seems like the obvious fix for now. I tried booting the resulting kernel in qemu, but I get: $ qemu-system-ppc -M none -cpu e200 -kernel build\~/vmlinux Error: Trying to register SPR 574 (23e) twice ! Which is not related AFAIK and indicates the qemu support is broken. Unless we hear from someone that they're using mainline on an e200 then it seems like it's a candidate for removal. cheers