Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/mp_machdep.c
Show First 20 Lines • Show All 667 Lines • ▼ Show 20 Lines | smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, | ||||
if (kdb_active || KERNEL_PANICKED() || !smp_started) | if (kdb_active || KERNEL_PANICKED() || !smp_started) | ||||
goto local_cb; | goto local_cb; | ||||
KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); | KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); | ||||
/* | /* | ||||
* Check for other cpus. Return if none. | * Check for other cpus. Return if none. | ||||
*/ | */ | ||||
if (CPU_ISFULLSET(&mask)) { | if (!CPU_CMP(&mask, &all_cpus)) { | ||||
if (mp_ncpus <= 1) | if (mp_ncpus <= 1) | ||||
goto local_cb; | goto local_cb; | ||||
} else { | } else { | ||||
CPU_CLR(PCPU_GET(cpuid), &mask); | CPU_CLR(PCPU_GET(cpuid), &mask); | ||||
if (CPU_EMPTY(&mask)) | if (CPU_EMPTY(&mask)) | ||||
goto local_cb; | goto local_cb; | ||||
} | } | ||||
Show All 29 Lines | while ((cpu = CPU_FFS(&mask1)) != 0) { | ||||
*invl_scoreboard_slot(cpu) = 0; | *invl_scoreboard_slot(cpu) = 0; | ||||
} | } | ||||
/* | /* | ||||
* IPI acts as a fence between writing to the scoreboard above | * IPI acts as a fence between writing to the scoreboard above | ||||
* (zeroing slot) and reading from it below (wait for | * (zeroing slot) and reading from it below (wait for | ||||
* acknowledgment). | * acknowledgment). | ||||
*/ | */ | ||||
if (CPU_ISFULLSET(&mask)) { | if (!CPU_CMP(&mask, &all_cpus)) { | ||||
ipi_all_but_self(IPI_INVLOP); | ipi_all_but_self(IPI_INVLOP); | ||||
other_cpus = all_cpus; | other_cpus = all_cpus; | ||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus); | CPU_CLR(PCPU_GET(cpuid), &other_cpus); | ||||
} else { | } else { | ||||
other_cpus = mask; | other_cpus = mask; | ||||
ipi_selected(mask, IPI_INVLOP); | ipi_selected(mask, IPI_INVLOP); | ||||
} | } | ||||
curcpu_cb(pmap, addr1, addr2); | curcpu_cb(pmap, addr1, addr2); | ||||
▲ Show 20 Lines • Show All 419 Lines • Show Last 20 Lines |