From c3ab415cb27988f6a5f3fb7d9b24fe51fb330b2a Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 14 Jun 2016 16:41:39 +0000 Subject: [PATCH] Move the arm call to intr_pic_init_secondary earlier in the secondary CPU initialisation. This ensures it will complete before signalling to the boot CPU it has booted. This fixes a race with the GIC where the arm_gic_map may not be populated before it is used to bind interrupts leading to some interrupts becoming bound to no CPUs. Approved by: re (kib) Sponsored by: ABT Systems Ltd --- sys/arm/arm/mp_machdep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index 24b5679f4ec..312ee58c6ec 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -199,6 +199,9 @@ init_secondary(int cpu) vfp_init(); #endif + /* Configure the interrupt controller */ + intr_pic_init_secondary(); + mtx_lock_spin(&ap_boot_mtx); atomic_add_rel_32(&smp_cpus, 1); @@ -237,7 +240,6 @@ init_secondary(int cpu) cpu_initclocks_ap(); CTR0(KTR_SMP, "go into scheduler"); - intr_pic_init_secondary(); /* Enter the scheduler */ sched_throw(NULL);