aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-07-21 17:18:38 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-07-21 17:18:38 +0000
commitf2b6da18dea0a3a4e78cb839defd6f6755b82dc8 (patch)
tree961a2588ef811a240c764bd402cb3ff90d74e543
parente3f1731aec0b3b1ba33229acb6605eff1bb9d0f6 (diff)
downloadsrc-f2b6da18dea0a3a4e78cb839defd6f6755b82dc8.tar.gz
src-f2b6da18dea0a3a4e78cb839defd6f6755b82dc8.zip
Avoid code duplicaiton by using ipi_selected().
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=363399
-rw-r--r--sys/amd64/amd64/mp_machdep.c8
-rw-r--r--sys/i386/i386/mp_machdep.c8
2 files changed, 2 insertions, 14 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index ca95013d9c0b..b4cc7ab829a4 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -696,13 +696,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1,
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
} else {
other_cpus = mask;
- while ((cpu = CPU_FFS(&mask)) != 0) {
- cpu--;
- CPU_CLR(cpu, &mask);
- CTR3(KTR_SMP, "%s: cpu: %d invl ipi op: %x", __func__,
- cpu, op);
- ipi_send_cpu(cpu, IPI_INVLOP);
- }
+ ipi_selected(mask, IPI_INVLOP);
}
curcpu_cb(pmap, addr1, addr2);
while ((cpu = CPU_FFS(&other_cpus)) != 0) {
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 8ab16d129537..acdb40197433 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -536,13 +536,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap,
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
} else {
other_cpus = mask;
- while ((cpu = CPU_FFS(&mask)) != 0) {
- cpu--;
- CPU_CLR(cpu, &mask);
- CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__,
- cpu, vector);
- ipi_send_cpu(cpu, vector);
- }
+ ipi_selected(mask, vector);
}
curcpu_cb(pmap, addr1, addr2);
while ((cpu = CPU_FFS(&other_cpus)) != 0) {