use pmap_k* in vmapbuf() and vunmapbuf() since there's no VAC on this platform.
in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup() will soon no longer do it for us.
This commit is contained in:
parent
dd3f84513a
commit
eddbcd2f47
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_machdep.c,v 1.48 2001/06/02 18:09:19 chs Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.49 2001/08/19 17:45:57 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 Matthias Pfaller.
|
||||
|
@ -356,8 +356,7 @@ vmapbuf(bp, len)
|
|||
while (len) {
|
||||
(void) pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map),
|
||||
faddr, &fpa);
|
||||
pmap_enter(vm_map_pmap(phys_map), taddr, fpa,
|
||||
VM_PROT_READ|VM_PROT_WRITE, PMAP_WIRED);
|
||||
pmap_kenter_pa(taddr, fpa, VM_PROT_READ | VM_PROT_WRITE);
|
||||
faddr += PAGE_SIZE;
|
||||
taddr += PAGE_SIZE;
|
||||
len -= PAGE_SIZE;
|
||||
|
@ -380,6 +379,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_kremove(addr, len);
|
||||
pmap_update();
|
||||
uvm_km_free_wakeup(phys_map, addr, len);
|
||||
bp->b_data = bp->b_saveaddr;
|
||||
bp->b_saveaddr = 0;
|
||||
|
|
Loading…
Reference in New Issue