Avoid code duplicaiton by using ipi_selected().
MFC after: 2 weeks
This commit is contained in:
parent
e3f1731aec
commit
f2b6da18de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363399
@ -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);
|
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||||
} else {
|
} else {
|
||||||
other_cpus = mask;
|
other_cpus = mask;
|
||||||
while ((cpu = CPU_FFS(&mask)) != 0) {
|
ipi_selected(mask, IPI_INVLOP);
|
||||||
cpu--;
|
|
||||||
CPU_CLR(cpu, &mask);
|
|
||||||
CTR3(KTR_SMP, "%s: cpu: %d invl ipi op: %x", __func__,
|
|
||||||
cpu, op);
|
|
||||||
ipi_send_cpu(cpu, IPI_INVLOP);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
curcpu_cb(pmap, addr1, addr2);
|
curcpu_cb(pmap, addr1, addr2);
|
||||||
while ((cpu = CPU_FFS(&other_cpus)) != 0) {
|
while ((cpu = CPU_FFS(&other_cpus)) != 0) {
|
||||||
|
@ -536,13 +536,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap,
|
|||||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
CPU_CLR(PCPU_GET(cpuid), &other_cpus);
|
||||||
} else {
|
} else {
|
||||||
other_cpus = mask;
|
other_cpus = mask;
|
||||||
while ((cpu = CPU_FFS(&mask)) != 0) {
|
ipi_selected(mask, vector);
|
||||||
cpu--;
|
|
||||||
CPU_CLR(cpu, &mask);
|
|
||||||
CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__,
|
|
||||||
cpu, vector);
|
|
||||||
ipi_send_cpu(cpu, vector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
curcpu_cb(pmap, addr1, addr2);
|
curcpu_cb(pmap, addr1, addr2);
|
||||||
while ((cpu = CPU_FFS(&other_cpus)) != 0) {
|
while ((cpu = CPU_FFS(&other_cpus)) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user