aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-10-07 22:25:54 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2023-08-23 00:02:21 +0000
commit8882b7852acf2588d87ccb6d4c6bf7694511fc56 (patch)
treedbabf247d86e29c02701e51ed7cbfcf245435e38 /sys/amd64
parentc7f73a1588dc58db28100fcbc1d72a830b674b34 (diff)
downloadsrc-8882b7852acf2588d87ccb6d4c6bf7694511fc56.tar.gz
src-8882b7852acf2588d87ccb6d4c6bf7694511fc56.zip
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
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index c7151fa59b91..b10997fd657b 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -10257,6 +10257,12 @@ pmap_activate_boot(pmap_t pmap)
}
void
+pmap_active_cpus(pmap_t pmap, cpuset_t *res)
+{
+ *res = pmap->pm_active;
+}
+
+void
pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
{
}