From patchwork Wed Nov 29 11:22:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 171270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp267763vqn; Wed, 29 Nov 2023 03:23:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHVLmKc8IYQ3Fp/nhG2ERbYGRaJ+D2Dtj7khqnCLhFqygEWgcK44Y/C/TrT0D9+CJadT21 X-Received: by 2002:a05:6808:150c:b0:3b8:3fd7:a194 with SMTP id u12-20020a056808150c00b003b83fd7a194mr23160294oiw.33.1701256984975; Wed, 29 Nov 2023 03:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701256984; cv=none; d=google.com; s=arc-20160816; b=ThIfOBuSIxZHEyWKw4IdnPczElpELjHOjlWdxEiZterdZYqjfA+6M1CaoYzo2HZvv3 sYrdEDwTs544D+mNsHKqqQG8TjtsNoiNbz4gbWKCcPjvJ8IAJcVc3cIgeKUeaOWl6mSD qC1t4MyGvtv7q9avN8DIroCunmyWXKANm61r4z2tJ4Y5z23DsxX65cr1sQYZlAB8vrgZ ZkOTpDT18Yq8B1LGti9QUDvZJG2jZgEq3Hv4Yu+Hyd6BOGiIBwMuxGPlZrlC/tZyrFMU xhMYcP0DU/nQwTgZqy5f96dn8isdgIZz299PBGGkwMdtjfXCzG7c4M1jKBRrlAbBdWmG RHZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=g1ltcc3b3mRyT/av5cRPGcM+cJbBi7H6S2KjhqFQk0Y=; fh=UD1ZRCSS/l4PYbuMk1gSsIJwAKOC33PKfkYvw4GUlo4=; b=zsSefEGy236/8k8SFRoTAoinKhnRkVN9bVvjvPMhpDSpwgtkOxslU/7suf+sbRZqXI arKG4g+0p4eRVii67NAb9gY41Ka4jsIOBz6EltSLkfOiA+t9oSdWmeULNhLa96GXWoWu TdHKNpyYk5oI0mHEgyuWTCwVy9J6Sd+a8p77TyCXwBEJUyWmVQJEUw2ry2m6DaCR38d6 iVbc7DKWi3IfhhLtIIT9ZmmNNyaBuQeVsJE3f1XPn9rGSpwUQlQo+2buPE6cQDYGYmjX zHs5D/V4oBgq+SbPRJO400uEEH/l5NCkesLURGEI/bNpSHgZ4se1uz3fuEHBeY6DQXbn euFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Wyp0Y7Rz; dkim=neutral (no key) header.i=@linutronix.de header.b=WXnLMWeD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u5-20020a656705000000b0056959099f46si13782156pgf.856.2023.11.29.03.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:23:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Wyp0Y7Rz; dkim=neutral (no key) header.i=@linutronix.de header.b=WXnLMWeD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B9CB88031E36; Wed, 29 Nov 2023 03:23:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232977AbjK2LWo (ORCPT + 99 others); Wed, 29 Nov 2023 06:22:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232064AbjK2LWZ (ORCPT ); Wed, 29 Nov 2023 06:22:25 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D2BDA; Wed, 29 Nov 2023 03:22:32 -0800 (PST) Date: Wed, 29 Nov 2023 11:22:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701256950; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g1ltcc3b3mRyT/av5cRPGcM+cJbBi7H6S2KjhqFQk0Y=; b=Wyp0Y7Rzr4X6m0aWOBQlaQeKCXM3sCpKLZAMY3Fda1stpvvCBPZRkcfU4bwBFSoYNsdxZl Yxzqj+AteUvlYhxpPXW91hx5YHEE0FoAmQLIJ1DTlK+80/IjU29TiVhhZobuirYLqHI802 54txw/WfB63briaMobMhhWXCguguUeoj1cvrpSqtDCFKAnR0CVtiNLs5x+xJinaigAJC/+ +kCKZHTyZOawjwgeU++dC9TZGkp2LawOiKlr77vKuK672iGLTtDP8kO/RzEjvzbsx5nxGY VJW9L6xztlt/L0h4UgsI0EheXVA4UwK8r08ZXoItULqqzlpbHigm5Gyawdeo2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701256950; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g1ltcc3b3mRyT/av5cRPGcM+cJbBi7H6S2KjhqFQk0Y=; b=WXnLMWeDaMwyZ1Ls1gG9ycDYRJ7WHTBwIVBGDeW30Vr7Uq4n9DY4N9tEYB+1MM/42z/2Gm c1tpH31tR5ZrTdAg== From: "tip-bot2 for Borislav Petkov (AMD)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() Cc: "Borislav Petkov (AMD)" , Nikolay Borisov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231120104152.13740-7-bp@alien8.de> References: <20231120104152.13740-7-bp@alien8.de> MIME-Version: 1.0 Message-ID: <170125695011.398.3115550737578725186.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 03:23:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783079412119336914 X-GMAIL-MSGID: 1783897243886772203 The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 7c81ad8e8bc28a1847e87c5afe1bae6bffb2f73e Gitweb: https://git.kernel.org/tip/7c81ad8e8bc28a1847e87c5afe1bae6bffb2f73e Author: Borislav Petkov (AMD) AuthorDate: Wed, 01 Nov 2023 12:34:29 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 29 Nov 2023 12:12:27 +01:00 x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() Call it from all Zen init functions. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-7-bp@alien8.de --- arch/x86/kernel/cpu/amd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 82747b6..f53e0a2 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1017,7 +1017,7 @@ void init_spectral_chicken(struct cpuinfo_x86 *c) #endif } -static void init_amd_zn(struct cpuinfo_x86 *c) +static void init_amd_zen_common(void) { #ifdef CONFIG_NUMA node_reclaim_distance = 32; @@ -1026,6 +1026,7 @@ static void init_amd_zn(struct cpuinfo_x86 *c) static void init_amd_zen(struct cpuinfo_x86 *c) { + init_amd_zen_common(); fix_erratum_1386(c); /* Fix up CPUID bits, but only if not virtualised. */ @@ -1075,16 +1076,20 @@ static void zenbleed_check(struct cpuinfo_x86 *c) } else { msr_clear_bit(MSR_AMD64_DE_CFG, MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT); } + } static void init_amd_zen2(struct cpuinfo_x86 *c) { + init_amd_zen_common(); init_spectral_chicken(c); fix_erratum_1386(c); } static void init_amd_zen3(struct cpuinfo_x86 *c) { + init_amd_zen_common(); + if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) { /* * Zen3 (Fam19 model < 0x10) parts are not susceptible to @@ -1098,6 +1103,7 @@ static void init_amd_zen3(struct cpuinfo_x86 *c) static void init_amd_zen4(struct cpuinfo_x86 *c) { + init_amd_zen_common(); } static void init_amd(struct cpuinfo_x86 *c) @@ -1135,9 +1141,6 @@ static void init_amd(struct cpuinfo_x86 *c) case 0x12: init_amd_ln(c); break; case 0x15: init_amd_bd(c); break; case 0x16: init_amd_jg(c); break; - case 0x17: - fallthrough; - case 0x19: init_amd_zn(c); break; } if (boot_cpu_has(X86_FEATURE_ZEN))