From e615d7364e79b36746f21436a663185fc2cb0081 Mon Sep 17 00:00:00 2001 From: rahnds Date: Fri, 31 Mar 2000 04:09:31 +0000 Subject: [PATCH] Add ummapiodev() functionality, to mirror mapiodev(). --- sys/arch/powerpc/powerpc/machdep.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) 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 -- 2.20.1