diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 2000-03-31 04:09:32 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 2000-03-31 04:09:32 +0000 |
commit | 151f0944ccea9501f68d7b24fd8a0a5eeb31177e (patch) | |
tree | 89e0ccdb97826b2c9fd4b48a94379f573ca5b0bd /sys/arch | |
parent | 90e247f42b542b16a6d2633be989d20e6ee72800 (diff) |
Add ummapiodev() functionality, to mirror mapiodev().
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c index 7a3e6a65b96..54b752376ad 100644 --- a/sys/arch/powerpc/powerpc/machdep.c +++ b/sys/arch/powerpc/powerpc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.36 2000/03/23 09:59:56 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.37 2000/03/31 04:09:31 rahnds Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1206,6 +1206,33 @@ mapiodev(pa, len) } return (void*) (va+off); } +void +unmapiodev(va, size) + void *va; + psize_t size; +{ + vaddr_t vaddr; + + vaddr = trunc_page(va); + +#ifdef UVM + uvm_km_free_wakeup(phys_map, vaddr, size); +#else + kmem_free_wakeup(phys_map, vaddr, size); +#endif + + for (; size > 0; size -= NBPG) { +#if 0 + pmap_remove(vm_map_pmap(phys_map), vaddr, vaddr+NBPG-1); +#else + pmap_remove(pmap_kernel(), vaddr, vaddr+NBPG-1); +#endif + vaddr += NBPG; + } + return; +} + + /* * probably should be ppc_space_copy |