From patchwork Wed Oct 19 08:31:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5505 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp336391wrs; Wed, 19 Oct 2022 06:46:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fAorQANwLfAPMdVzPAL/a2kcO5P7ZhJPlPGRIP8R51HRGb6CZDtBjo/hX8+oGQnlgRRZE X-Received: by 2002:a17:903:234c:b0:17f:a253:b538 with SMTP id c12-20020a170903234c00b0017fa253b538mr8688512plh.110.1666187218431; Wed, 19 Oct 2022 06:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666187218; cv=none; d=google.com; s=arc-20160816; b=NUGA4ZTTGCpeVfmWVrP9PvBmKJCvKny8nimCYBOPbD9Jod8CphlizmURx0giWEKO9f 1F1Z3WjtdSw889naRND1xBHSdGObxxVeYcZGMk7RCmxaxWh3chJ4E64yAUs9c+FBfHMj AjKJlCMXhLar6yehQawf9OU1fzmNeB8pz7+i2chzHfb4wyJqC98mao0JaUQTRW18+nJw Pa3ggTHPiDU51hsSO4tQXUs2MShHgcst0YlUxBo6cUtzyntW1mSEKqTvW2ti1qoju5Ji ewt5Iy9eT4EhxjpFYuC3zBDual66jexMdy+z4xQ9gBPCRwlwjPdS3JLxlJcqZZqKJQ+u 0aJg== 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=p6mkAPcO2lZb6OMw3n2avklTg9yfGTadgPSGUQ8EQAk=; b=yaX8WAWdH3AoQGs+jCcWSOWQxNanXfRa5gkRJY2UKDLkU/zvyrLIcE2lYLS1B8dkI8 ytP1mSJ6+qmmv8XB7FFPZROi7jxdG0AHBWTByKFVNWEzbuOPj/Mtf6XAvw+kdmN7ezrW ANML7e7vGxo663UJrU18/LOdNrkG9TzVMsKZ8jwkb8XRQiAn5VEDB4qIPI+i/VPecWHG rEJpOc5XWiCgmocl+9FptoROCVh751gR4ft1PbOkbrHbyqfpCAY84RumL2lHOc/j9MS1 IbAgkPb4ryja082BS2owvrh9g+92mn57y19YftWh4lqC4Szh13j2+6f5M2feMs+17bGF 4d3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BWzZ0o+g; 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 m23-20020a634c57000000b00461399560e5si18723461pgl.524.2022.10.19.06.46.45; Wed, 19 Oct 2022 06:46:58 -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=BWzZ0o+g; 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 S233348AbiJSNqW (ORCPT + 99 others); Wed, 19 Oct 2022 09:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbiJSNp2 (ORCPT ); Wed, 19 Oct 2022 09:45:28 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDD01BBEE6; Wed, 19 Oct 2022 06:31:53 -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 sin.source.kernel.org (Postfix) with ESMTPS id 049F1CE1FD0; Wed, 19 Oct 2022 09:05:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F27C0C433C1; Wed, 19 Oct 2022 09:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170335; bh=LmAibi8tOQgHA1R+pSqYNOLnDaLHPsErLVlZKmy2KTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BWzZ0o+g+8ua4pHQkY7v0yxa1pKTWIlh2wcz3zDSLHPMJXOjBR+XSJI1cGfxhXsLx WHJvzVHImWXvNsllmvKuiwIERFLcRiSrOZnXEz3ekq0ALeX0KtQoD/csmVlqeav6EX XYy9pPzl62Ektv/GT3fO+Denhr7Cwmru5lD7hrl4= 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 6.0 617/862] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 Date: Wed, 19 Oct 2022 10:31:44 +0200 Message-Id: <20221019083317.203428361@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747123928589219020?= X-GMAIL-MSGID: =?utf-8?q?1747123928589219020?= 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 02742facf895..140a5e6471fe 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