xen/arm: acpi: Fix SMP support when booting with ACPI
authorJulien Grall <julien.grall@arm.com>
Mon, 11 Apr 2016 13:33:35 +0000 (14:33 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 11 Apr 2016 14:07:38 +0000 (10:07 -0400)
The variable enabled_cpus is used to know the number of CPU enabled in
the MADT.

Currently this variable is used to check the validity of the boot CPU.
It will be considered invalid when "enabled_cpus > 1".

However, this condition also means that multiple CPUs are present on the
system. So secondary will never be brought up.

The correct way to check the validity of the boot CPU is to use the
variable bootcpu_valid.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
xen/arch/arm/acpi/boot.c

index 1bba1cf6a5ed3257c5359e98f8a499caa56dbf3e..a952efd7e8798f87a23e036ba8bd6e05f1ac4be3 100644 (file)
@@ -149,7 +149,7 @@ void __init acpi_smp_init_cpus(void)
         return;
     }
 
-    if ( enabled_cpus > 1 )
+    if ( !bootcpu_valid )
     {
         printk("MADT missing boot CPU MPIDR, not enabling secondaries\n");
         return;