summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2007-09-01 15:14:45 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2007-09-01 15:14:45 +0000
commitff9c8580ac8995be530eab4c4a7d414726aa6a95 (patch)
tree3f6ca2ec539445c667192bbf61137e4623af2e9d /sys/uvm
parenteffd251aaf06db3da5b94c1e45ff6e9ecc032f2b (diff)
replace the machine dependant bytes-to-clicks macro by the MI ptoa()
version for i386 more architectures and ctob() replacement is being worked on prodded by and ok miod
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_mmap.c4
-rw-r--r--sys/uvm/uvm_unix.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index af8cc662861..54abd240713 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.69 2007/06/18 21:51:15 pedro Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.70 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -592,7 +592,7 @@ sys_mmap(p, v, retval)
if ((flags & MAP_ANON) != 0 ||
((flags & MAP_PRIVATE) != 0 && (prot & PROT_WRITE) != 0)) {
if (size >
- (p->p_rlimit[RLIMIT_DATA].rlim_cur - ctob(p->p_vmspace->vm_dused))) {
+ (p->p_rlimit[RLIMIT_DATA].rlim_cur - ptoa(p->p_vmspace->vm_dused))) {
error = ENOMEM;
goto out;
}
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c
index 01e29ac9af6..18adecc2107 100644
--- a/sys/uvm/uvm_unix.c
+++ b/sys/uvm/uvm_unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_unix.c,v 1.28 2007/04/11 12:51:51 miod Exp $ */
+/* $OpenBSD: uvm_unix.c,v 1.29 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */
/*
@@ -134,9 +134,9 @@ uvm_grow(p, sp)
* For common case of already allocated (from trap).
*/
#ifdef MACHINE_STACK_GROWS_UP
- if (sp < USRSTACK + ctob(vm->vm_ssize))
+ if (sp < USRSTACK + ptoa(vm->vm_ssize))
#else
- if (sp >= USRSTACK - ctob(vm->vm_ssize))
+ if (sp >= USRSTACK - ptoa(vm->vm_ssize))
#endif
return;
@@ -222,13 +222,13 @@ uvm_coredump(p, vp, cred, chdr)
#ifdef MACHINE_STACK_GROWS_UP
if (USRSTACK <= start && start < (USRSTACK + MAXSSIZ)) {
- end = round_page(USRSTACK + ctob(vm->vm_ssize));
+ end = round_page(USRSTACK + ptoa(vm->vm_ssize));
if (start >= end)
continue;
start = USRSTACK;
#else
if (start >= (vaddr_t)vm->vm_maxsaddr) {
- start = trunc_page(USRSTACK - ctob(vm->vm_ssize));
+ start = trunc_page(USRSTACK - ptoa(vm->vm_ssize));
if (start >= end)
continue;