summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:17:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:17:34 +0000
commite83961e1eb1bda3be0177245339cfd8037ed4c4a (patch)
tree219a20d72f00eca69222d500fa9be2cc90691c60 /sys/uvm
parent74f094b544867509416ac6f31473e0e8e3edeaa3 (diff)
Add an alignment parameter to uvm_km_alloc1(), and change all callers to
pass zero; this will be used shortly. From art@
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_extern.h8
-rw-r--r--sys/uvm/uvm_km.c9
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index b45f6380974..c800b34331f 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_extern.h,v 1.59 2005/11/04 21:48:07 miod Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.60 2006/11/29 12:17:33 miod Exp $ */
/* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */
/*
@@ -421,8 +421,8 @@ extern struct vm_map *phys_map;
*/
/* zalloc zeros memory, alloc does not */
-#define uvm_km_zalloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,TRUE)
-#define uvm_km_alloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,FALSE)
+#define uvm_km_zalloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,0,TRUE)
+#define uvm_km_alloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,0,FALSE)
#endif /* _KERNEL */
@@ -496,7 +496,7 @@ int uvm_io(vm_map_t, struct uio *, int);
#define UVM_IO_FIXPROT 0x01
/* uvm_km.c */
-vaddr_t uvm_km_alloc1(vm_map_t, vsize_t, boolean_t);
+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);
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index ea15e5ee8fa..b864d6411fd 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.52 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.53 2006/11/29 12:17:33 miod Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -619,10 +619,7 @@ uvm_km_free_wakeup(map, addr, size)
*/
vaddr_t
-uvm_km_alloc1(map, size, zeroit)
- vm_map_t map;
- vsize_t size;
- boolean_t zeroit;
+uvm_km_alloc1(struct vm_map *map, vsize_t size, vsize_t align, boolean_t zeroit)
{
vaddr_t kva, loopva, offset;
struct vm_page *pg;
@@ -639,7 +636,7 @@ uvm_km_alloc1(map, size, zeroit)
*/
if (__predict_false(uvm_map(map, &kva, size, uvm.kernel_object,
- UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL,
+ UVM_UNKNOWN_OFFSET, align, UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL,
UVM_INH_NONE, UVM_ADV_RANDOM,
0)) != KERN_SUCCESS)) {
UVMHIST_LOG(maphist,"<- done (no VM)",0,0,0,0);