More refinement, only map B_READ buf with VM_PROT_WRITE (all pages always

have VM_PROT_READ).  Also, pass PMAP_WIRED to pmap_enter (for non-mpc6xx
pmaps).  This will give pmap clues about flushing any "icache ok state".
This commit is contained in:
matt 2002-08-10 18:49:56 +00:00
parent 145cf30b9f
commit 67f40b1907
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.41 2002/08/10 16:28:49 matt Exp $ */
/* $NetBSD: vm_machdep.c,v 1.42 2002/08/10 18:49:56 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -350,6 +350,7 @@ vmapbuf(bp, len)
vaddr_t faddr, taddr;
vsize_t off;
paddr_t pa;
int prot = VM_PROT_READ | ((bp->b_flags & B_READ) ? VM_PROT_WRITE : 0);
#ifdef DIAGNOSTIC
if (!(bp->b_flags & B_PHYS))
@ -370,8 +371,7 @@ vmapbuf(bp, len)
* Use pmap_enter so the referenced and modified bits are
* appropriately set.
*/
pmap_enter(pmap_kernel(), taddr, pa,
VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE);
pmap_enter(pmap_kernel(), taddr, pa, prot, prot|PMAP_WIRED);
faddr += NBPG;
taddr += NBPG;
}