diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-11-28 14:04:25 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-11-28 14:04:25 +0000 |
commit | 58d25f35b9ffc9852ecd68525217d077103eb8e4 (patch) | |
tree | 4e3605303c062b44123347fb8e2c013b99995104 | |
parent | 9bd24be8e0a2e9abc43eaa237cf2e27c5464e716 (diff) |
Correct pmap_enter() flags usage.
-rw-r--r-- | sys/arch/hp300/hp300/vm_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/dev/nubus.c | 10 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/bus_space.c | 7 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/vm_machdep.c | 6 |
4 files changed, 14 insertions, 13 deletions
diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c index 7c9f73b97e4..e3c04e04f50 100644 --- a/sys/arch/hp300/hp300/vm_machdep.c +++ b/sys/arch/hp300/hp300/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.35 2003/06/02 23:27:45 millert Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.36 2004/11/28 14:04:22 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.60 2001/07/06 05:53:35 chs Exp $ */ /* @@ -310,7 +310,7 @@ vmapbuf(bp, len) if (pmap_extract(upmap, uva, &pa) == FALSE) panic("vmapbuf: null page frame"); pmap_enter(kpmap, kva, pa, VM_PROT_READ|VM_PROT_WRITE, - PMAP_WIRED); + VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); uva += PAGE_SIZE; kva += PAGE_SIZE; len -= PAGE_SIZE; diff --git a/sys/arch/mac68k/dev/nubus.c b/sys/arch/mac68k/dev/nubus.c index 2c15c077164..c7920255057 100644 --- a/sys/arch/mac68k/dev/nubus.c +++ b/sys/arch/mac68k/dev/nubus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nubus.c,v 1.28 2003/05/09 00:59:26 art Exp $ */ +/* $OpenBSD: nubus.c,v 1.29 2004/11/28 14:04:24 miod Exp $ */ /* $NetBSD: nubus.c,v 1.35 1997/04/22 20:20:32 scottr Exp $ */ /* @@ -822,10 +822,10 @@ nubus_mapin(paddr, sz) /* Map it to the specified bus. */ do { pmap_enter(pmap_kernel(), va, pa | pmt, - VM_PROT_READ|VM_PROT_WRITE, 0); - va += NBPG; - pa += NBPG; - } while ((sz -= NBPG) > 0); + VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE); + va += PAGE_SIZE; + pa += PAGE_SIZE; + } while ((sz -= PAGE_SIZE) > 0); 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 e8393027590..9a44bcddc4b 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.16 2002/03/14 01:26:35 millert Exp $ */ +/* $OpenBSD: bus_space.c,v 1.17 2004/11/28 14:04:24 miod Exp $ */ /* $NetBSD: bus_space.c,v 1.5 1999/03/26 23:41:30 mycroft Exp $ */ /*- @@ -171,9 +171,10 @@ bus_mem_add_mapping(bpa, size, flags, bshp) *bshp = (bus_space_handle_t)(va + (bpa & PGOFSET)); - for (; pa < endpa; pa += NBPG, va += NBPG) { + for (; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) { pmap_enter(pmap_kernel(), va, pa, - VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED); + VM_PROT_READ | VM_PROT_WRITE, + VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); pte = kvtopte(va); if ((flags & BUS_SPACE_MAP_CACHEABLE)) *pte &= ~PG_CI; diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c index 544667864a4..f34dcce86e6 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.31 2003/06/02 23:27:49 millert Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.32 2004/11/28 14:04:24 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.29 1998/07/28 18:34:55 thorpej Exp $ */ /* @@ -330,8 +330,8 @@ vmapbuf(bp, len) do { if (pmap_extract(upmap, uva, &pa) == FALSE) panic("vmapbuf: null page frame"); - pmap_enter(kpmap, kva, pa, VM_PROT_READ|VM_PROT_WRITE, - PMAP_WIRED); + pmap_enter(kpmap, kva, pa, VM_PROT_READ | VM_PROT_WRITE, + VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); uva += PAGE_SIZE; kva += PAGE_SIZE; len -= PAGE_SIZE; |