summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/topology_common.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-02-13 22:04:52 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-02-15 22:07:39 +0100
commit52128a7a21f79d5d0be62f10cb0b73d115ab492e (patch)
tree36bff448bbd0c264f8557f441141a47802f737a6 /arch/x86/kernel/cpu/topology_common.c
parentbcccdf8b30736250d5057e0940468a41d633e672 (diff)
x86/cpu/topology: Make the APIC mismatch warnings complete
Detect all possible combinations of mismatch right in the CPUID evaluation code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20240212154638.867699078@linutronix.de
Diffstat (limited to 'arch/x86/kernel/cpu/topology_common.c')
-rw-r--r--arch/x86/kernel/cpu/topology_common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c
index afea34d59598..3876a3342fe9 100644
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -177,6 +177,18 @@ void cpu_parse_topology(struct cpuinfo_x86 *c)
parse_topology(&tscan, false);
+ if (IS_ENABLED(CONFIG_X86_LOCAL_APIC)) {
+ if (c->topo.initial_apicid != c->topo.apicid) {
+ pr_err(FW_BUG "CPU%4u: APIC ID mismatch. CPUID: 0x%04x APIC: 0x%04x\n",
+ cpu, c->topo.initial_apicid, c->topo.apicid);
+ }
+
+ if (c->topo.apicid != cpuid_to_apicid[cpu]) {
+ pr_err(FW_BUG "CPU%4u: APIC ID mismatch. Firmware: 0x%04x APIC: 0x%04x\n",
+ cpu, cpuid_to_apicid[cpu], c->topo.apicid);
+ }
+ }
+
for (dom = TOPO_SMT_DOMAIN; dom < TOPO_MAX_DOMAIN; dom++) {
if (tscan.dom_shifts[dom] == x86_topo_system.dom_shifts[dom])
continue;