diff options
Diffstat (limited to 'sys')
58 files changed, 190 insertions, 109 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index ab12c4c4a4b..c9b7f85e0fb 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.60 2001/11/28 16:13:27 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.61 2001/12/08 02:24:05 art Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -942,6 +942,7 @@ cpu_startup() curbuf += PAGE_SIZE; curbufsize -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* * Allocate a submap for exec arguments. This map effectively diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index 7c98e6ca826..8306df273c4 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.30 2001/12/05 16:30:47 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.31 2001/12/08 02:24:05 art Exp $ */ /* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */ /*- @@ -1300,6 +1300,7 @@ pmap_destroy(pmap_t pmap) printf("pmap_release: %ld level 3 tables left\n", pmap->pm_nlev3); pmap_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS); + pmap_update(pmap); if (pmap->pm_lev1map != kernel_lev1map) panic("pmap_release: pmap_remove() didn't"); } diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c index b44203dd34e..05d78106c69 100644 --- a/sys/arch/alpha/alpha/vm_machdep.c +++ b/sys/arch/alpha/alpha/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.26 2001/11/06 19:53:13 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.27 2001/12/08 02:24:05 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.55 2000/03/29 03:49:48 simonb Exp $ */ /* @@ -348,6 +348,7 @@ vmapbuf(bp, len) faddr += PAGE_SIZE; taddr += PAGE_SIZE; } + pmap_update(vm_map_pmap(phys_map)); } /* @@ -365,6 +366,8 @@ vunmapbuf(bp, len) addr = trunc_page((vaddr_t)bp->b_data); off = (vaddr_t)bp->b_data - addr; len = round_page(off + len); + pmap_remove(vm_map_pmap(phys_map), addr, addr + len); + pmap_update(vm_map_pmap(phys_map)); uvm_km_free_wakeup(phys_map, addr, len); bp->b_data = bp->b_saveaddr; bp->b_saveaddr = NULL; diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c index a61c6cca9a7..ad2ef1b2bff 100644 --- a/sys/arch/alpha/dev/bus_dma.c +++ b/sys/arch/alpha/dev/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.7 2001/11/28 16:24:26 art Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.8 2001/12/08 02:24:05 art Exp $ */ /* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */ /*- @@ -606,6 +606,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index bcec80a1194..ddfdac77874 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.62 2001/11/30 02:09:34 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.63 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.95 1997/08/27 18:31:17 is Exp $ */ /* @@ -299,15 +299,17 @@ consinit() void cpu_startup() { - register unsigned i; - register caddr_t v, firstaddr; + unsigned i; + caddr_t v, firstaddr; int base, residual; #ifdef DEBUG extern int pmapdebug; int opmapdebug = pmapdebug; #endif - vm_offset_t minaddr, maxaddr; + vaddr_t minaddr, maxaddr; vm_size_t size = 0; + vaddr_t va; + paddr_t pa; /* * Initialize error message buffer (at end of core). @@ -322,10 +324,14 @@ cpu_startup() /* * XXX - shouldn't this be msgbufp + i * PAGE_SIZE? */ - for (i = 0; i < btoc(MSGBUFSIZE); i++) - pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp, - msgbufpa + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + va = (vaddr_t)msgbufp; + pa = (paddr_t)msgbufpa; + for (i = 0; i < btoc(MSGBUFSIZE); i++) { + pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PROT_WRITE); + va += PAGE_SIZE; + pa += PAGE_SIZE; + } + pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); /* @@ -452,6 +458,7 @@ again: curbuf += PAGE_SIZE; curbufsize -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c index e14ab32e6cd..b3b398b4549 100644 --- a/sys/arch/amiga/amiga/mem.c +++ b/sys/arch/amiga/amiga/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.16 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.17 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */ /* @@ -146,11 +146,13 @@ mmrw(dev, uio, flags) pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, (vm_offset_t)vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c index 7f29f66c40e..6dd14f0d493 100644 --- a/sys/arch/amiga/amiga/vm_machdep.c +++ b/sys/arch/amiga/amiga/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.29 2001/12/07 15:29:44 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.30 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */ /* @@ -164,6 +164,7 @@ pagemove(from, to, size) to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -331,6 +332,7 @@ vmapbuf(bp, len) kva += PAGE_SIZE; len -= PAGE_SIZE; } while (len); + pmap_update(kpmap); } /* @@ -351,10 +353,8 @@ vunmapbuf(bp, len) off = (vaddr_t)bp->b_data - kva; len = m68k_round_page(off + len); - /* - * pmap_remove() is unnecessary here, as kmem_free_wakeup() - * will do it for us. - */ + pmap_remove(pmap_kernel(), kva, kva + len); + pmap_update(pmap_kernel()); uvm_km_free_wakeup(phys_map, kva, len); bp->b_data = bp->b_saveaddr; bp->b_saveaddr = 0; diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index 25ed311bca3..5f2bdd792bd 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.19 2001/12/02 04:10:25 mickey Exp $ */ +/* $OpenBSD: mainbus.c,v 1.20 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1998-2001 Michael Shalayeff @@ -745,6 +745,7 @@ mbus_dmamem_alloc(void *v, bus_size_t size, bus_size_t alignment, #endif va += PAGE_SIZE; } + pmap_update(pmap_kernel()); return 0; } diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c index 3f70fa05e1b..2c619405486 100644 --- a/sys/arch/hppa/hppa/vm_machdep.c +++ b/sys/arch/hppa/hppa/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.29 2001/11/28 13:47:38 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.30 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1999-2000 Michael Shalayeff @@ -115,6 +115,7 @@ pagemove(from, to, size) to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } void diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 9ec0ac18e4e..9d64564f33b 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.188 2001/12/07 17:30:14 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.189 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -359,6 +359,7 @@ cpu_startup() va += PAGE_SIZE; pa += PAGE_SIZE; } + pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); printf("%s", version); @@ -617,6 +618,7 @@ setup_buffers(maxaddr) pg = TAILQ_NEXT(pg, pageq); } } + pmap_update(pmap_kernel()); } /* @@ -2670,7 +2672,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) pmap_update_pg(va); } } - tlbflush(); + pmap_update(pmap_kernel()); return 0; } @@ -3100,7 +3102,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } - tlbflush(); + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c index ae404ead9f9..5f258217f64 100644 --- a/sys/arch/i386/i386/mem.c +++ b/sys/arch/i386/i386/mem.c @@ -1,5 +1,5 @@ /* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */ -/* $OpenBSD: mem.c,v 1.21 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.22 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1982, 1986, 1990, 1993 @@ -164,11 +164,13 @@ mmrw(dev, uio, flags) pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, (vm_offset_t)vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 2572addfa68..6b2c2e37f3f 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.51 2001/11/28 16:13:28 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.52 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -1156,6 +1156,7 @@ pmap_alloc_pvpage(pmap, mode) */ pmap_kenter_pa(pv_cachedva, VM_PAGE_TO_PHYS(pg), VM_PROT_ALL); + pmap_update(pmap_kernel()); pvpage = (struct pv_page *) pv_cachedva; pv_cachedva = 0; return(pmap_add_pvpage(pvpage, mode != ALLOCPV_NONEED)); @@ -2030,27 +2031,6 @@ pmap_virtual_space(startp, endp) } /* - * pmap_map: map a range of PAs into kvm - * - * => used during crash dump - * => XXX: pmap_map() should be phased out? - */ - -vaddr_t -pmap_map(va, spa, epa, prot) - vaddr_t va; - paddr_t spa, epa; - vm_prot_t prot; -{ - while (spa < epa) { - pmap_enter(pmap_kernel(), va, spa, prot, 0); - va += NBPG; - spa += NBPG; - } - return va; -} - -/* * pmap_zero_page: zero a page */ @@ -2940,6 +2920,7 @@ pmap_collect(pmap) */ pmap_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS); + pmap_update(pmap); } /* diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index 4696e6f3921..f963f1a2402 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.35 2001/12/07 17:30:14 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.36 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.61 1996/05/03 19:42:35 christos Exp $ */ /*- @@ -354,6 +354,7 @@ vmapbuf(bp, len) taddr += PAGE_SIZE; len -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -373,6 +374,7 @@ vunmapbuf(bp, len) off = (vm_offset_t)bp->b_data - addr; len = round_page(off + len); pmap_kremove(addr, len); + pmap_update(pmap_kernel()); uvm_km_free_wakeup(phys_map, addr, len); bp->b_data = bp->b_saveaddr; bp->b_saveaddr = 0; diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index 60c38f6892d..0aac93264fb 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.39 2001/11/06 18:41:09 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.40 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -220,7 +220,6 @@ int isa_nmi __P((void)); /* pmap.c */ void pmap_bootstrap __P((vm_offset_t)); -vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); /* vm_machdep.c */ int kvtop __P((caddr_t)); diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h index ab91dd6240b..68a81230988 100644 --- a/sys/arch/i386/include/pmap.h +++ b/sys/arch/i386/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.21 2001/12/04 23:22:42 art Exp $ */ +/* $OpenBSD: pmap.h,v 1.22 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */ /* @@ -502,8 +502,6 @@ pmap_protect(pmap, sva, eva, prot) } } -vaddr_t pmap_map __P((vaddr_t, paddr_t, paddr_t, vm_prot_t)); - #if defined(USER_LDT) void pmap_ldt_cleanup __P((struct proc *)); #define PMAP_FORK diff --git a/sys/arch/m68k/m68k/mappedcopy.c b/sys/arch/m68k/m68k/mappedcopy.c index 47fb5ded5e9..6ff97081ae7 100644 --- a/sys/arch/m68k/m68k/mappedcopy.c +++ b/sys/arch/m68k/m68k/mappedcopy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mappedcopy.c,v 1.8 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: mappedcopy.c,v 1.9 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: mappedcopy.c,v 1.1 1997/02/02 06:54:10 thorpej Exp $ */ /* @@ -112,6 +112,7 @@ mappedcopyin(fromp, top, count) len = min(count, (PAGE_SIZE - off)); pmap_enter(pmap_kernel(), kva, upa, VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); + pmap_update(pmap_kernel()); if (len == PAGE_SIZE && alignable && off == 0) copypage((caddr_t)kva, top); else @@ -122,6 +123,7 @@ mappedcopyin(fromp, top, count) off = 0; } pmap_remove(pmap_kernel(), kva, kva + PAGE_SIZE); + pmap_update(pmap_kernel()); return (0); } @@ -164,6 +166,7 @@ mappedcopyout(fromp, top, count) pmap_enter(pmap_kernel(), kva, upa, VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pmap_update(pmap_kernel()); if (len == PAGE_SIZE && alignable && off == 0) copypage(fromp, (caddr_t)kva); else @@ -174,5 +177,6 @@ mappedcopyout(fromp, top, count) off = 0; } pmap_remove(pmap_kernel(), kva, kva + PAGE_SIZE); + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index d9587bb506f..1c12b1d9127 100644 --- a/sys/arch/m68k/m68k/pmap_motorola.c +++ b/sys/arch/m68k/m68k/pmap_motorola.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.c,v 1.4 2001/12/06 01:03:58 miod Exp $ */ +/* $OpenBSD: pmap_motorola.c,v 1.5 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -832,6 +832,7 @@ pmap_release(pmap) if (pmap->pm_ptab) { pmap_remove(pmap_kernel(), (vaddr_t)pmap->pm_ptab, (vaddr_t)pmap->pm_ptab + MACHINE_MAX_PTSIZE); + pmap_update(pmap_kernel()); uvm_km_pgremove(uvm.kernel_object, (vaddr_t)pmap->pm_ptab, (vaddr_t)pmap->pm_ptab + MACHINE_MAX_PTSIZE); uvm_km_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab, @@ -2406,6 +2407,7 @@ pmap_remove_mapping(pmap, va, pte, flags) pmap_remove(pmap_kernel(), (vaddr_t)ptpmap->pm_stab, (vaddr_t)ptpmap->pm_stab + MACHINE_STSIZE); + pmap_update(pmap_kernel()); uvm_pagefree(PHYS_TO_VM_PAGE((paddr_t) ptpmap->pm_stpa)); uvm_km_free_wakeup(st_map, diff --git a/sys/arch/mac68k/dev/nubus.c b/sys/arch/mac68k/dev/nubus.c index b6b48029a90..ee321500dd6 100644 --- a/sys/arch/mac68k/dev/nubus.c +++ b/sys/arch/mac68k/dev/nubus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nubus.c,v 1.22 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: nubus.c,v 1.23 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: nubus.c,v 1.35 1997/04/22 20:20:32 scottr Exp $ */ /* @@ -832,6 +832,7 @@ nubus_mapin(paddr, sz) pa += NBPG; } while ((sz -= NBPG) > 0); #endif + pmap_update(pmap_kernel()); return ((char*)retval); } diff --git a/sys/arch/mac68k/mac68k/bus_space.c b/sys/arch/mac68k/mac68k/bus_space.c index 3b6756354c4..61acfdc96dc 100644 --- a/sys/arch/mac68k/mac68k/bus_space.c +++ b/sys/arch/mac68k/mac68k/bus_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_space.c,v 1.13 2001/11/28 15:34:16 art Exp $ */ +/* $OpenBSD: bus_space.c,v 1.14 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: bus_space.c,v 1.5 1999/03/26 23:41:30 mycroft Exp $ */ /*- @@ -182,6 +182,7 @@ bus_mem_add_mapping(bpa, size, flags, bshp) *pte |= PG_CI; TBIA(); } + pmap_update(pmap_kernel()); return 0; } diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index fcbd4a32b20..7e438fd4462 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.90 2001/11/28 16:13:28 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.91 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -346,6 +346,7 @@ cpu_startup(void) high[numranges - 1] + i * NBPG, VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); /* @@ -475,12 +476,12 @@ again: if (pg == NULL) panic("cpu_startup: not enough memory for " "buffer cache"); - pmap_enter(kernel_map->pmap, curbuf, - VM_PAGE_TO_PHYS(pg), VM_PROT_ALL, - VM_PROT_ALL|PMAP_WIRED); + pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg), + VM_PROT_READ|VM_PROT_WRITE); curbuf += PAGE_SIZE; curbufsize -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* * Allocate a submap for exec arguments. This map effectively @@ -705,7 +706,7 @@ haltsys: /* Map the last physical page VA = PA for doboot() */ pmap_enter(pmap_kernel(), (vm_offset_t)maxaddr, (vm_offset_t)maxaddr, VM_PROT_ALL, VM_PROT_ALL|PMAP_WIRED); - + pmap_update(pmap_kernel()); printf("rebooting...\n"); DELAY(1000000); @@ -897,6 +898,7 @@ dumpsys() } pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, maddr, VM_PROT_READ, VM_PROT_READ|PMAP_WIRED); + pmap_update(pmap_kernel()); error = (*dump)(dumpdev, blkno, vmmap, NBPG); bad: diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c index d6c350ad79a..641b396d880 100644 --- a/sys/arch/mac68k/mac68k/mem.c +++ b/sys/arch/mac68k/mac68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.16 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.17 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: mem.c,v 1.22 1999/03/27 00:30:07 mycroft Exp $ */ /* @@ -147,11 +147,13 @@ mmrw(dev, uio, flags) VM_PROT_WRITE; pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page(v), prot, prot|PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), (vaddr_t)vmmap, (vaddr_t)vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c index 521aee4568f..c43bbe6991f 100644 --- a/sys/arch/mac68k/mac68k/trap.c +++ b/sys/arch/mac68k/mac68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.33 2001/11/28 16:13:28 art Exp $ */ +/* $OpenBSD: trap.c,v 1.34 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: trap.c,v 1.68 1998/12/22 08:47:07 scottr Exp $ */ /* @@ -735,12 +735,14 @@ writeback(fp, docachepush) pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page((vaddr_t)f->f_fa), VM_PROT_WRITE, VM_PROT_WRITE|PMAP_WIRED); + pmap_update(pmap_kernel()); fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF]; bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16); pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa); DCFL(pa); pmap_remove(pmap_kernel(), (vaddr_t)vmmap, (vaddr_t)&vmmap[NBPG]); + pmap_update(pmap_kernel()); } else printf("WARNING: pid %d(%s) uid %d: CPUSH not done\n", p->p_pid, p->p_comm, p->p_ucred->cr_uid); diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c index 62b397d6d2c..eddc3f3a209 100644 --- a/sys/arch/mac68k/mac68k/vm_machdep.c +++ b/sys/arch/mac68k/mac68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.27 2001/12/07 00:59:16 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.28 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.29 1998/07/28 18:34:55 thorpej Exp $ */ /* @@ -237,15 +237,13 @@ pagemove(from, to, size) panic("pagemove 3"); #endif #endif - pmap_remove(pmap_kernel(), - (vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE); - pmap_enter(pmap_kernel(), - (vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); + pmap_kremove((vaddr_t)from, PAGE_SIZE); + pmap_kenter_pa((vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE); from += PAGE_SIZE; to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -337,6 +335,7 @@ vmapbuf(bp, len) kva += PAGE_SIZE; len -= PAGE_SIZE; } while (len); + pmap_update(pmap_kernel()); } /* diff --git a/sys/arch/macppc/macppc/dma.c b/sys/arch/macppc/macppc/dma.c index b92c6c7e404..05692de52e6 100644 --- a/sys/arch/macppc/macppc/dma.c +++ b/sys/arch/macppc/macppc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.7 2001/11/28 16:24:26 art Exp $ */ +/* $OpenBSD: dma.c,v 1.8 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -405,6 +405,7 @@ _dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index e4f8fecdc67..dfc242a6df7 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.17 2001/11/28 16:13:28 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.18 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -583,6 +583,7 @@ cpu_startup() curbufsize -= PAGE_SIZE; } } + pmap_update(pmap_kernel()); /* * Allocate a submap for exec arguments. This map effectively @@ -1174,6 +1175,7 @@ bus_space_unmap(t, bsh, size) } #endif pmap_remove(vm_map_pmap(phys_map), sva, sva+len); + pmap_update(pmap_kernel()); } int @@ -1300,7 +1302,7 @@ unmapiodev(kva, p_size) #endif vaddr += PAGE_SIZE; } - return; + pmap_update(pmap_kernel()); } diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c index 1cdc61e33fd..73ab9c29def 100644 --- a/sys/arch/macppc/macppc/ofw_machdep.c +++ b/sys/arch/macppc/macppc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.4 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.5 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -197,6 +197,7 @@ restore_ofw_mapping() size -= NBPG; } } + pmap_update(pmap_kernel()); return 0; } diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index fc1877788d8..e4d05ca2c5e 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.60 2001/11/30 02:12:09 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.61 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -259,6 +259,7 @@ cpu_startup() for (i = 0; i < btoc(MSGBUFSIZE); i++) pmap_kenter_pa((vm_offset_t)msgbufp, avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE); + pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); /* @@ -380,6 +381,7 @@ again: curbufsize -= PAGE_SIZE; } } + pmap_update(pmap_kernel()); /* * Allocate a submap for exec arguments. This map effectively @@ -856,8 +858,11 @@ dumpsys() printf("%d ", pg / NPGMB); #undef NPGMB pmap_kenter_pa((vaddr_t)vmmap, maddr, VM_PROT_READ); - + pmap_update(pmap_kernel()); error = (*dump)(dumpdev, blkno, vmmap, PAGE_SIZE); + pmap_kremove((vaddr_t)vmmap, PAGE_SIZE); + pmap_update(pmap_kernel()); + if (error == 0) { maddr += PAGE_SIZE; blkno += btodb(PAGE_SIZE); diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c index 443b8a1f9a8..b828e285990 100644 --- a/sys/arch/mvme68k/mvme68k/mem.c +++ b/sys/arch/mvme68k/mvme68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.17 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.18 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -165,12 +165,13 @@ mmrw(dev, uio, flags) trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, (uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE) | PMAP_WIRED); - + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, (vm_offset_t)vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index 5e8424b24ab..8914bc10e54 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.40 2001/11/28 16:13:28 art Exp $ */ +/* $OpenBSD: trap.c,v 1.41 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -713,12 +713,14 @@ writeback(fp, docachepush) pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, trunc_page(f->f_fa), VM_PROT_WRITE, VM_PROT_WRITE|PMAP_WIRED); + pmap_update(pmap_kernel()); fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF]; bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16); pmap_extract(pmap_kernel(), (vm_offset_t)fa, &pa); DCFL(pa); pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, (vm_offset_t)&vmmap[NBPG]); + pmap_update(pmap_kernel()); } else printf("WARNING: pid %d(%s) uid %d: CPUSH not done\n", p->p_pid, p->p_comm, p->p_ucred->cr_uid); diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index 220dc50485f..eac4c6d4a47 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.32 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.33 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -178,6 +178,7 @@ pagemove(from, to, size) to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -270,6 +271,7 @@ vmapbuf(bp, siz) addr += PAGE_SIZE; kva += PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index ddaafb93240..f0fed8abeda 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.69 2001/11/30 23:16:51 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.70 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -479,6 +479,7 @@ cpu_startup() for (i = 0; i < btoc(MSGBUFSIZE); i++) pmap_kenter_pa((vm_offset_t)msgbufp, avail_end + i * NBPG, VM_PROT_READ|VM_PROT_WRITE); + pmap_update(pmap_kernel()); initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE)); /* @@ -633,6 +634,7 @@ cpu_startup() curbufsize -= PAGE_SIZE; } } + pmap_update(pmap_kernel()); /* * Allocate a submap for exec arguments. This map effectively diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c index 7ca64cfc69d..edbac9bb2e1 100644 --- a/sys/arch/mvme88k/mvme88k/mem.c +++ b/sys/arch/mvme88k/mvme88k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.13 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.14 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -138,11 +138,13 @@ mmrw(dev, uio, flags) pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), (vm_offset_t)vmmap, (vm_offset_t)vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c index 8cff090213c..682d657c21a 100644 --- a/sys/arch/mvme88k/mvme88k/vm_machdep.c +++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.40 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.41 2001/12/08 02:24:06 art Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. @@ -264,6 +264,7 @@ vmapbuf(bp, len) kva += PAGE_SIZE; len -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -338,6 +339,7 @@ iomap_mapin(vm_offset_t pa, vm_size_t len, boolean_t canwait) tva += PAGE_SIZE; ppa += PAGE_SIZE; } + pmap_update(pmap_kernel()); #ifndef NEW_MAPPING return (iova + off); #else @@ -360,6 +362,7 @@ iomap_mapout(vm_offset_t kva, vm_size_t len) len = round_page(off + len); pmap_remove(vm_map_pmap(iomap_map), kva, kva + len); + pmap_update(vm_map_pmap(iomap_map)); s = splhigh(); error = extent_free(iomap_extent, kva, len, EX_NOWAIT); @@ -409,6 +412,7 @@ mapiospace(caddr_t pa, int len) pmap_kenter_pa(phys_map_vaddr1, (vm_offset_t)pa, VM_PROT_READ|VM_PROT_WRITE); + pmap_update(pmap_kernel()); return (phys_map_vaddr1 + off); } @@ -423,6 +427,7 @@ unmapiospace(vm_offset_t va) va = trunc_page(va); pmap_kremove(va, PAGE_SIZE); + pmap_update(pmap_kernel()); } int @@ -496,6 +501,7 @@ pagemove(from, to, size) to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } u_int diff --git a/sys/arch/mvmeppc/mvmeppc/bus_dma.c b/sys/arch/mvmeppc/mvmeppc/bus_dma.c index c108948d1ea..752dac67532 100644 --- a/sys/arch/mvmeppc/mvmeppc/bus_dma.c +++ b/sys/arch/mvmeppc/mvmeppc/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.8 2001/11/09 15:14:13 art Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.9 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */ /*- @@ -521,6 +521,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 98d4ddc2623..ddb5814fca2 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.16 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.17 2001/12/08 02:24:06 art Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1155,6 +1155,7 @@ bus_space_unmap(t, bsh, size) } #endif pmap_remove(vm_map_pmap(phys_map), sva, sva+len); + pmap_update(vm_map_pmap(phys_map)); } int @@ -1260,7 +1261,7 @@ unmapiodev(kva, p_size) #endif vaddr += NBPG; } - return; + pmap_update(pmap_kernel()); } #if 0 diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index e86c63b6971..c377c226837 100644 --- a/sys/arch/powerpc/powerpc/vm_machdep.c +++ b/sys/arch/powerpc/powerpc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.27 2001/11/13 14:31:52 drahn Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.28 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 1996/09/30 16:34:57 ws Exp $ */ /* @@ -156,6 +156,7 @@ pagemove(from, to, size) va += NBPG; to += NBPG; } + pmap_update(pmap_kernel()); } /* @@ -243,6 +244,7 @@ vmapbuf(bp, len) faddr += NBPG; taddr += NBPG; } + pmap_update(pmap_kernel()); } /* diff --git a/sys/arch/sparc/dev/fga.c b/sys/arch/sparc/dev/fga.c index b9342d76021..2234c63b868 100644 --- a/sys/arch/sparc/dev/fga.c +++ b/sys/arch/sparc/dev/fga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fga.c,v 1.5 2001/11/06 19:53:16 miod Exp $ */ +/* $OpenBSD: fga.c,v 1.6 2001/12/08 02:24:07 art Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -781,9 +781,11 @@ fvmescan(parent, child, aux) if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) { pmap_remove(pmap_kernel(), TMPMAP_VA, TMPMAP_VA + NBPG); + pmap_update(pmap_kernel()); return (0); } pmap_remove(pmap_kernel(), TMPMAP_VA, TMPMAP_VA + NBPG); + pmap_update(pmap_kernel()); oca.ca_ra.ra_reg[0].rr_paddr = (void *)paddr; config_attach(parent, cf, &oca, fvmeprint); diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 781ce58e5a7..0374cd3bbb2 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.21 2001/11/29 11:29:58 art Exp $ */ +/* $OpenBSD: if_ie.c,v 1.22 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -565,6 +565,7 @@ ieattach(parent, self, aux) pmap_enter(pmap_kernel(), trunc_page(IEOB_ADBASE+IE_SCP_ADDR), (paddr_t)pa | PMAP_NC /*| PMAP_IOC*/, VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); sc->scp = (volatile struct ie_sys_conf_ptr *) (IEOB_ADBASE + IE_SCP_ADDR); diff --git a/sys/arch/sparc/dev/obio.c b/sys/arch/sparc/dev/obio.c index ee804c06d78..5b0b22b5687 100644 --- a/sys/arch/sparc/dev/obio.c +++ b/sys/arch/sparc/dev/obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obio.c,v 1.9 2001/11/06 19:53:16 miod Exp $ */ +/* $OpenBSD: obio.c,v 1.10 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: obio.c,v 1.37 1997/07/29 09:58:11 fair Exp $ */ /* @@ -663,4 +663,5 @@ void bus_untmp() { pmap_remove(pmap_kernel(), TMPMAP_VA, TMPMAP_VA+NBPG); + pmap_update(pmap_kernel()); } diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index d1b05dd2f1e..a9df174168a 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.44 2001/12/05 23:58:41 tdeval Exp $ */ +/* $OpenBSD: autoconf.c,v 1.45 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -353,6 +353,7 @@ bootstrap() pmap_kenter_pa(INTRREG_VA, INT_ENABLE_REG_PHYSADR | PMAP_NC | PMAP_OBIO, VM_PROT_READ | VM_PROT_WRITE); + pmap_update(pmap_kernel()); /* Disable all interrupts */ *((unsigned char *)INTRREG_VA) = 0; } diff --git a/sys/arch/sparc/sparc/iommu.c b/sys/arch/sparc/sparc/iommu.c index 39589a0f107..d5d6e56df4e 100644 --- a/sys/arch/sparc/sparc/iommu.c +++ b/sys/arch/sparc/sparc/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.12 2001/11/22 09:47:37 art Exp $ */ +/* $OpenBSD: iommu.c,v 1.13 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: iommu.c,v 1.13 1997/07/29 09:42:04 fair Exp $ */ /* @@ -199,6 +199,7 @@ iommu_attach(parent, self, aux) va += PAGE_SIZE; m = TAILQ_NEXT(m, pageq); } + pmap_update(pmap_kernel()); /* * Now we build our own copy of the IOMMU page tables. We need to diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index e6259a6632a..f240f3218cb 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.73 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.74 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -245,6 +245,7 @@ cpu_startup() curbufsize -= PAGE_SIZE; } } + pmap_update(pmap_kernel()); /* * Allocate a submap for exec arguments. This map effectively * limits the number of processes exec'ing at any time. @@ -868,9 +869,11 @@ dumpsys() (void) pmap_map(dumpspace, maddr, maddr + n, VM_PROT_READ); + pmap_update(pmap_kernel()); error = (*dump)(dumpdev, blkno, (caddr_t)dumpspace, (int)n); pmap_remove(pmap_kernel(), dumpspace, dumpspace + n); + pmap_update(pmap_kernel()); if (error) break; maddr += n; @@ -975,6 +978,7 @@ mapdev(phys, virt, offset, size) va += PAGE_SIZE; pa += PAGE_SIZE; } while ((size -= PAGE_SIZE) > 0); + pmap_update(pmap_kernel()); return (ret); } diff --git a/sys/arch/sparc/sparc/mem.c b/sys/arch/sparc/sparc/mem.c index 960cae0d1da..3dc66f0f3b2 100644 --- a/sys/arch/sparc/sparc/mem.c +++ b/sys/arch/sparc/sparc/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.19 2001/11/06 19:53:16 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.20 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: mem.c,v 1.13 1996/03/30 21:12:16 christos Exp $ */ /* @@ -146,10 +146,12 @@ mmrw(dev, uio, flags) pmap_enter(pmap_kernel(), mem_page, trunc_page(pa), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)mem_page + o, c, uio); pmap_remove(pmap_kernel(), mem_page, mem_page + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index dd59890a3d2..e322e8d2236 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.109 2001/12/07 18:06:49 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.110 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -245,6 +245,7 @@ pgt_page_alloc(sz, flags, mtype) pmap_kenter_pa(va, pa | (nocache ? PMAP_NC : 0), VM_PROT_READ|VM_PROT_WRITE); + pmap_update(pmap_kernel()); return ((void *)va); } @@ -3342,6 +3343,7 @@ pmap_map(va, pa, endpa, prot) va += pgsize; pa += pgsize; } + pmap_update(pmap_kernel()); return (va); } diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index c87d29e6995..215a1c5f181 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.38 2001/12/07 10:47:38 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.39 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */ /* @@ -95,6 +95,7 @@ pagemove(from, to, size) to += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* @@ -150,6 +151,7 @@ again: pa |= PMAP_NC; pmap_kenter_pa(kva + maplen, pa, VM_PROT_ALL); } + pmap_update(pmap_kernel()); *(vaddr_t *)kaddr = kva; dva = dvma_mapin_space(kernel_map, kva, len, waitok ? 1 : 0, space); @@ -167,6 +169,7 @@ dropit: pmap_kremove(kva + tmplen, PAGE_SIZE); uvm_pagefree(PHYS_TO_VM_PAGE(pa)); } + pmap_update(pmap_kernel()); uvm_km_free(kmem_map, kva, len); @@ -269,6 +272,7 @@ dvma_mapin_space(map, va, len, canwait, space) tva += PAGE_SIZE; va += PAGE_SIZE; } + pmap_update(pmap_kernel()); /* * XXX Only have to do this on write. @@ -300,7 +304,10 @@ dvma_mapout(kva, va, len) iommu_remove(kva, klen); else #endif + { pmap_remove(pmap_kernel(), kva, kva + klen); + pmap_update(pmap_kernel()); + } s = splhigh(); error = extent_free(dvmamap_extent, kva, klen, EX_NOWAIT); @@ -371,6 +378,7 @@ vmapbuf(bp, sz) kva += PAGE_SIZE; size -= PAGE_SIZE; } + pmap_update(pmap_kernel()); } /* diff --git a/sys/arch/sun3/sun3/autoconf.c b/sys/arch/sun3/sun3/autoconf.c index 8bb9ca6f98e..ef9c4dc780b 100644 --- a/sys/arch/sun3/sun3/autoconf.c +++ b/sys/arch/sun3/sun3/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.17 2001/11/06 19:53:16 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.18 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: autoconf.c,v 1.37 1996/11/20 18:57:22 gwr Exp $ */ /*- @@ -291,6 +291,7 @@ bus_mapin(bustype, paddr, sz) pa += NBPG; } while ((sz -= NBPG) > 0); #endif + pmap_update(pmap_kernel()); return ((char*)retval); } diff --git a/sys/arch/sun3/sun3/machdep.c b/sys/arch/sun3/sun3/machdep.c index 5d3a40c7ffb..d73b5675e44 100644 --- a/sys/arch/sun3/sun3/machdep.c +++ b/sys/arch/sun3/sun3/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.46 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.47 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: machdep.c,v 1.77 1996/10/13 03:47:51 christos Exp $ */ /* @@ -317,6 +317,7 @@ cpu_startup() curbufsize -= PAGE_SIZE; } } + pmap_update(kernel_map->pmap); /* * Allocate a submap for exec arguments. This map effectively @@ -788,8 +789,10 @@ dumpsys() printf("\r%4d", todo); pmap_enter(pmap_kernel(), vmmap, paddr | PMAP_NC, VM_PROT_READ, VM_PROT_READ); + pmap_update(pmap_kernel()); error = (*dsw->d_dump)(dumpdev, blkno, vaddr, NBPG); pmap_remove(pmap_kernel(), vmmap, vmmap + NBPG); + pmap_update(pmap_kernel()); if (error) goto fail; paddr += NBPG; diff --git a/sys/arch/sun3/sun3/mem.c b/sys/arch/sun3/sun3/mem.c index 3766c46972c..4de002442ce 100644 --- a/sys/arch/sun3/sun3/mem.c +++ b/sys/arch/sun3/sun3/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.17 2001/11/06 19:53:16 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.18 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: mem.c,v 1.19 1995/08/08 21:09:01 gwr Exp $ */ /* @@ -171,10 +171,12 @@ mmrw(dev, uio, flags) pmap_enter(pmap_kernel(), vmmap, trunc_page(v), uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED); + pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(NBPG - o)); error = uiomove((caddr_t)vmmap + o, c, uio); pmap_remove(pmap_kernel(), vmmap, vmmap + NBPG); + pmap_update(pmap_kernel()); continue; /* minor device 1 is kernel memory */ diff --git a/sys/arch/sun3/sun3/vm_machdep.c b/sys/arch/sun3/sun3/vm_machdep.c index 9b6daee2307..b9ae489831a 100644 --- a/sys/arch/sun3/sun3/vm_machdep.c +++ b/sys/arch/sun3/sun3/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.21 2001/11/06 18:41:10 art Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.22 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.35 1996/04/26 18:38:06 gwr Exp $ */ /* @@ -271,6 +271,7 @@ pagemove(from, to, size) to += NBPG; size -= NBPG; } + pmap_update(pmap_kernel()); } /* @@ -368,6 +369,7 @@ vunmapbuf(bp, sz) /* Actually remove mappings, which does cache flush. */ pmap_remove(pmap_kernel(), pgva, pgva + size); + pmap_update(pmap_kernel()); /* * Now remove the map entry, which may also call diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c index b5c644a7116..d067b6d14fd 100644 --- a/sys/arch/vax/vax/bus_dma.c +++ b/sys/arch/vax/vax/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.7 2001/11/28 16:24:26 art Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.8 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */ /*- @@ -475,6 +475,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); } } + pmap_update(pmap_kernel()); return (0); } diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 71ab2b0f336..84b50995374 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.47 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.48 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -250,6 +250,7 @@ cpu_startup() curbufsize -= PAGE_SIZE; } } + pmap_update(kernel_map->pmap); /* * Allocate a submap for exec arguments. This map effectively limits diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c index c71c0c6ec03..09602b5ff57 100644 --- a/sys/arch/vax/vax/pmap.c +++ b/sys/arch/vax/vax/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.27 2001/11/28 14:20:16 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.28 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */ /* * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden. @@ -706,6 +706,7 @@ if (startpmapdebug) bzero((caddr_t)(phys|KERNBASE), NBPG); pmap_kenter_pa(ptaddr, phys, VM_PROT_READ|VM_PROT_WRITE); + pmap_update(pmap_kernel()); } } if (flags & PMAP_WIRED) diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index 2e016044908..e5b51c57db8 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.28 2001/11/17 05:07:55 hugh Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.29 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */ /* @@ -335,6 +335,7 @@ vmapbuf(bp, len) faddr += PAGE_SIZE; taddr += PAGE_SIZE; } + pmap_update(vm_map_pmap(phys_map)); #endif } diff --git a/sys/ddb/db_watch.c b/sys/ddb/db_watch.c index c350d245fa8..aae83661fac 100644 --- a/sys/ddb/db_watch.c +++ b/sys/ddb/db_watch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_watch.c,v 1.6 2001/11/28 16:13:29 art Exp $ */ +/* $OpenBSD: db_watch.c,v 1.7 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: db_watch.c,v 1.9 1996/03/30 22:30:12 christos Exp $ */ /* @@ -227,7 +227,7 @@ db_set_watchpoints() trunc_page(watch->loaddr), round_page(watch->hiaddr), VM_PROT_READ); - + pmap_update(watch->map->pmap); db_watchpoints_inserted = TRUE; } } diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index b61698dd089..45a9925ade4 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.8 2001/12/02 04:29:11 mickey Exp $ */ +/* $OpenBSD: sti.c,v 1.9 2001/12/08 02:24:07 art Exp $ */ /* * Copyright (c) 2000-2001 Michael Shalayeff @@ -253,6 +253,7 @@ sti_attach_common(sc) pmap_protect(pmap_kernel(), sc->sc_code, sc->sc_code + round_page(size), VM_PROT_READ|VM_PROT_EXECUTE); + pmap_update(pmap_kernel()); cc = &sc->sc_cfg; bzero(cc, sizeof (*cc)); diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c index 7e4f74910ed..d7fbda87ccb 100644 --- a/sys/dev/isa/aha.c +++ b/sys/dev/isa/aha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha.c,v 1.40 2001/11/30 17:24:19 art Exp $ */ +/* $OpenBSD: aha.c,v 1.41 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: aha.c,v 1.11 1996/05/12 23:51:23 mycroft Exp $ */ #undef AHADIAG @@ -1105,6 +1105,7 @@ aha_init(sc) VM_PROT_READ|VM_PROT_WRITE); va += PAGE_SIZE; } + pmap_update(pmap_kernel()); /* * XXXEND */ diff --git a/sys/dev/tc/if_le_ioasic.c b/sys/dev/tc/if_le_ioasic.c index 585b19a8302..ba976fce31b 100644 --- a/sys/dev/tc/if_le_ioasic.c +++ b/sys/dev/tc/if_le_ioasic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le_ioasic.c,v 1.8 2001/11/30 17:24:19 art Exp $ */ +/* $OpenBSD: if_le_ioasic.c,v 1.9 2001/12/08 02:24:07 art Exp $ */ /* $NetBSD: if_le_ioasic.c,v 1.2 1996/05/07 02:24:56 thorpej Exp $ */ /* @@ -121,6 +121,7 @@ le_ioasic_attach(parent, self, aux) VM_PROT_READ|VM_PROT_WRITE); va += PAGE_SIZE; } + pmap_update(pmap_kernel()); /* * XXXEND */ diff --git a/sys/kern/kern_malloc_debug.c b/sys/kern/kern_malloc_debug.c index dab61b5ac40..56a9319067d 100644 --- a/sys/kern/kern_malloc_debug.c +++ b/sys/kern/kern_malloc_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc_debug.c,v 1.14 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: kern_malloc_debug.c,v 1.15 2001/12/08 02:24:07 art Exp $ */ /* * Copyright (c) 1999, 2000 Artur Grabowski <art@openbsd.org> @@ -140,6 +140,7 @@ debug_malloc(unsigned long size, int type, int flags, void **addr) splx(s); pmap_kenter_pa(md->md_va, md->md_pa, VM_PROT_ALL); + pmap_update(pmap_kernel()); md->md_size = size; md->md_type = type; @@ -196,6 +197,7 @@ debug_free(void *addr, int type) * unmap the page. */ pmap_kremove(md->md_va, PAGE_SIZE); + pmap_update(pmap_kernel()); splx(s); return (1); |