[tip: x86/cpu] x86/apic: Fix 32-bit APIC initialization for extended Intel Families

From: tip-bot2 for Sohil Mehta
Date: Tue Mar 18 2025 - 14:56:56 EST


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

Commit-ID: 3447a2e710494fea44ba76a949b3d3afe17a7a23
Gitweb: https://git.kernel.org/tip/3447a2e710494fea44ba76a949b3d3afe17a7a23
Author: Sohil Mehta <sohil.mehta@xxxxxxxxx>
AuthorDate: Wed, 19 Feb 2025 18:41:19
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Tue, 18 Mar 2025 19:33:44 +01:00

x86/apic: Fix 32-bit APIC initialization for extended Intel Families

APIC detection is currently limited to a few specific Families and will
not match the upcoming Families >=18.

Extend the check to include all Families 6 or greater. Also convert it
to a VFM check to make it simpler.

Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20250219184133.816753-2-sohil.mehta@xxxxxxxxx
---
arch/x86/kernel/apic/apic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ddca8da..62584a3 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2011,8 +2011,8 @@ static bool __init detect_init_APIC(void)
case X86_VENDOR_HYGON:
break;
case X86_VENDOR_INTEL:
- if (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15 ||
- (boot_cpu_data.x86 == 5 && boot_cpu_has(X86_FEATURE_APIC)))
+ if ((boot_cpu_data.x86 == 5 && boot_cpu_has(X86_FEATURE_APIC)) ||
+ boot_cpu_data.x86_vfm >= INTEL_PENTIUM_PRO)
break;
goto no_apic;
default: