diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-24 13:28:20 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-24 13:28:20 -0400 |
commit | 157edace4ad3f3703e858e4fdea3d77a0b1832e0 (patch) | |
tree | 2fd604752064bcdedf0e7910a979046f2551717f /sys/arch/amd64/amd64 | |
parent | 3f9b766a3e19eb9dde9779adc1ea91474c3efbb5 (diff) |
kernel/amd64: pmap: Fix check for listed CPUs
Only perform a TLB shootdown if the number of cores listed is greater
than one.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index 468cca4..6eca948 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -206,12 +206,12 @@ pmap_modify_tbl(struct vm_ctx *ctx, struct vas vas, vaddr_t va, size_t val) tbl[pmap_get_level_index(1, va)] = val; /* - * Do TLB shootdown if CPUs are listed. + * Do TLB shootdown if multiple CPUs are listed. * * XXX: Some might not be listed during early * startup. */ - if (cpu_get(0) != NULL) { + if (cpu_count() > 1) { tlb_shootdown(va); } |