diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-29 20:39:28 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-06-29 20:39:28 +0000 |
commit | fdf7b79f2e96b45327a5970f13b7499d87f72dad (patch) | |
tree | 8287850963bbe02f13071461ecabfe3aefb0c5e3 /sys | |
parent | 73803e6455f42883135a7c19e1d118ff952fc86e (diff) |
Add a no_constraint uvm_constraint_range; use it in the pool code.
ok tedu@, beck@, oga@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_pool.c | 10 | ||||
-rw-r--r-- | sys/uvm/uvm.h | 3 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 5 |
3 files changed, 8 insertions, 10 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index a8c7771c468..edcc2fe1ce8 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.93 2010/06/27 03:03:48 thib Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.94 2010/06/29 20:39:27 thib Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -94,12 +94,6 @@ struct pool_item { ((pp)->pr_nitems < (pp)->pr_minitems) /* - * Default constraint range for pools, that cover the whole - * address space. - */ -struct uvm_constraint_range pool_full_range = { 0x0, (paddr_t)-1 }; - -/* * Every pool gets a unique serial number assigned to it. If this counter * wraps, we're screwed, but we shouldn't create so many pools anyway. */ @@ -400,7 +394,7 @@ pool_init(struct pool *pp, size_t size, u_int align, u_int ioff, int flags, } /* pglistalloc/constraint parameters */ - pp->pr_crange = &pool_full_range; + pp->pr_crange = &no_constraint; pp->pr_pa_nsegs = 0; /* Insert this into the list of all pools. */ diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index 258a16c8f3c..51c8a88b821 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.40 2010/06/27 03:03:49 thib Exp $ */ +/* $OpenBSD: uvm.h,v 1.41 2010/06/29 20:39:27 thib Exp $ */ /* $NetBSD: uvm.h,v 1.24 2000/11/27 08:40:02 chs Exp $ */ /* @@ -88,6 +88,7 @@ struct uvm_constraint_range { /* Constraint ranges, set by MD code. */ extern struct uvm_constraint_range isa_constraint; extern struct uvm_constraint_range dma_constraint; +extern struct uvm_constraint_range no_constraint; extern struct uvm_constraint_range *uvm_md_constraints[]; /* diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index dfb8e1f2e32..52baf28ed14 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.79 2010/06/28 04:20:29 miod Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.80 2010/06/29 20:39:27 thib Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -146,6 +146,9 @@ struct vm_map *kernel_map = NULL; +/* Unconstraint range. */ +struct uvm_constraint_range no_constraint = { 0x0, (paddr_t)-1 }; + /* * local data structues */ |