Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/mp_x86.c
Show First 20 Lines • Show All 1,500 Lines • ▼ Show 20 Lines | |||||
SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, mp_ipi_intrcnt, NULL); | SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, mp_ipi_intrcnt, NULL); | ||||
#endif | #endif | ||||
/* | /* | ||||
* Flush the TLB on other CPU's | * Flush the TLB on other CPU's | ||||
*/ | */ | ||||
/* Variables needed for SMP tlb shootdown. */ | /* Variables needed for SMP tlb shootdown. */ | ||||
static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; | vm_offset_t smp_tlb_addr1, smp_tlb_addr2; | ||||
pmap_t smp_tlb_pmap; | pmap_t smp_tlb_pmap; | ||||
volatile uint32_t smp_tlb_generation; | volatile uint32_t smp_tlb_generation; | ||||
#ifdef __amd64__ | #ifdef __amd64__ | ||||
#define read_eflags() read_rflags() | #define read_eflags() read_rflags() | ||||
#endif | #endif | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | if (smp_started) { | ||||
smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); | smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); | ||||
#ifdef COUNT_XINVLTLB_HITS | #ifdef COUNT_XINVLTLB_HITS | ||||
ipi_global++; | ipi_global++; | ||||
#endif | #endif | ||||
} | } | ||||
} | } | ||||
void | void | ||||
smp_masked_invlpg(cpuset_t mask, vm_offset_t addr) | smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap) | ||||
{ | { | ||||
if (smp_started) { | if (smp_started) { | ||||
smp_targeted_tlb_shootdown(mask, IPI_INVLPG, NULL, addr, 0); | smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0); | ||||
#ifdef COUNT_XINVLTLB_HITS | #ifdef COUNT_XINVLTLB_HITS | ||||
ipi_page++; | ipi_page++; | ||||
#endif | #endif | ||||
} | } | ||||
} | } | ||||
void | void | ||||
smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2) | smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, | ||||
pmap_t pmap) | |||||
{ | { | ||||
if (smp_started) { | if (smp_started) { | ||||
smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, NULL, | smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, | ||||
addr1, addr2); | addr1, addr2); | ||||
#ifdef COUNT_XINVLTLB_HITS | #ifdef COUNT_XINVLTLB_HITS | ||||
ipi_range++; | ipi_range++; | ||||
ipi_range_size += (addr2 - addr1) / PAGE_SIZE; | ipi_range_size += (addr2 - addr1) / PAGE_SIZE; | ||||
#endif | #endif | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |