Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3368162imw; Mon, 11 Jul 2022 07:23:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vl8vU15ntQj9+0vqe2dxtLUDy+L/Y4FCPsSDTDY2xP8ViFXMd45wKOF35HWcS7utnY8y06 X-Received: by 2002:a17:906:b782:b0:726:f979:7adb with SMTP id dt2-20020a170906b78200b00726f9797adbmr18615130ejb.498.1657549397301; Mon, 11 Jul 2022 07:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657549397; cv=none; d=google.com; s=arc-20160816; b=nyJAxaj+S5HWistdXKUiuJfJrusZhUxcAacYSjUZ2gHPY52UkZJr4eUcKoCZ5QnsvH AXvrYWlznfAp+fhiXv6l6UGj59QDDilGTXj+MH0+VP4aNspHi9aIUdoYMDpYPOTOoHKY ksoQAAy6fetaP0iMTFBLktwSB0TfimaLfiIz3hFh6AahV/8K88QLS8hkpBP9JXn2mHZW Nx1KbHuSuZ9LCbA/u/opLwm20AYfWaxsQqmjXl4TEV1FCZHpt5XPcK8SYP+BLG2fXr9/ WPxIpLOvw7Q4xJHkvqjBOJ9zcoEHQ3/eRYGcM8r101E5N5gh8J+EHpgUaw3zdB3dxQ23 6OGg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=REpiSxtqeG5+jwC1KeH/tUuHmWiClhG7xzTbS1OF69o=; b=lzclKc/aQfPCREREBcwClltcVdn1xY/5DaRmX9PPYpvg44E5N6+Tuq03JM8AEQHdbW CH9nuhqk/1WxyB1+Vd3XD52cPi2XE5oEoS1aIyVAQPz+NYo1hvLucLTKcihisDh3Qb+a AXiaTgxX9bmxV2dgxoxtuU22ubpQPMmcsZoEv8D84rn76n8tQayq6zWUoNxPAHrMxtKa RSb4uUsQNwT64R8y8uvYzDWjljoSP0tIzRIYHfaKpYxlcHW04XvqyN0gCJviGJlCz7H3 jUur+lXocoZX+dw4RIigxi3O/xYEjtSKyegrNl2XHCTcaBSxorvAJh+b1HJEQ9ZIzV08 MrMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs31-20020a1709073e9f00b0072b3a3a0e85si9740394ejc.790.2022.07.11.07.22.52; Mon, 11 Jul 2022 07:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229585AbiGKOUr (ORCPT + 99 others); Mon, 11 Jul 2022 10:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbiGKOUX (ORCPT ); Mon, 11 Jul 2022 10:20:23 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C073643DA for ; Mon, 11 Jul 2022 07:20:22 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4LhQyW0f1Vz9syl; Mon, 11 Jul 2022 16:20:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJx6Rx1wImn7; Mon, 11 Jul 2022 16:20:19 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4LhQyT355Zz9sWf; Mon, 11 Jul 2022 16:20:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 501358B767; Mon, 11 Jul 2022 16:20:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 3ukEkA7wFWIv; Mon, 11 Jul 2022 16:20:17 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 26F068B763; Mon, 11 Jul 2022 16:20:17 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 26BEKDuN1585545 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 11 Jul 2022 16:20:13 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 26BEKAD71585544; Mon, 11 Jul 2022 16:20:10 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v1 5/5] powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') Date: Mon, 11 Jul 2022 16:19:33 +0200 Message-Id: <77255a5a957967723b84d0356d9e5fb21569f4e8.1657549153.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.36.1 In-Reply-To: <8abab4888da69ff78b73a56f64d9678a7bf684e9.1657549153.git.christophe.leroy@csgroup.eu> References: <8abab4888da69ff78b73a56f64d9678a7bf684e9.1657549153.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1657549171; l=3308; s=20211009; h=from:subject:message-id; bh=F08XQ41qHsNwyww07By3SsSsHc2HqIPTLBMOFGw4Qjs=; b=2QNkvFUofsJhheU7la9v8qhfdENheBl+IvRAYTIydDlOEosdhOAl1GWf1opNt33ZEAf5dnI3EKp+ 65C6ptEsD/fa2CrTbwJuyIF6odfjJuqjPlAvxqg5q99oTZjBUtcE X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With GCC 12, corenet64_smp_defconfig leads to the following build errors: CC arch/powerpc/kernel/irq.o {standard input}: Assembler messages: {standard input}:3616: Error: unrecognized opcode: `wrteei' {standard input}:5689: Error: unrecognized opcode: `wrteei' CC arch/powerpc/kernel/pmc.o {standard input}: Assembler messages: {standard input}:42: Error: unrecognized opcode: `mfpmr' {standard input}:53: Error: unrecognized opcode: `mtpmr' CC arch/powerpc/kernel/io.o {standard input}: Assembler messages: {standard input}:376: Error: unrecognized opcode: `mbar' ... CC arch/powerpc/mm/nohash/book3e_hugetlbpage.o {standard input}: Assembler messages: {standard input}:291: Error: unrecognized opcode: `tlbsx' {standard input}:482: Error: unrecognized opcode: `tlbwe' {standard input}:608: Error: unrecognized opcode: `lbarx' {standard input}:608: Error: unrecognized opcode: `stbcx.' -mpcu=powerpc64 cannot be used anymore for book3e, it must be a booke CPU. But then we get: CC arch/powerpc/lib/xor_vmx.o cc1: error: AltiVec not supported in this target Altivec is not supported with -mcpu=e5500 so don't allow selection of altivec when e5500 is selected. Signed-off-by: Christophe Leroy --- arch/powerpc/Makefile | 8 +------- arch/powerpc/platforms/Kconfig.cputype | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index d54e1fe03551..02742facf895 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -168,13 +168,7 @@ endif CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) -# Altivec option not allowed with e500mc64 in GCC. -ifdef CONFIG_ALTIVEC -E5500_CPU := -mcpu=powerpc64 -else -E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) -endif -CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU) +CFLAGS-$(CONFIG_E5500_CPU) += $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64) CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU)) asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 3cc8452b8660..5185d942b455 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -126,12 +126,12 @@ choice config GENERIC_CPU bool "Generic (POWER4 and above)" - depends on PPC64 && !CPU_LITTLE_ENDIAN - select PPC_64S_HASH_MMU if PPC_BOOK3S_64 + depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN + select PPC_64S_HASH_MMU config GENERIC_CPU bool "Generic (POWER8 and above)" - depends on PPC64 && CPU_LITTLE_ENDIAN + depends on PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN select ARCH_HAS_FAST_MULTIPLIER select PPC_64S_HASH_MMU @@ -358,7 +358,7 @@ config PHYS_64BIT config ALTIVEC bool "AltiVec Support" - depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 || (PPC_E500MC && PPC64) + depends on PPC_BOOK3S || (PPC_E500MC && PPC64 && !E5500_CPU) select PPC_FPU help This option enables kernel support for the Altivec extensions to the -- 2.36.1