mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Sohil Mehta" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Sohil Mehta <sohil.mehta@intel.com>,
	Ingo Molnar <mingo@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/core] x86/cpu/intel: Replace early Family 6 checks with VFM ones
Date: Wed, 19 Mar 2025 11:03:41 -0000	[thread overview]
Message-ID: <174238222189.14745.4121935575691336561.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250219184133.816753-6-sohil.mehta@intel.com>

The following commit has been merged into the x86/core branch of tip:

Commit-ID:     eaa472f76d1cc356c0f9d4406d2358ca924a797e
Gitweb:        https://git.kernel.org/tip/eaa472f76d1cc356c0f9d4406d2358ca924a797e
Author:        Sohil Mehta <sohil.mehta@intel.com>
AuthorDate:    Wed, 19 Feb 2025 18:41:23 
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 19 Mar 2025 11:19:41 +01:00

x86/cpu/intel: Replace early Family 6 checks with VFM ones

Introduce names for some old pentium models and replace the x86_model
checks with VFM ones.

Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20250219184133.816753-6-sohil.mehta@intel.com
---
 arch/x86/include/asm/intel-family.h |  4 ++++
 arch/x86/kernel/cpu/intel.c         | 11 +++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index f0e7ed0..58735bc 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -45,8 +45,12 @@
 /* Wildcard match so X86_MATCH_VFM(ANY) works */
 #define INTEL_ANY			IFM(X86_FAMILY_ANY, X86_MODEL_ANY)
 
+/* Family 6 */
 #define INTEL_PENTIUM_PRO		IFM(6, 0x01)
+#define INTEL_PENTIUM_II_KLAMATH	IFM(6, 0x03)
 #define INTEL_PENTIUM_III_DESCHUTES	IFM(6, 0x05)
+#define INTEL_PENTIUM_III_TUALATIN	IFM(6, 0x0B)
+#define INTEL_PENTIUM_M_DOTHAN		IFM(6, 0x0D)
 
 #define INTEL_CORE_YONAH		IFM(6, 0x0E)
 
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 99b4c40..a49615f 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -186,7 +186,7 @@ void intel_unlock_cpuid_leafs(struct cpuinfo_x86 *c)
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
 		return;
 
-	if (c->x86 < 6 || (c->x86 == 6 && c->x86_model < 0xd))
+	if (c->x86_vfm < INTEL_PENTIUM_M_DOTHAN)
 		return;
 
 	/*
@@ -341,9 +341,7 @@ static void bsp_init_intel(struct cpuinfo_x86 *c)
 int ppro_with_ram_bug(void)
 {
 	/* Uses data from early_cpu_detect now */
-	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
-	    boot_cpu_data.x86 == 6 &&
-	    boot_cpu_data.x86_model == 1 &&
+	if (boot_cpu_data.x86_vfm == INTEL_PENTIUM_PRO &&
 	    boot_cpu_data.x86_stepping < 8) {
 		pr_info("Pentium Pro with Errata#50 detected. Taking evasive action.\n");
 		return 1;
@@ -404,7 +402,8 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
 	 * SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until
 	 * model 3 mask 3
 	 */
-	if ((c->x86<<8 | c->x86_model<<4 | c->x86_stepping) < 0x633)
+	if ((c->x86_vfm == INTEL_PENTIUM_II_KLAMATH && c->x86_stepping < 3) ||
+	    c->x86_vfm < INTEL_PENTIUM_II_KLAMATH)
 		clear_cpu_cap(c, X86_FEATURE_SEP);
 
 	/*
@@ -606,7 +605,7 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size)
 	 * to determine which, so we use a boottime override
 	 * for the 512kb model, and assume 256 otherwise.
 	 */
-	if ((c->x86 == 6) && (c->x86_model == 11) && (size == 0))
+	if (c->x86_vfm == INTEL_PENTIUM_III_TUALATIN && size == 0)
 		size = 256;
 
 	/*

  parent reply	other threads:[~2025-03-19 11:03 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 18:41 [PATCH v3 00/15] Prepare for new Intel Family numbers Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 01/15] x86/apic: Fix 32-bit APIC initialization for extended Intel Families Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 02/15] x86/cpu/intel: Fix the movsl alignment preference for extended Families Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] x86/cpu/intel: Fix the MOVSL " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 03/15] x86/microcode: Update the Intel processor flag scan check Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 04/15] x86/mtrr: Modify a x86_model check to an Intel VFM check Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 05/15] x86/cpu/intel: Replace early Family 6 checks with VFM ones Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` tip-bot2 for Sohil Mehta [this message]
2025-02-19 18:41 ` [PATCH v3 06/15] x86/cpu/intel: Replace Family 15 " Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 07/15] x86/cpu/intel: Replace Family 5 model " Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 08/15] x86/acpi/cstate: Improve Intel Family model checks Sohil Mehta
2025-02-20 19:20   ` Rafael J. Wysocki
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 09/15] x86/smpboot: Remove confusing quirk usage in INIT delay Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 10/15] x86/smpboot: Fix INIT delay assignment for extended Intel Families Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 11/15] x86/cpu/intel: Fix fast string initialization for extended Families Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 12/15] x86/pat: Replace Intel x86_model checks with VFM ones Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] x86/mm/pat: " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 13/15] x86/cpu/intel: Bound the non-architectural constant_tsc model checks Sohil Mehta
2025-03-18 18:54   ` [tip: x86/cpu] x86/cpu/intel: Limit " tip-bot2 for Sohil Mehta
2025-03-19 11:03   ` [tip: x86/core] " tip-bot2 for Sohil Mehta
2025-08-21 13:15   ` [PATCH v3 13/15] x86/cpu/intel: Bound " David Woodhouse
2025-08-21 19:34     ` Sohil Mehta
2025-08-21 19:43       ` Sohil Mehta
2025-08-21 20:09         ` David Woodhouse
2025-08-22  1:46         ` Xiaoyao Li
2025-08-24 22:39           ` Demi Marie Obenour
2025-02-19 18:41 ` [PATCH v3 14/15] perf/x86: Simplify Intel PMU initialization Sohil Mehta
2025-02-19 20:10   ` Liang, Kan
2025-02-19 20:31     ` Sohil Mehta
2025-02-19 20:45       ` Liang, Kan
2025-02-27  0:16   ` [PATCH v3.1 " Sohil Mehta
2025-02-19 18:41 ` [PATCH v3 15/15] perf/x86/p4: Replace Pentium 4 model checks with VFM ones Sohil Mehta
2025-02-19 20:11   ` Liang, Kan
2025-03-17 17:09 ` [PATCH v3 00/15] Prepare for new Intel Family numbers Sohil Mehta
2025-03-18 18:35   ` Ingo Molnar
2025-03-18 19:10     ` Sohil Mehta
2025-03-18 20:13       ` Ingo Molnar
2025-03-19 15:53         ` Sohil Mehta
2025-03-19 19:46           ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=174238222189.14745.4121935575691336561.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sohil.mehta@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®