Skip to content

Commit fc866f2

Browse files
sohilmehIngo Molnar
authored andcommitted
x86/cpu/intel: Replace Family 15 checks with VFM ones
Introduce names for some old pentium 4 models and replace the x86_model checks with VFM ones. Signed-off-by: Sohil Mehta <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eaa472f commit fc866f2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

arch/x86/include/asm/intel-family.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@
184184
/* Family 5 */
185185
#define INTEL_QUARK_X1000 IFM(5, 0x09) /* Quark X1000 SoC */
186186

187+
/* Family 15 - NetBurst */
188+
#define INTEL_P4_WILLAMETTE IFM(15, 0x01) /* Also Xeon Foster */
189+
#define INTEL_P4_PRESCOTT IFM(15, 0x03)
190+
187191
/* Family 19 */
188192
#define INTEL_PANTHERCOVE_X IFM(19, 0x01) /* Diamond Rapids */
189193

arch/x86/kernel/cpu/intel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ static void early_init_intel(struct cpuinfo_x86 *c)
247247
#endif
248248

249249
/* CPUID workaround for 0F33/0F34 CPU */
250-
if (c->x86 == 0xF && c->x86_model == 0x3
251-
&& (c->x86_stepping == 0x3 || c->x86_stepping == 0x4))
250+
if (c->x86_vfm == INTEL_P4_PRESCOTT &&
251+
(c->x86_stepping == 0x3 || c->x86_stepping == 0x4))
252252
c->x86_phys_bits = 36;
253253

254254
/*
@@ -421,7 +421,7 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
421421
* P4 Xeon erratum 037 workaround.
422422
* Hardware prefetcher may cause stale data to be loaded into the cache.
423423
*/
424-
if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_stepping == 1)) {
424+
if (c->x86_vfm == INTEL_P4_WILLAMETTE && c->x86_stepping == 1) {
425425
if (msr_set_bit(MSR_IA32_MISC_ENABLE,
426426
MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT) > 0) {
427427
pr_info("CPU: C0 stepping P4 Xeon detected.\n");

0 commit comments

Comments
 (0)