diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-09-10 17:00:04 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-09-10 17:00:04 +0000 |
commit | 492ac71165ebf7d35380b2fa0c48ab6e4ccab718 (patch) | |
tree | 0b9e728787a057925dd727ac066cbf56eb08a614 /sys/arch | |
parent | c8759bf8436684b473fb86971fb78dfbec302044 (diff) |
utilize uvm_pagealloc_contig()
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/dma.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/hppa/hppa/dma.c b/sys/arch/hppa/hppa/dma.c index a6273074176..a5661162d60 100644 --- a/sys/arch/hppa/hppa/dma.c +++ b/sys/arch/hppa/hppa/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.4 1999/09/03 18:00:46 art Exp $ */ +/* $OpenBSD: dma.c,v 1.5 1999/09/10 17:00:03 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -164,19 +164,17 @@ _dmamem_alloc(v, size, alignment, boundary, segs, nsegs, rsegs, flags) size = round_page(size); - if (!(va = uvm_km_kmemalloc(kmem_map, uvmexp.kmem_object, size, 0))) + if (!(va = uvm_pagealloc_contig(size, VM_MIN_KERNEL_ADDRESS, + VM_MAX_KERNEL_ADDRESS, NBPG))) return (ENOMEM); segs[0].ds_addr = va; segs[0].ds_len = size; *rsegs = 1; - for (epa = size + (spa = kvtop((caddr_t)va)); spa < epa; - spa += NBPG, va += NBPG) { - pmap_enter(pmap_kernel(), va, spa, - VM_PROT_READ | VM_PROT_WRITE, TRUE, 0); + /* XXX for now */ + for (epa = size + (spa = kvtop((caddr_t)va)); spa < epa; spa += NBPG) pmap_changebit(spa, TLB_UNCACHEABLE, 0); - } return 0; |