Skip to content

Commit a8cb451

Browse files
sohilmehIngo Molnar
authored andcommitted
x86/mtrr: Modify a x86_model check to an Intel VFM check
Simplify one of the last few Intel x86_model checks in arch/x86 by substituting it with a VFM one. 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 7e6b0a2 commit a8cb451

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/cpu/mtrr/generic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <asm/processor-flags.h>
1414
#include <asm/cacheinfo.h>
1515
#include <asm/cpufeature.h>
16+
#include <asm/cpu_device_id.h>
1617
#include <asm/hypervisor.h>
1718
#include <asm/mshyperv.h>
1819
#include <asm/tlbflush.h>
@@ -1026,8 +1027,7 @@ int generic_validate_add_page(unsigned long base, unsigned long size,
10261027
* For Intel PPro stepping <= 7
10271028
* must be 4 MiB aligned and not touch 0x70000000 -> 0x7003FFFF
10281029
*/
1029-
if (mtrr_if == &generic_mtrr_ops && boot_cpu_data.x86 == 6 &&
1030-
boot_cpu_data.x86_model == 1 &&
1030+
if (mtrr_if == &generic_mtrr_ops && boot_cpu_data.x86_vfm == INTEL_PENTIUM_PRO &&
10311031
boot_cpu_data.x86_stepping <= 7) {
10321032
if (base & ((1 << (22 - PAGE_SHIFT)) - 1)) {
10331033
pr_warn("mtrr: base(0x%lx000) is not 4 MiB aligned\n", base);

0 commit comments

Comments
 (0)