diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 15:02:59 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 15:02:59 +0000 |
commit | d8fc2211ac6dad4fe5c8f465ad7cfaee2ef87255 (patch) | |
tree | a945b6f79736e4c313088cd2caaa345b614fde05 | |
parent | 3b2eea602e7cc90a2c7d17ef28991a211776bd3c (diff) |
Don't use pmap_update when we mean tlbflush. make pmap_update into a noop.
-rw-r--r-- | sys/arch/i386/i386/db_memrw.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 22 | ||||
-rw-r--r-- | sys/arch/i386/include/pmap.h | 8 |
4 files changed, 23 insertions, 23 deletions
diff --git a/sys/arch/i386/i386/db_memrw.c b/sys/arch/i386/i386/db_memrw.c index 9e17d2a2429..17a28bed671 100644 --- a/sys/arch/i386/i386/db_memrw.c +++ b/sys/arch/i386/i386/db_memrw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_memrw.c,v 1.4 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: db_memrw.c,v 1.5 2001/11/28 15:02:58 art Exp $ */ /* $NetBSD: db_memrw.c,v 1.6 1999/04/12 20:38:19 pk Exp $ */ /* @@ -91,7 +91,7 @@ db_write_bytes(addr, size, data) oldmap1 = *ptep1; *(int *)ptep1 |= /* INTEL_PTE_WRITE */ PG_RW; } - pmap_update(); + tlbflush(); } dst = (char *)addr; @@ -103,6 +103,6 @@ db_write_bytes(addr, size, data) *ptep0 = oldmap0; if (ptep1) *ptep1 = oldmap1; - pmap_update(); + tlbflush(); } } diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 72894a35231..169a2a58be3 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.184 2001/11/28 13:47:38 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.185 2001/11/28 15:02:58 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2209,7 +2209,7 @@ init386(first_avail) #ifdef DEBUG printf("\n"); #endif - pmap_update(); + tlbflush(); #if 0 #if NISADMA > 0 /* @@ -2377,7 +2377,7 @@ cpu_reset() * entire address space. */ bzero((caddr_t)PTD, NBPG); - pmap_update(); + tlbflush(); #endif for (;;); @@ -2669,7 +2669,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) pmap_update_pg(va); } } - pmap_update(); + tlbflush(); return 0; } @@ -3099,7 +3099,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } - pmap_update(); + tlbflush(); return (0); } diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index caaa1791e11..2e99c633ee8 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.49 2001/11/28 14:13:06 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.50 2001/11/28 15:02:58 art Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -579,7 +579,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); } @@ -668,7 +668,7 @@ pmap_kremove(va, len) } #if defined(I386_CPU) if (cpu_class == CPUCLASS_386) - pmap_update(); + tlbflush(); #endif } @@ -921,7 +921,7 @@ pmap_bootstrap(kva_start) * ensure the TLB is sync'd with reality by flushing it... */ - pmap_update(); + tlbflush(); } /* @@ -1637,7 +1637,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) { @@ -2473,12 +2473,12 @@ pmap_remove(pmap, sva, eva) 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( @@ -2593,7 +2593,7 @@ pmap_page_remove(pg) PMAP_HEAD_TO_MAP_UNLOCK(); #if defined(I386_CPU) if (needs_update) - pmap_update(); + tlbflush(); #endif } @@ -2735,7 +2735,7 @@ pmap_change_attrs(pg, setbits, clearbits) #if defined(I386_CPU) if (needs_update) - pmap_update(); + tlbflush(); #endif return(result != 0); } @@ -2863,12 +2863,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[ diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h index d02d70e51f1..c024a60a4e8 100644 --- a/sys/arch/i386/include/pmap.h +++ b/sys/arch/i386/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.18 2001/11/07 02:55:50 art Exp $ */ +/* $OpenBSD: pmap.h,v 1.19 2001/11/28 15:02:58 art Exp $ */ /* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */ /* @@ -375,7 +375,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_update() tlbflush() +#define pmap_update() /* nada */ #define pmap_clear_modify(pg) pmap_change_attrs(pg, 0, PG_M) #define pmap_clear_reference(pg) pmap_change_attrs(pg, 0, PG_U) @@ -431,7 +431,7 @@ pmap_update_pg(va) { #if defined(I386_CPU) if (cpu_class == CPUCLASS_386) - pmap_update(); + tlbflush(); else #endif invlpg((u_int) va); @@ -447,7 +447,7 @@ pmap_update_2pg(va, vb) { #if defined(I386_CPU) if (cpu_class == CPUCLASS_386) - pmap_update(); + tlbflush(); else #endif { |