summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-03-07 15:34:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-03-07 15:34:35 +0000
commit533af00bc490d661c0485172ecc85661f5bfb8b2 (patch)
tree0958bc0190d3b4a65abceee125e75f4f0cb4dc78 /sys/arch/sparc64
parent199a9dc702cd212e8bdb1f42566fb537bb2acc5b (diff)
When allocating memory in bus_dmamem_alloc() with uvm_pglistalloc(), do not
try to be smart for the address range, uvm_pglistalloc() is smart enough nowadays.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 4c6e7be828a..dc3473b8614 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.115 2009/02/17 19:05:52 oga Exp $ */
+/* $OpenBSD: machdep.c,v 1.116 2009/03/07 15:34:34 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -1422,14 +1422,11 @@ _bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags)
int *rsegs;
int flags;
{
- vaddr_t low, high;
struct pglist *mlist;
int error;
/* Always round the size. */
size = round_page(size);
- low = vm_first_phys;
- high = vm_first_phys + vm_num_phys - PAGE_SIZE;
if ((mlist = malloc(sizeof(*mlist), M_DEVBUF,
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
@@ -1449,7 +1446,7 @@ _bus_dmamem_alloc(t, t0, size, alignment, boundary, segs, nsegs, rsegs, flags)
* Allocate pages from the VM system.
*/
TAILQ_INIT(mlist);
- error = uvm_pglistalloc(size, low, high,
+ error = uvm_pglistalloc(size, (paddr_t)0, (paddr_t)-1,
alignment, boundary, mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0);
if (error)
return (error);