Skip to content

Commit 05d234d

Browse files
sohilmehIngo Molnar
authored andcommitted
x86/mm/pat: Replace Intel x86_model checks with VFM ones
Introduce markers and names for some Family 6 and Family 15 models and replace x86_model checks with VFM ones. Since the VFM checks are closed ended and only applicable to Intel, get rid of the explicit Intel vendor check as well. Signed-off-by: Sohil Mehta <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 15b7ddc commit 05d234d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
193193
/* Family 15 - NetBurst */
194194
#define INTEL_P4_WILLAMETTE IFM(15, 0x01) /* Also Xeon Foster */
195195
#define INTEL_P4_PRESCOTT IFM(15, 0x03)
196+
#define INTEL_P4_CEDARMILL IFM(15, 0x06) /* Also Xeon Dempsey */
196197

197198
/* Family 19 */
198199
#define INTEL_PANTHERCOVE_X IFM(19, 0x01) /* Diamond Rapids */

arch/x86/mm/pat/memtype.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <linux/fs.h>
4444
#include <linux/rbtree.h>
4545

46+
#include <asm/cpu_device_id.h>
4647
#include <asm/cacheflush.h>
4748
#include <asm/cacheinfo.h>
4849
#include <asm/processor.h>
@@ -290,9 +291,8 @@ void __init pat_bp_init(void)
290291
return;
291292
}
292293

293-
if ((c->x86_vendor == X86_VENDOR_INTEL) &&
294-
(((c->x86 == 0x6) && (c->x86_model <= 0xd)) ||
295-
((c->x86 == 0xf) && (c->x86_model <= 0x6)))) {
294+
if ((c->x86_vfm >= INTEL_PENTIUM_PRO && c->x86_vfm <= INTEL_PENTIUM_M_DOTHAN) ||
295+
(c->x86_vfm >= INTEL_P4_WILLAMETTE && c->x86_vfm <= INTEL_P4_CEDARMILL)) {
296296
/*
297297
* PAT support with the lower four entries. Intel Pentium 2,
298298
* 3, M, and 4 are affected by PAT errata, which makes the

0 commit comments

Comments
 (0)