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
This commit is contained in:
parent
cfbf4f992b
commit
7c81ad8e8b
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user