[tip:,x86/cpu] x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common()
Commit Message
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) <bp@alien8.de>
AuthorDate: Wed, 01 Nov 2023 12:34:29 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
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) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
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(-)
@@ -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))