diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-08 02:24:08 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-08 02:24:08 +0000 |
commit | 9d60d5abd9786f2184ff5714f221264c291225aa (patch) | |
tree | 71197001dc10102fc702df7ebc630748f8f40d9e /sys/arch/mac68k | |
parent | 76e77305cc16957c8ab6b04545a4d21c35a51adb (diff) |
Sprinkle pmap_update calls where relevant and some other
misc pmap usage fixes.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r-- | sys/arch/mac68k/dev/nubus.c | 3 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/bus_space.c | 3 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/machdep.c | 12 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/mem.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/trap.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/vm_machdep.c | 11 |
6 files changed, 22 insertions, 15 deletions
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()); } /* |