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/amd64 | |
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/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/bus_dma.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 11 |
3 files changed, 5 insertions, 15 deletions
diff --git a/sys/arch/amd64/amd64/bus_dma.c b/sys/arch/amd64/amd64/bus_dma.c index b5475d6a55e..bfcd2685327 100644 --- a/sys/arch/amd64/amd64/bus_dma.c +++ b/sys/arch/amd64/amd64/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.33 2010/09/06 19:05:48 kettenis Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.34 2010/11/20 20:33:23 miod Exp $ */ /* $NetBSD: bus_dma.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -109,8 +109,6 @@ #include <machine/mpbiosvar.h> #endif -extern paddr_t avail_end; - int _bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int, paddr_t *, int *, int); diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index b5eaae0e9b7..f0870b235d7 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.127 2010/11/13 04:16:42 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.128 2010/11/20 20:33:23 miod Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -222,7 +222,8 @@ pid_t sigpid = 0; #define SDB_FOLLOW 0x01 #endif -extern paddr_t avail_start, avail_end; +paddr_t avail_start; +paddr_t avail_end; void (*delay_func)(int) = i8254_delay; void (*initclock_func)(void) = i8254_initclocks; diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index 8a754946bc3..b2a068d58ae 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.58 2010/11/13 04:16:42 guenther Exp $ */ +/* $OpenBSD: pmap.c,v 1.59 2010/11/20 20:33:23 miod Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -245,15 +245,6 @@ int pmap_pg_g = 0; int pmap_pg_wc = PG_UCMINUS; /* - * i386 physical memory comes in a big contig chunk with a small - * hole toward the front of it... the following 4 paddr_t's - * (shared with machdep.c) describe the physical address space - * of this machine. - */ -paddr_t avail_start; /* PA of first available physical page */ -paddr_t avail_end; /* PA of last available physical page */ - -/* * other data structures */ |