aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2025-11-22 18:46:04 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2025-11-22 18:46:04 +0000
commit9128380511de3db9bd4d62d58c6a6dfcd1094079 (patch)
treeb87dc624c095db2da0aa77c89b4e6e7d22daa448
parent55de86dac813d2f8fbb70dd15b17a5677cb1168f (diff)
Revert "arm64: Move intr_pic_init_secondary earlier"
It's not clear what the race described in the commit actually is, nor how it could arise, but this commit is definitely wrong; curthread is no longer set for intr_pic_init_secondary, and gic_v3's pic_init_secondary uses mutex(9) in some places, which requires curthread, so it has led to panics. Revert this change until the original issue this was intended to be fixed can be more thorougly investigated and a better fix made. Reported by: Herbert J. Skuhra <herbert@gojira.at>, jhb This reverts commit a695ac2ce8bc8e8b989359002659063f2e056dcf.
-rw-r--r--sys/arm64/arm64/mp_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index ba673ce9d6ee..0bdd2ecfd8a7 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -270,8 +270,6 @@ 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);
@@ -290,6 +288,8 @@ 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();