File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -969,7 +969,6 @@ static void init_amd_zen_common(void)
969
969
970
970
static void init_amd_zen1 (struct cpuinfo_x86 * c )
971
971
{
972
- init_amd_zen_common ();
973
972
fix_erratum_1386 (c );
974
973
975
974
/* Fix up CPUID bits, but only if not virtualised. */
@@ -1023,16 +1022,13 @@ static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
1023
1022
1024
1023
static void init_amd_zen2 (struct cpuinfo_x86 * c )
1025
1024
{
1026
- init_amd_zen_common ();
1027
1025
init_spectral_chicken (c );
1028
1026
fix_erratum_1386 (c );
1029
1027
zen2_zenbleed_check (c );
1030
1028
}
1031
1029
1032
1030
static void init_amd_zen3 (struct cpuinfo_x86 * c )
1033
1031
{
1034
- init_amd_zen_common ();
1035
-
1036
1032
if (!cpu_has (c , X86_FEATURE_HYPERVISOR )) {
1037
1033
/*
1038
1034
* Zen3 (Fam19 model < 0x10) parts are not susceptible to
@@ -1046,15 +1042,12 @@ static void init_amd_zen3(struct cpuinfo_x86 *c)
1046
1042
1047
1043
static void init_amd_zen4 (struct cpuinfo_x86 * c )
1048
1044
{
1049
- init_amd_zen_common ();
1050
-
1051
1045
if (!cpu_has (c , X86_FEATURE_HYPERVISOR ))
1052
1046
msr_set_bit (MSR_ZEN4_BP_CFG , MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT );
1053
1047
}
1054
1048
1055
1049
static void init_amd_zen5 (struct cpuinfo_x86 * c )
1056
1050
{
1057
- init_amd_zen_common ();
1058
1051
}
1059
1052
1060
1053
static void init_amd (struct cpuinfo_x86 * c )
@@ -1094,6 +1087,13 @@ static void init_amd(struct cpuinfo_x86 *c)
1094
1087
case 0x16 : init_amd_jg (c ); break ;
1095
1088
}
1096
1089
1090
+ /*
1091
+ * Save up on some future enablement work and do common Zen
1092
+ * settings.
1093
+ */
1094
+ if (c -> x86 >= 0x17 )
1095
+ init_amd_zen_common ();
1096
+
1097
1097
if (boot_cpu_has (X86_FEATURE_ZEN1 ))
1098
1098
init_amd_zen1 (c );
1099
1099
else if (boot_cpu_has (X86_FEATURE_ZEN2 ))
You can’t perform that action at this time.
0 commit comments