opnsense-src/sys/arm64
Mark Johnston c31c881f7e 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.")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f6b799a86b)
2022-06-29 10:13:44 -04:00
..
acpica Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2022-02-08 15:00:55 -05:00
arm64 Fix the test used to wait for AP startup on x86, arm64, riscv 2022-06-29 10:13:44 -04:00
broadcom genet: fix output packet corruption in uncommon case 2022-05-23 06:53:01 -05:00
cavium Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2022-02-08 15:00:55 -05:00
cloudabi32 Add infrastructure required for Linux coredump support 2022-05-12 15:12:59 -07:00
cloudabi64 Add infrastructure required for Linux coredump support 2022-05-12 15:12:59 -07:00
conf Per-thread stack canary on arm64 2021-12-20 11:09:27 +00:00
coresight arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
freescale/imx imx7gpc: Remove unused functions 2020-11-16 11:54:38 +00:00
include arm64: Print per-CPU cache summary 2022-06-22 10:46:55 -05:00
intel Add support for Intel Stratix 10 platform. 2019-09-13 16:50:57 +00:00
iommu Introduce IOMMU support for arm64 platform. 2020-11-16 21:55:52 +00:00
linux linux(4): Properly build argument list for the signal handler 2022-06-17 22:35:38 +03:00
nvidia/tegra210 tegra: Fix a common typo in source code comments 2022-02-09 07:20:05 +01:00
qoriq arm64: QorIQ: gpio: return BUS_PROBE_DEFAULT 2021-01-06 22:37:38 +01:00
qualcomm
rockchip arm: rockchip: rk3288: Use the macros that already exists in rk_cru.h 2022-05-16 17:27:24 +02:00