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/sparc64 | |
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/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/vmparam.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc64/include/vmparam.h b/sys/arch/sparc64/include/vmparam.h index b3eca0ba6a4..3d9e6d8fad8 100644 --- a/sys/arch/sparc64/include/vmparam.h +++ b/sys/arch/sparc64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.19 2010/04/22 19:02:49 oga Exp $ */ +/* $OpenBSD: vmparam.h,v 1.20 2010/06/27 03:03:48 thib Exp $ */ /* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */ /* @@ -145,9 +145,6 @@ #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 -/* No UVM_IO_RANGES required: IOMMU takes care of this. */ -#define UVM_IO_RANGES {} - #define __HAVE_VM_PAGE_MD /* * For each struct vm_page, there is a list of all currently valid virtual diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 4e60b5d04de..0a0d305b8d8 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.123 2010/03/29 19:21:58 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.124 2010/06/27 03:03:48 thib Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -175,6 +175,9 @@ int bufpages = 0; #endif int bufcachepercent = BUFCACHEPERCENT; +struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; +struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; + int physmem; extern caddr_t msgbufaddr; |