For reference see: commit 8882b7852acf2588d87ccb6d4c6bf7694511fc56 Author: Konstantin Belousov <kib@FreeBSD.org> Date: Fri Oct 8 01:25:54 2021 +0300 add pmap_active_cpus() For amd64, i386, arm, and riscv, i.e. all architectures except arm64, the custom implementation is provided since we maintain the bitmask of active CPUs anyway. Arm64 uses somewhat naive iteration over CPUs and match current vmspace' pmap with the argument. It is not guaranteed that vmspace->pmap is the same as the active pmap, but the inaccuracy should be toleratable. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32360