mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Purge the translation cache of APs before we unleash them. To that
end, make pmap_invalidate_all() global and have it only handle the local CPU -- i.e. no rendezvous. We do not use pmap_invalidate_all other than during initialization. Note that the BSP already purges its TC -- it was missing for APs only. Nonetheless, this so far seems to eliminate random problems.
This commit is contained in:
parent
f955880f7b
commit
3598d9555a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257477
@ -240,6 +240,8 @@ ia64_ap_startup(void)
|
||||
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
|
||||
PCPU_SET(curthread, PCPU_GET(idlethread));
|
||||
|
||||
pmap_invalidate_all();
|
||||
|
||||
atomic_add_int(&ia64_ap_state.as_awake, 1);
|
||||
while (!smp_started)
|
||||
cpu_spinwait();
|
||||
|
@ -262,7 +262,6 @@ static vm_page_t pmap_pv_reclaim(pmap_t locked_pmap);
|
||||
static void pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va,
|
||||
vm_page_t m, vm_prot_t prot);
|
||||
static void pmap_free_pte(struct ia64_lpte *pte, vm_offset_t va);
|
||||
static void pmap_invalidate_all(void);
|
||||
static int pmap_remove_pte(pmap_t pmap, struct ia64_lpte *pte,
|
||||
vm_offset_t va, pv_entry_t pv, int freepte);
|
||||
static int pmap_remove_vhpt(vm_offset_t va);
|
||||
@ -537,13 +536,12 @@ pmap_invalidate_page(vm_offset_t va)
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
pmap_invalidate_all_1(void *arg)
|
||||
void
|
||||
pmap_invalidate_all(void)
|
||||
{
|
||||
uint64_t addr;
|
||||
int i, j;
|
||||
|
||||
critical_enter();
|
||||
addr = pmap_ptc_e_base;
|
||||
for (i = 0; i < pmap_ptc_e_count1; i++) {
|
||||
for (j = 0; j < pmap_ptc_e_count2; j++) {
|
||||
@ -552,20 +550,7 @@ pmap_invalidate_all_1(void *arg)
|
||||
}
|
||||
addr += pmap_ptc_e_stride1;
|
||||
}
|
||||
critical_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
pmap_invalidate_all(void)
|
||||
{
|
||||
|
||||
#ifdef SMP
|
||||
if (mp_ncpus > 1) {
|
||||
smp_rendezvous(NULL, pmap_invalidate_all_1, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
pmap_invalidate_all_1(NULL);
|
||||
ia64_srlz_i();
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
@ -122,6 +122,7 @@ extern int pmap_vhpt_log2size;
|
||||
|
||||
vm_offset_t pmap_alloc_vhpt(void);
|
||||
void pmap_bootstrap(void);
|
||||
void pmap_invalidate_all(void);
|
||||
void pmap_kenter(vm_offset_t va, vm_offset_t pa);
|
||||
vm_paddr_t pmap_kextract(vm_offset_t va);
|
||||
void pmap_kremove(vm_offset_t);
|
||||
|
Loading…
Reference in New Issue
Block a user