mirror of
https://github.com/opnsense/src.git
synced 2026-04-23 23:28:37 -04:00
On arm64, testing pc_curpcb != NULL is not correct since pc_curpcb is
set in pmap_switch() while the bootstrap stack is still in use. As a
result, smp_after_idle_runnable() can free the boot stack prematurely.
Take a different approach: use smp_rendezvous() to wait for all APs to
acknowledge an interrupt. Since APs must not enable interrupts until
they've entered the scheduler, i.e., switched off the boot stack, this
provides the right guarantee without depending as much on the
implementation of cpu_throw(). And, this approach applies to all
platforms, so convert x86 and riscv as well.
Reported by: mmel
Tested by: mmel
Reviewed by: kib
Fixes:
|
||
|---|---|---|
| .. | ||
| acpica | ||
| arm64 | ||
| broadcom | ||
| cavium | ||
| conf | ||
| coresight | ||
| freescale/imx | ||
| include | ||
| intel | ||
| iommu | ||
| linux | ||
| nvidia/tegra210 | ||
| qoriq | ||
| qualcomm | ||
| rockchip | ||