Skip to content

Commit d32bc21

Browse files
aeglbp3tk0v
authored andcommitted
x86/aperfmperf: Switch to new Intel CPU model defines
New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/all/20240424181505.41654-1-tony.luck%40intel.com
1 parent 8fb5f44 commit d32bc21

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

arch/x86/kernel/cpu/aperfmperf.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,24 @@ static bool __init slv_set_max_freq_ratio(u64 *base_freq, u64 *turbo_freq)
124124
return true;
125125
}
126126

127-
#define X86_MATCH(model) \
128-
X86_MATCH_VENDOR_FAM_MODEL_FEATURE(INTEL, 6, \
129-
INTEL_FAM6_##model, X86_FEATURE_APERFMPERF, NULL)
127+
#define X86_MATCH(vfm) \
128+
X86_MATCH_VFM_FEATURE(vfm, X86_FEATURE_APERFMPERF, NULL)
130129

131130
static const struct x86_cpu_id has_knl_turbo_ratio_limits[] __initconst = {
132-
X86_MATCH(XEON_PHI_KNL),
133-
X86_MATCH(XEON_PHI_KNM),
131+
X86_MATCH(INTEL_XEON_PHI_KNL),
132+
X86_MATCH(INTEL_XEON_PHI_KNM),
134133
{}
135134
};
136135

137136
static const struct x86_cpu_id has_skx_turbo_ratio_limits[] __initconst = {
138-
X86_MATCH(SKYLAKE_X),
137+
X86_MATCH(INTEL_SKYLAKE_X),
139138
{}
140139
};
141140

142141
static const struct x86_cpu_id has_glm_turbo_ratio_limits[] __initconst = {
143-
X86_MATCH(ATOM_GOLDMONT),
144-
X86_MATCH(ATOM_GOLDMONT_D),
145-
X86_MATCH(ATOM_GOLDMONT_PLUS),
142+
X86_MATCH(INTEL_ATOM_GOLDMONT),
143+
X86_MATCH(INTEL_ATOM_GOLDMONT_D),
144+
X86_MATCH(INTEL_ATOM_GOLDMONT_PLUS),
146145
{}
147146
};
148147

0 commit comments

Comments
 (0)