diff options
Diffstat (limited to 'sys/arch/powerpc/powerpc/dma.c')
-rw-r--r-- | sys/arch/powerpc/powerpc/dma.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/sys/arch/powerpc/powerpc/dma.c b/sys/arch/powerpc/powerpc/dma.c index 1404c3ae9ed..00d491bfe3a 100644 --- a/sys/arch/powerpc/powerpc/dma.c +++ b/sys/arch/powerpc/powerpc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.5 2001/06/24 23:29:33 drahn Exp $ */ +/* $OpenBSD: dma.c,v 1.6 2001/06/27 04:37:20 art Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -53,11 +53,8 @@ #include <vm/vm.h> #include <vm/vm_kern.h> -#ifdef UVM #include <uvm/uvm.h> #include <uvm/uvm_page.h> -#else -#endif #include <machine/bus.h> int _dmamem_alloc_range( bus_dma_tag_t t, bus_size_t size, @@ -343,11 +340,7 @@ _dmamem_free(t, segs, nsegs) } } -#if defined(UVM) uvm_pglistfree(&mlist); -#else - vm_page_free_memory(&mlist); -#endif } /* @@ -368,11 +361,7 @@ _dmamem_map(t, segs, nsegs, size, kvap, flags) int curseg; size = round_page(size); -#if defined(UVM) va = uvm_km_valloc(kmem_map, size); -#else - va = kmem_alloc_pageable(kmem_map, size); -#endif if (va == 0) return (ENOMEM); @@ -410,11 +399,7 @@ _dmamem_unmap(t, kva, size) #endif size = round_page(size); -#if defined(UVM) uvm_km_free(kmem_map, (vm_offset_t)kva, size); -#else - kmem_free(kmem_map, (vm_offset_t)kva, size); -#endif } /* @@ -483,13 +468,8 @@ _dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, * Allocate pages from the VM system. */ TAILQ_INIT(&mlist); -#if defined(UVM) error = uvm_pglistalloc(size, low, high, alignment, boundary, &mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0); -#else - error = vm_page_alloc_memory(size, low, high, - alignment, boundary, &mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0); -#endif if (error) return (error); |