diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-20 20:33:25 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-11-20 20:33:25 +0000 |
commit | b7e31873a5c9480c386ed30cda01527bec2c0527 (patch) | |
tree | e8f6580efeecf338242520c76bc4469a5748e650 /sys/arch/alpha | |
parent | 0ec4827cfd483b9a1e6a836c4dbc9266b7bf44f6 (diff) |
This is a first step towards getting rid of avail_start and avail_end in the
kernel, currently limited to low-hanging fruit: these variables were used
by bus_dma to specify the range in which to allocate memory, back when
uvm_pglistalloc() was stupid and would not walk the vm_physseg[].
Nowadays, except on some platforms for early initialization, these variables
are not used, or do not need to be global variables. Therefore:
- remove `extern' declarations of avail_start and avail_end (or close cousins,
such as arm physical_start and physical_end) from files which no longer need
to use them.
- make them local variables whenever possible.
- remove them when they are assigned to but no longer used.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/dev/bus_dma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c index a58a0f3a78e..c2bbcdd7526 100644 --- a/sys/arch/alpha/dev/bus_dma.c +++ b/sys/arch/alpha/dev/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.28 2010/04/10 13:46:12 oga Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.29 2010/11/20 20:33:21 miod Exp $ */ /* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */ /*- @@ -49,8 +49,6 @@ int _bus_dmamap_load_buffer_direct(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int, paddr_t *, int *, int); -extern paddr_t avail_start, avail_end; /* from pmap.c */ - /* * Common function for DMA map creation. May be called by bus-specific * DMA map creation functions. @@ -516,7 +514,7 @@ _bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, for (; m != TAILQ_END(&mlist); m = TAILQ_NEXT(m, pageq)) { curaddr = VM_PAGE_TO_PHYS(m); #ifdef DIAGNOSTIC - if (curaddr < avail_start || curaddr >= high) { + if (curaddr < low || curaddr >= high) { printf("uvm_pglistalloc returned non-sensical" " address 0x%lx\n", curaddr); panic("_bus_dmamem_alloc"); |