diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-27 03:03:50 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-27 03:03:50 +0000 |
commit | 8a46d785199bcae03d0469a55b99e08fe33263fa (patch) | |
tree | 9b784b445528b5c78da12077fd065ae9030cf6d7 /sys/arch/palm | |
parent | b109c783d06f4af76ff573fa020fbe9d1d855f7b (diff) |
uvm constraints. Add two mandatory MD symbols, uvm_md_constraints
which contains the constraints for DMA/memory allocation for each
architecture, and dma_constraints which contains the range of addresses
that are dma accessable by the system.
This is based on ariane@'s physcontig diff, with lots of bugfixes and
additions the following additions by my self:
Introduce a new function pool_set_constraints() which sets the address
range for which we allocate pages for the pool from, this is now used
for the mbuf/mbuf cluster pools to keep them dma accessible.
The !direct archs no longer stuff pages into the kernel object in
uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages.
Tested heavily by my self on i386, amd64 and sparc64. Some tests on
alpha and SGI.
"commit it" beck, art, oga, deraadt
"i like the diff" deraadt
Diffstat (limited to 'sys/arch/palm')
-rw-r--r-- | sys/arch/palm/palm/palm_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/palm/palm/palm_machdep.c b/sys/arch/palm/palm/palm_machdep.c index 2fb6cc3e176..5b3700a44a3 100644 --- a/sys/arch/palm/palm/palm_machdep.c +++ b/sys/arch/palm/palm/palm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: palm_machdep.c,v 1.3 2010/06/10 17:54:13 deraadt Exp $ */ +/* $OpenBSD: palm_machdep.c,v 1.4 2010/06/27 03:03:48 thib Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -123,6 +123,7 @@ #include <sys/termios.h> #include <sys/kcore.h> +#include <uvm/uvm.h> #include <uvm/uvm_extern.h> #include <sys/conf.h> @@ -213,6 +214,9 @@ pv_addr_t minidataclean; paddr_t msgbufphys; +struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; +struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; + extern u_int data_abort_handler_address; extern u_int prefetch_abort_handler_address; extern u_int undefined_handler_address; |