opnsense-src/sys/arm64
Mark Johnston f6b799a86b Fix the test used to wait for AP startup on x86, arm64, riscv
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:		8db2e8fd16 ("Remove the secondary_stacks array in arm64 and riscv kernels.")
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35435
2022-06-15 11:38:04 -04:00
..
acpica Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
arm64 Fix the test used to wait for AP startup on x86, arm64, riscv 2022-06-15 11:38:04 -04:00
broadcom arm/arm64 broadcom: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
cavium Add fdt to name of a fdt specific function 2022-05-23 15:24:35 +01:00
conf arm64: conf: Remove options EXT_RESOURCES 2022-02-21 17:29:09 +01:00
coresight arm64 coresight: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
freescale/imx arm/arm64 freescale: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:44 -07:00
include arm64: Print per-CPU cache summary 2022-06-06 10:23:10 -05:00
intel arm64 intel: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
iommu Add OFW support to arm64's IOMMU framework. 2022-05-18 14:11:23 +01:00
linux linux(4): Properly build argument list for the signal handler 2022-05-30 19:53:12 +03:00
nvidia/tegra210 arm/arm64 nvidia: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
qoriq arm64 qoriq: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
qualcomm arm/arm64 qualcomm: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00
rockchip arm64 rockchip: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 14:26:45 -07:00