From patchwork Sat Oct 22 07:26:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7524 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1105788wrr; Sat, 22 Oct 2022 01:36:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GBS38tLyyJif88uVBFHqwN/WY3DX6VT6OhWULOUnGNNGTQ0QualGy7at5hRTnmOeN4TQF X-Received: by 2002:aa7:8607:0:b0:53b:13b5:2b6a with SMTP id p7-20020aa78607000000b0053b13b52b6amr23571723pfn.52.1666427771412; Sat, 22 Oct 2022 01:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427771; cv=none; d=google.com; s=arc-20160816; b=dKhgvXCi4UUj1lNN2beHFqVi6y8s7YlntceQuwK20XeAi78OSR8nFE+XVly6xfrzOz aYp9GgrilHS8PW88RwPPrDIESeHr2KDimqxz+0XxRjuFes+oqnmxAhQnqsX9wbKzA6wV mTNeJVTBTlbJbpWtDhAYn/Ir99HjOhzQLB3O+yiRVb+dzgCx6Mo3KBZgKQpCaCjm2uik VjKa1zumN5ub1bwcEx2Upe7/Z+gvzW4oKOwa8OfyfRxHgsYB/Hf8xiZYHCNTJRF6el7C ml1v/MOeJE6iy98vS4nNciEHKCofpbArK7BPyTXbIvh/fAHBr+cQrWN21idu+jzhOjR/ TnpA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mfAeNG5KHBlKC1EHx324bq6BZK3h77TpCxl98xEnzC8=; b=IyQA1VYc2EgvEjn8OQzd7KfCMePDtPoDQIxTxybRjlpUsHI2ruLUyfrOOtqVJ5nPNB yvVUVSqF416LuhbliXmq7H0Mlj2BojLPRnt47/8mMSJJGEivhqw6UWTIiJCL++jxcsYd J2U55EFNERDFkCM1G1kPj5AdVqJYKobQFjeTmfsWeqplLWlPQFr61VXF/ZqcrEPARRSQ 1a06t+X9LORzkcENWdI3kCKO2ftj6fQfXwOt+++ZmaQysXeu0VJFBXa0drSScwmT96nB ka1d/Huvnb3ScGqe6QT+CTkKBHxmZzCh06u4ynM1d2WemXnuOwct5zqVPB7mlD3UtUzs y3MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eo8kbrhA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a637f44000000b0046b3dce8455si20719379pgn.14.2022.10.22.01.35.54; Sat, 22 Oct 2022 01:36:11 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eo8kbrhA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbiJVIWR (ORCPT + 99 others); Sat, 22 Oct 2022 04:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233639AbiJVIUa (ORCPT ); Sat, 22 Oct 2022 04:20:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DE402DE447; Sat, 22 Oct 2022 00:58:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9E20CB82E28; Sat, 22 Oct 2022 07:57:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E50E1C433D6; Sat, 22 Oct 2022 07:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425435; bh=n+52xSQrxTm+UqR0b2GceeHoHH/Do0/baJ2D045InPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eo8kbrhAtbqI/ekNwWcaLDZ4LY5LwvRY7u/VwUAhM4/T+yezBkqNjD442mRDkJKie GC5Ck8gGVw/o3KDApq1SaGbIs9avteB+uWJyBuFWAo3y/FwDLuEtf5LoAgbKFsk8Em l0PMOhTyoRD7gtSvuuvnykz/qAX9K9kwp3TfOJ+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Piggin , Segher Boessenkool , Michael Ellerman , Sasha Levin Subject: [PATCH 5.19 501/717] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 Date: Sat, 22 Oct 2022 09:26:20 +0200 Message-Id: <20221022072520.422189997@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376167108309953?= X-GMAIL-MSGID: =?utf-8?q?1747376167108309953?= From: Nicholas Piggin [ Upstream commit 58ec7f06b74e0d6e76c4110afce367c8b5f0837d ] Big-endian GENERIC_CPU supports 970, but builds with -mcpu=power5. POWER5 is ISA v2.02 whereas 970 is v2.01 plus Altivec. 2.02 added the popcntb instruction which a compiler might use. Use -mcpu=power4. Fixes: 471d7ff8b51b ("powerpc/64s: Remove POWER4 support") Signed-off-by: Nicholas Piggin Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220921014103.587954-1-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index d54e1fe03551..dbeba3e209c0 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -152,7 +152,7 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8 CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8) else CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5)) -CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4) +CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4 endif else ifdef CONFIG_PPC_BOOK3E_64 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64