Don't equate pmap_update() with tlbflush(), but instead call
tlbflush() when that's what we mean (currently everywhere, except in the one place in MI code where it is called). The whole pmap_update() thing needs to be reexamined, but this helps to clarify things a little with the currently-defined semantics of that function.
This commit is contained in:
parent
6e6337b43d
commit
bee6e31c0d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.425 2000/12/22 22:58:53 jdolecek Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.426 2001/01/01 22:13:54 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -2443,7 +2443,7 @@ cpu_reset()
|
||||
* entire address space and doing a TLB flush.
|
||||
*/
|
||||
memset((caddr_t)PTD, 0, PAGE_SIZE);
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
|
||||
for (;;);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.115 2000/12/07 21:53:46 thorpej Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.116 2001/01/01 22:13:54 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -571,7 +571,7 @@ pmap_map_ptes(pmap)
|
||||
if (!pmap_valid_entry(opde) || (opde & PG_FRAME) != pmap->pm_pdirpa) {
|
||||
*APDP_PDE = (pd_entry_t) (pmap->pm_pdirpa | PG_RW | PG_V);
|
||||
if (pmap_valid_entry(opde))
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
}
|
||||
return(APTE_BASE);
|
||||
}
|
||||
@ -676,7 +676,7 @@ pmap_kremove(va, len)
|
||||
}
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -722,7 +722,7 @@ pmap_kenter_pgs(va, pgs, npgs)
|
||||
}
|
||||
#if defined(I386_CPU)
|
||||
if (need_update && cpu_class == CPUCLASS_386)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -938,7 +938,7 @@ pmap_bootstrap(kva_start)
|
||||
* ensure the TLB is sync'd with reality by flushing it...
|
||||
*/
|
||||
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1661,7 +1661,7 @@ pmap_steal_ptp(obj, offset)
|
||||
pmaps_hand->pm_pdir[idx] = 0; /* zap! */
|
||||
pmaps_hand->pm_stats.resident_count--;
|
||||
if (pmap_is_curpmap(pmaps_hand))
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
else if (pmap_valid_entry(*APDP_PDE) &&
|
||||
(*APDP_PDE & PG_FRAME) ==
|
||||
pmaps_hand->pm_pdirpa) {
|
||||
@ -2563,12 +2563,12 @@ pmap_do_remove(pmap, sva, eva, flags)
|
||||
if (prr && prr->prr_npages) {
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386) {
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
} else
|
||||
#endif
|
||||
{ /* not I386 */
|
||||
if (prr->prr_npages > PMAP_RR_MAX) {
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
} else {
|
||||
while (prr->prr_npages) {
|
||||
pmap_update_pg(
|
||||
@ -2686,7 +2686,7 @@ pmap_page_remove(pg)
|
||||
PMAP_HEAD_TO_MAP_UNLOCK();
|
||||
#if defined(I386_CPU)
|
||||
if (needs_update)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2831,7 +2831,7 @@ pmap_change_attrs(pg, setbits, clearbits)
|
||||
|
||||
#if defined(I386_CPU)
|
||||
if (needs_update)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
return(result != 0);
|
||||
}
|
||||
@ -2959,12 +2959,12 @@ pmap_write_protect(pmap, sva, eva, prot)
|
||||
if (prr && prr->prr_npages) {
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386) {
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
} else
|
||||
#endif
|
||||
{ /* not I386 */
|
||||
if (prr->prr_npages > PMAP_RR_MAX) {
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
} else {
|
||||
while (prr->prr_npages) {
|
||||
pmap_update_pg(prr->prr_vas[
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.95 2000/11/14 22:55:06 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.96 2001/01/01 22:13:55 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -334,7 +334,7 @@ pagemove(from, to, size)
|
||||
}
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.h,v 1.51 2000/12/06 03:13:47 chs Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.52 2001/01/01 22:13:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -354,7 +354,7 @@ extern int pmap_pg_g; /* do we support PG_G? */
|
||||
#define pmap_kernel() (&kernel_pmap_store)
|
||||
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
|
||||
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
|
||||
#define pmap_update() tlbflush()
|
||||
#define pmap_update() /* nothing (yet) */
|
||||
|
||||
#define pmap_clear_modify(pg) pmap_change_attrs(pg, 0, PG_M)
|
||||
#define pmap_clear_reference(pg) pmap_change_attrs(pg, 0, PG_U)
|
||||
@ -412,7 +412,7 @@ pmap_update_pg(va)
|
||||
{
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
else
|
||||
#endif
|
||||
invlpg((u_int) va);
|
||||
@ -428,7 +428,7 @@ pmap_update_2pg(va, vb)
|
||||
{
|
||||
#if defined(I386_CPU)
|
||||
if (cpu_class == CPUCLASS_386)
|
||||
pmap_update();
|
||||
tlbflush();
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user