From patchwork Mon Oct 24 11:31:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp430337wru; Mon, 24 Oct 2022 05:41:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4n2kk2NPBu+Q6Uny+52i5M2YzRRM1zJ/Uo6WID3upimRcDUpfWEnwTvUsuPB30cBkDCz/g X-Received: by 2002:a17:902:9048:b0:17f:93a5:4638 with SMTP id w8-20020a170902904800b0017f93a54638mr33268114plz.108.1666615275653; Mon, 24 Oct 2022 05:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615275; cv=none; d=google.com; s=arc-20160816; b=k0gMGrqJ0mMJj0hJG5VEy+44GJxe5vRDhOC4MYol0/TfC7z/AmeYFMSU2W96nlKNb7 GjU1Tqqst97mIETr+qdFShFjvq/ln7gNisIa3twwPud4wEG9wgu9guyeerDOMzMLJw6q 4bQe3L8n8yRQmhj65w1T7+0/p0qn0eFw8tj9iCeFQEvynmtD3hI8pPuvEGFUOG3G/AcT nD764KAXRmB6trbEyHGoR7XYBh3f9FIA/5au90IGic7irslT1wUCYDhJUpOZKgX70MwU KNy7toeAyRBCNVdbk4YnBUZiRIUS8hnZcheZKL6gJR1i93oRdw5KavLHqRcAaPQNBv7/ PLXg== 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=jaqCZR1x23lMss5LaRf4xRr30txkPhUXh+lT6MyFJ6A=; b=gr53j7dE+dVBrbOeMj+dfHGDU3XjiTsvFxEqDuowtJJ2ZyGh61kT3jWQhCGteKt5vI 9CcQ3NJO3XvMkD6SGSkkOtM3nTSr5oFGJp001RARyivq0dBs87e6/lmnndMPs1DYnn8b G2a0460V9id+tyCfJp+y021D+N23YxAQA94737lV9rf7PJWlYrnWNpTaq9Kt8mSMibjh gl95rmIJBJkx4RzmnvN6kJH39RaPORsVmw/shATn6zwcs8w8HpfvaRuAoo1phQfMwWIi JK+DTVZpKymWDt7Z+IrtmvzPXkafKK/J9a9dqHWw5c3+8Q0mAB1Xr8Y7RLv8KHjUmYFI aY4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eIYHZJex; 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 v23-20020a634657000000b00455bdca34dcsi36220709pgk.88.2022.10.24.05.41.02; Mon, 24 Oct 2022 05:41:15 -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=eIYHZJex; 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 S234062AbiJXM3Q (ORCPT + 99 others); Mon, 24 Oct 2022 08:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233826AbiJXM2V (ORCPT ); Mon, 24 Oct 2022 08:28:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B21D486822; Mon, 24 Oct 2022 05:01:57 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CFD1A612D6; Mon, 24 Oct 2022 12:01:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE292C433C1; Mon, 24 Oct 2022 12:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612904; bh=KVvd0PtzsKmWH3xk/PNjyBKeL2/HnerrXU27sC6DEu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eIYHZJex0sqHhYMMKI71ohxLVSKjcp5Gw38dQUwDC0PQ3ozpVIG3Wd65Gy99sAvZJ GtXb/I+e3YU1PqDwCTaUbsMpIrjtTKq5F6GLN8by7clJfqifeAn+84foeBTZmFtY8T mqR2Wsuzg+Gu41xnGxXt+3bX5nXq5aEXokdEfXFI= 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 4.19 164/229] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 Date: Mon, 24 Oct 2022 13:31:23 +0200 Message-Id: <20221024113004.373416626@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747572779164827981?= X-GMAIL-MSGID: =?utf-8?q?1747572779164827981?= 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 26654d0c2af7..5987ae0d8fbb 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -165,7 +165,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