Don't use pmap_enter in vmapbuf. This is essentially a reversal of

revision 1.76. It avoids problems where an I/O interrupt for physio,
using a bounce buffer, would find the destination address mapped
read-only because the syncer process hit.

Suggested by Chuck Cranor.
This commit is contained in:
fvdl 2001-01-25 20:14:28 +00:00
parent 86651a757f
commit f2b255d7c2

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.96 2001/01/01 22:13:55 thorpej Exp $ */ /* $NetBSD: vm_machdep.c,v 1.97 2001/01/25 20:14:28 fvdl Exp $ */
/*- /*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved. * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -389,8 +389,7 @@ vmapbuf(bp, len)
while (len) { while (len) {
(void) pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map), (void) pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map),
faddr, &fpa); faddr, &fpa);
pmap_enter(vm_map_pmap(phys_map), taddr, fpa, pmap_kenter_pa(taddr, fpa, VM_PROT_READ|VM_PROT_WRITE);
VM_PROT_READ|VM_PROT_WRITE, PMAP_WIRED);
faddr += PAGE_SIZE; faddr += PAGE_SIZE;
taddr += PAGE_SIZE; taddr += PAGE_SIZE;
len -= PAGE_SIZE; len -= PAGE_SIZE;
@ -412,6 +411,7 @@ vunmapbuf(bp, len)
addr = trunc_page((vaddr_t)bp->b_data); addr = trunc_page((vaddr_t)bp->b_data);
off = (vaddr_t)bp->b_data - addr; off = (vaddr_t)bp->b_data - addr;
len = round_page(off + len); len = round_page(off + len);
pmap_kremove(addr, len);
uvm_km_free_wakeup(phys_map, addr, len); uvm_km_free_wakeup(phys_map, addr, len);
bp->b_data = bp->b_saveaddr; bp->b_data = bp->b_saveaddr;
bp->b_saveaddr = 0; bp->b_saveaddr = 0;