arm64: Move intr_pic_init_secondary earlier
This may have been called after intr_irq_shuffle. For most interrupt controllers this appears to be safe, however for the GICv5 we need to read a per-CPU ID register before we can assign interrupts to a given CPU. Fix the race by moving intr_pic_init_secondary earlier in the boot, after devices have been enumerated and before the interrupts are moved to their assigned CPUs. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D53685
This commit is contained in:
@@ -270,6 +270,8 @@ init_secondary(uint64_t cpu)
|
||||
install_cpu_errata();
|
||||
enable_cpu_feat(CPU_FEAT_AFTER_DEV);
|
||||
|
||||
intr_pic_init_secondary();
|
||||
|
||||
/* Signal we are done */
|
||||
atomic_add_int(&aps_started, 1);
|
||||
|
||||
@@ -288,8 +290,6 @@ init_secondary(uint64_t cpu)
|
||||
("pmap0 doesn't match cpu %ld's ttbr0", cpu));
|
||||
pcpup->pc_curpmap = pmap0;
|
||||
|
||||
intr_pic_init_secondary();
|
||||
|
||||
/* Start per-CPU event timers. */
|
||||
cpu_initclocks_ap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user