From nobody Wed Dec 17 07:29:07 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB59AC4167B for ; Wed, 29 Nov 2023 11:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbjK2LWq (ORCPT ); Wed, 29 Nov 2023 06:22:46 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 7c81ad8e8bc28a1847e87c5afe1bae6bffb2f73e Gitweb: https://git.kernel.org/tip/7c81ad8e8bc28a1847e87c5afe1bae6bf= fb2f73e 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 } =20 -static void init_amd_zn(struct cpuinfo_x86 *c) +static void init_amd_zen_common(void) { #ifdef CONFIG_NUMA node_reclaim_distance =3D 32; @@ -1026,6 +1026,7 @@ static void init_amd_zn(struct cpuinfo_x86 *c) =20 static void init_amd_zen(struct cpuinfo_x86 *c) { + init_amd_zen_common(); fix_erratum_1386(c); =20 /* 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); } + } =20 static void init_amd_zen2(struct cpuinfo_x86 *c) { + init_amd_zen_common(); init_spectral_chicken(c); fix_erratum_1386(c); } =20 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) =20 static void init_amd_zen4(struct cpuinfo_x86 *c) { + init_amd_zen_common(); } =20 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; } =20 if (boot_cpu_has(X86_FEATURE_ZEN))