summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-06-07 16:02:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-06-07 16:02:42 +0000
commit3602499e8d337550830a723ad9e72e431c58a9bd (patch)
tree8bd2eb1253ef852066d2239d576f31ce7d130c32
parentfe98e657ab2d1df157746a05a729ab5812e04202 (diff)
Do not look at the avail_{start,end} members from vm_physmem[] anymore.
These values were used to eventually pass ranges to uvm_pglistalloc(), which has been fixed to correctly skip no-memory ranges a lot of time ago; however mvme68k would still use the computed range and osiop would no longer attach; this repairs it.
-rw-r--r--sys/arch/mvme68k/mvme68k/bus_dma.c14
-rw-r--r--sys/arch/mvme88k/mvme88k/bus_dma.c12
-rw-r--r--sys/arch/mvmeppc/mvmeppc/bus_dma.c12
3 files changed, 4 insertions, 34 deletions
diff --git a/sys/arch/mvme68k/mvme68k/bus_dma.c b/sys/arch/mvme68k/mvme68k/bus_dma.c
index 6c3d9c7c29a..b667cf27972 100644
--- a/sys/arch/mvme68k/mvme68k/bus_dma.c
+++ b/sys/arch/mvme68k/mvme68k/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.4 2009/04/20 00:42:06 oga Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.5 2009/06/07 16:02:39 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -468,18 +468,8 @@ bus_dmamem_alloc(t, size, alignment, boundary, segs, nsegs, rsegs, flags)
int *rsegs;
int flags;
{
- paddr_t avail_start = (paddr_t)-1, avail_end = 0;
- int bank;
-
- for (bank = 0; bank < vm_nphysseg; bank++) {
- if (avail_start > vm_physmem[bank].avail_start << PGSHIFT)
- avail_start = vm_physmem[bank].avail_start << PGSHIFT;
- if (avail_end < vm_physmem[bank].avail_end << PGSHIFT)
- avail_end = vm_physmem[bank].avail_end << PGSHIFT;
- }
-
return _bus_dmamem_alloc_range(t, size, alignment, boundary, segs,
- nsegs, rsegs, flags, avail_start, avail_end - PAGE_SIZE);
+ nsegs, rsegs, flags, 0, -1);
}
/*
diff --git a/sys/arch/mvme88k/mvme88k/bus_dma.c b/sys/arch/mvme88k/mvme88k/bus_dma.c
index 730369e15b5..878f7985216 100644
--- a/sys/arch/mvme88k/mvme88k/bus_dma.c
+++ b/sys/arch/mvme88k/mvme88k/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.12 2009/04/20 00:42:06 oga Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.13 2009/06/07 16:02:41 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -471,16 +471,6 @@ bus_dmamem_alloc(t, size, alignment, boundary, segs, nsegs, rsegs, flags)
int *rsegs;
int flags;
{
- paddr_t avail_start = (paddr_t)-1, avail_end = 0;
- int bank;
-
- for (bank = 0; bank < vm_nphysseg; bank++) {
- if (avail_start > vm_physmem[bank].avail_start << PGSHIFT)
- avail_start = vm_physmem[bank].avail_start << PGSHIFT;
- if (avail_end < vm_physmem[bank].avail_end << PGSHIFT)
- avail_end = vm_physmem[bank].avail_end << PGSHIFT;
- }
-
return _bus_dmamem_alloc_range(t, size, alignment, boundary, segs,
nsegs, rsegs, flags, 0, -1);
}
diff --git a/sys/arch/mvmeppc/mvmeppc/bus_dma.c b/sys/arch/mvmeppc/mvmeppc/bus_dma.c
index 3bd46697866..ccf2acab2cc 100644
--- a/sys/arch/mvmeppc/mvmeppc/bus_dma.c
+++ b/sys/arch/mvmeppc/mvmeppc/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.24 2009/04/20 00:42:06 oga Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.25 2009/06/07 16:02:41 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.2 2001/06/10 02:31:25 briggs Exp $ */
/*-
@@ -437,16 +437,6 @@ _bus_dmamem_alloc(t, size, alignment, boundary, segs, nsegs, rsegs, flags)
int *rsegs;
int flags;
{
- paddr_t avail_start = 0xffffffff, avail_end = 0;
- int bank;
-
- for (bank = 0; bank < vm_nphysseg; bank++) {
- if (avail_start > vm_physmem[bank].avail_start << PGSHIFT)
- avail_start = vm_physmem[bank].avail_start << PGSHIFT;
- if (avail_end < vm_physmem[bank].avail_end << PGSHIFT)
- avail_end = vm_physmem[bank].avail_end << PGSHIFT;
- }
-
return _bus_dmamem_alloc_range(t, size, alignment, boundary, segs,
nsegs, rsegs, flags, 0, -1);
}