-/* $OpenBSD: pmap7.c,v 1.31 2016/07/31 22:27:07 kettenis Exp $ */
+/* $OpenBSD: pmap7.c,v 1.32 2016/08/03 11:52:43 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
*ptep = npte;
PTE_SYNC(ptep);
/* Flush the TLB entry if a current pmap. */
- if (l2pte_valid(opte)) {
- if (PV_BEEN_EXECD(oflags))
- pmap_tlb_flushID_SE(pm, pv->pv_va);
- else
- pmap_tlb_flushD_SE(pm, pv->pv_va);
- }
+ if (l2pte_valid(opte))
+ pmap_tlb_flushID_SE(pm, pv->pv_va);
}
NPDEBUG(PDB_BITS,
ptep = &l2b->l2b_kva[l2pte_index(va)];
opte = *ptep;
npte = pa;
- oflags = 0;
if (opte != 0) { /* not l2pte_valid!!! MIOD */
/*
* must remove it from the PV list
*/
pve = pmap_remove_pv(opg, pm, va);
- oflags = pve->pv_flags;
} else
if ((pve = pool_get(&pmap_pv_pool, PR_NOWAIT)) == NULL){
if ((flags & PMAP_CANFAIL) == 0)
* at this address.
*/
pve = pmap_remove_pv(opg, pm, va);
- oflags = pve->pv_flags;
-
pool_put(&pmap_pv_pool, pve);
}
}
}
}
- if (l2pte_valid(opte)) {
- if (PV_BEEN_EXECD(oflags))
- pmap_tlb_flushID_SE(pm, va);
- else
- pmap_tlb_flushD_SE(pm, va);
- }
+ if (l2pte_valid(opte))
+ pmap_tlb_flushID_SE(pm, va);
}
/*
struct l2_bucket *l2b;
vaddr_t next_bucket;
pt_entry_t *ptep;
- u_int mappings, is_exec;
+ u_int mappings;
NPDEBUG(PDB_REMOVE, printf("pmap_remove: pmap=%p sva=%08lx eva=%08lx\n",
pm, sva, eva));
pm->pm_stats.resident_count--;
pa = l2pte_pa(pte);
- is_exec = 0;
/*
* Update flags. In a number of circumstances,
if (pg != NULL) {
struct pv_entry *pve;
pve = pmap_remove_pv(pg, pm, sva);
- if (pve != NULL) {
- is_exec = PV_BEEN_EXECD(pve->pv_flags);
+ if (pve != NULL)
pool_put(&pmap_pv_pool, pve);
- }
}
/*
*ptep = L2_TYPE_INV;
PTE_SYNC(ptep);
- if (l2pte_valid(pte)) {
- if (is_exec)
- pmap_tlb_flushID_SE(pm, sva);
- else
- pmap_tlb_flushD_SE(pm, sva);
- }
+ if (l2pte_valid(pte))
+ pmap_tlb_flushID_SE(pm, sva);
sva += PAGE_SIZE;
ptep++;
if (flush >= 0) {
flush++;
- if (l2pte_valid(opte)) {
- if (PV_BEEN_EXECD(f))
- cpu_tlb_flushID_SE(sva);
- else
- cpu_tlb_flushD_SE(sva);
- }
+ if (l2pte_valid(opte))
+ cpu_tlb_flushID_SE(sva);
} else
flags |= f;
}
}
}
- if (flush < 0) {
- if (PV_BEEN_EXECD(flags))
- pmap_tlb_flushID(pm);
- else
- pmap_tlb_flushD(pm);
- }
+ if (flush < 0)
+ pmap_tlb_flushID(pm);
+
NPDEBUG(PDB_PROTECT, printf("\n"));
}