Skip to content

Commit 025ded6

Browse files
bp3tk0vgregkh
authored andcommitted
x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common()
Commit 7c81ad8 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8e88f24 commit 025ded6

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

arch/x86/kernel/cpu/amd.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,11 +1069,16 @@ void init_spectral_chicken(struct cpuinfo_x86 *c)
10691069
clear_cpu_cap(c, X86_FEATURE_XSAVES);
10701070
}
10711071

1072-
static void init_amd_zn(struct cpuinfo_x86 *c)
1072+
static void init_amd_zen_common(void)
10731073
{
10741074
#ifdef CONFIG_NUMA
10751075
node_reclaim_distance = 32;
10761076
#endif
1077+
}
1078+
1079+
static void init_amd_zen(struct cpuinfo_x86 *c)
1080+
{
1081+
init_amd_zen_common();
10771082

10781083
/* Fix up CPUID bits, but only if not virtualised. */
10791084
if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) {
@@ -1136,21 +1141,20 @@ static void zenbleed_check(struct cpuinfo_x86 *c)
11361141
}
11371142
}
11381143

1139-
static void init_amd_zen(struct cpuinfo_x86 *c)
1140-
{
1141-
}
1142-
11431144
static void init_amd_zen2(struct cpuinfo_x86 *c)
11441145
{
1146+
init_amd_zen_common();
11451147
init_spectral_chicken(c);
11461148
}
11471149

11481150
static void init_amd_zen3(struct cpuinfo_x86 *c)
11491151
{
1152+
init_amd_zen_common();
11501153
}
11511154

11521155
static void init_amd_zen4(struct cpuinfo_x86 *c)
11531156
{
1157+
init_amd_zen_common();
11541158
}
11551159

11561160
static void init_amd(struct cpuinfo_x86 *c)
@@ -1182,9 +1186,6 @@ static void init_amd(struct cpuinfo_x86 *c)
11821186
case 0x12: init_amd_ln(c); break;
11831187
case 0x15: init_amd_bd(c); break;
11841188
case 0x16: init_amd_jg(c); break;
1185-
case 0x17:
1186-
fallthrough;
1187-
case 0x19: init_amd_zn(c); break;
11881189
}
11891190

11901191
if (boot_cpu_has(X86_FEATURE_ZEN))

0 commit comments

Comments
 (0)