diff options
-rw-r--r-- | sys/kern/kern_fork.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_malloc.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_pool.c | 8 | ||||
-rw-r--r-- | sys/uvm/uvm_extern.h | 11 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 8 |
5 files changed, 19 insertions, 18 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 83989845b69..8e4674cb6bb 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.118 2010/06/30 21:01:45 thib Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.119 2010/07/02 01:25:05 art Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -242,7 +242,9 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize, return (EAGAIN); } - uaddr = uvm_km_alloc1(kernel_map, USPACE, USPACE_ALIGN, 1); + uaddr = uvm_km_kmemalloc_pla(kernel_map, uvm.kernel_object, USPACE, + USPACE_ALIGN, 0, dma_constraint.ucr_low, dma_constraint.ucr_high, + 0, 0, USPACE/PAGE_SIZE); if (uaddr == 0) { chgproccnt(uid, -1); nprocs--; diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 68186a63cab..afc39fe6790 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.82 2010/07/01 19:51:13 thib Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.83 2010/07/02 01:25:05 art Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -234,7 +234,7 @@ malloc(unsigned long size, int type, int flags) allocsize = 1 << indx; npg = atop(round_page(allocsize)); va = (caddr_t)uvm_km_kmemalloc_pla(kmem_map, NULL, - (vsize_t)ptoa(npg), + (vsize_t)ptoa(npg), 0, ((flags & M_NOWAIT) ? UVM_KMF_NOWAIT : 0) | ((flags & M_CANFAIL) ? UVM_KMF_CANFAIL : 0), dma_constraint.ucr_low, dma_constraint.ucr_high, diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index edcc2fe1ce8..cd856ea8e68 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.94 2010/06/29 20:39:27 thib Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.95 2010/07/02 01:25:05 art Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -1491,8 +1491,8 @@ pool_large_alloc(struct pool *pp, int flags, int *slowdown) int s; s = splvm(); - va = uvm_km_kmemalloc_pla(kmem_map, NULL, pp->pr_alloc->pa_pagesz, kfl, - pp->pr_crange->ucr_low, pp->pr_crange->ucr_high, + va = uvm_km_kmemalloc_pla(kmem_map, NULL, pp->pr_alloc->pa_pagesz, 0, + kfl, pp->pr_crange->ucr_low, pp->pr_crange->ucr_high, 0, 0, pp->pr_pa_nsegs); splx(s); @@ -1515,7 +1515,7 @@ pool_large_alloc_ni(struct pool *pp, int flags, int *slowdown) int kfl = (flags & PR_WAITOK) ? 0 : UVM_KMF_NOWAIT; return ((void *)uvm_km_kmemalloc_pla(kernel_map, uvm.kernel_object, - pp->pr_alloc->pa_pagesz, kfl, + pp->pr_alloc->pa_pagesz, 0, kfl, pp->pr_crange->ucr_low, pp->pr_crange->ucr_high, 0, 0, pp->pr_pa_nsegs)); } diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index b70dd6a903d..66f4ed1d22f 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.88 2010/07/01 21:27:39 art Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.89 2010/07/02 01:25:06 art Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -521,13 +521,12 @@ int uvm_io(vm_map_t, struct uio *, int); /* uvm_km.c */ vaddr_t uvm_km_alloc1(vm_map_t, vsize_t, vsize_t, boolean_t); void uvm_km_free(vm_map_t, vaddr_t, vsize_t); -void uvm_km_free_wakeup(vm_map_t, vaddr_t, - vsize_t); +void uvm_km_free_wakeup(vm_map_t, vaddr_t, vsize_t); vaddr_t uvm_km_kmemalloc_pla(struct vm_map *, - struct uvm_object *, vsize_t, int, paddr_t, - paddr_t, paddr_t, paddr_t, int); + struct uvm_object *, vsize_t, vsize_t, int, + paddr_t, paddr_t, paddr_t, paddr_t, int); #define uvm_km_kmemalloc(map, obj, sz, flags) \ - uvm_km_kmemalloc_pla(map, obj, sz, flags, 0, (paddr_t)-1, 0, 0, 0) + uvm_km_kmemalloc_pla(map, obj, sz, 0, flags, 0, (paddr_t)-1, 0, 0, 0) struct vm_map *uvm_km_suballoc(vm_map_t, vaddr_t *, vaddr_t *, vsize_t, int, boolean_t, vm_map_t); diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index b0028461e19..f239497ef5f 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.81 2010/07/02 01:13:59 thib Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.82 2010/07/02 01:25:06 art Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -346,8 +346,8 @@ uvm_km_pgremove_intrsafe(vaddr_t start, vaddr_t end) vaddr_t uvm_km_kmemalloc_pla(struct vm_map *map, struct uvm_object *obj, vsize_t size, - int flags, paddr_t low, paddr_t high, paddr_t alignment, paddr_t boundary, - int nsegs) + vsize_t valign, int flags, paddr_t low, paddr_t high, paddr_t alignment, + paddr_t boundary, int nsegs) { vaddr_t kva, loopva; voff_t offset; @@ -377,7 +377,7 @@ uvm_km_kmemalloc_pla(struct vm_map *map, struct uvm_object *obj, vsize_t size, */ if (__predict_false(uvm_map(map, &kva, size, obj, UVM_UNKNOWN_OFFSET, - 0, UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, UVM_INH_NONE, + valign, UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, UVM_INH_NONE, UVM_ADV_RANDOM, (flags & UVM_KMF_TRYLOCK))) != 0)) { UVMHIST_LOG(maphist, "<- done (no VM)",0,0,0,0); return(0); |