From 003ab7887d4e52e052a96eee93a0b5999f571bf1 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Thu, 17 Sep 2020 13:07:43 +0200 Subject: [PATCH] acpi: MADT: do not count disabled CPUs Signed-off-by: Pawel Wieczorkiewicz --- common/acpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/acpi.c b/common/acpi.c index 7950a5d0..e6550ee6 100644 --- a/common/acpi.c +++ b/common/acpi.c @@ -185,6 +185,9 @@ static unsigned process_madt_entries(void) { if (madt_cpu->apic_proc_id == 0) percpu->bsp = true; + if (!percpu->enabled) + continue; + nr_cpus++; printk("ACPI: [MADT] APIC Processor ID: %u, APIC ID: %u, Flags: %08x\n", madt_cpu->apic_proc_id, madt_cpu->apic_id, madt_cpu->flags);