summaryrefslogtreecommitdiff
path: root/sys/compat
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/compat
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/compat')
-rw-r--r--sys/compat/ibcs2/ibcs2_misc.c4
-rw-r--r--sys/compat/linux/linux_exec.c4
-rw-r--r--sys/compat/linux/linux_misc.c4
-rw-r--r--sys/compat/svr4/svr4_misc.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/sys/compat/ibcs2/ibcs2_misc.c b/sys/compat/ibcs2/ibcs2_misc.c
index af26fd91cd7..df76d5cd1e1 100644
--- a/sys/compat/ibcs2/ibcs2_misc.c
+++ b/sys/compat/ibcs2/ibcs2_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_misc.c,v 1.28 2004/06/22 23:52:18 jfb Exp $ */
+/* $OpenBSD: ibcs2_misc.c,v 1.29 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: ibcs2_misc.c,v 1.23 1997/01/15 01:37:49 perry Exp $ */
/*
@@ -1357,7 +1357,7 @@ ibcs2_sys_sysi86(p, v, retval)
return EINVAL;
case IBCS2_SI86PHYSMEM:
- *retval = ctob(physmem);
+ *retval = ptoa(physmem);
break;
default:
diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c
index ae096b470a5..7a265c31dba 100644
--- a/sys/compat/linux/linux_exec.c
+++ b/sys/compat/linux/linux_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_exec.c,v 1.25 2006/01/19 17:54:52 mickey Exp $ */
+/* $OpenBSD: linux_exec.c,v 1.26 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */
/*-
@@ -162,7 +162,7 @@ linux_e_proc_init(p, vmspace)
/* Set the process idea of the break to the real value */
((struct linux_emuldata *)(p->p_emuldata))->p_break =
- vmspace->vm_daddr + ctob(vmspace->vm_dsize);
+ vmspace->vm_daddr + ptoa(vmspace->vm_dsize);
}
void
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index a88eab1f886..769d2a34a56 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.60 2007/02/06 18:42:37 art Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.61 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1494,7 +1494,7 @@ linux_sys_sysinfo(p, v, retval)
si.loads[0] = la->ldavg[0] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.loads[1] = la->ldavg[1] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
si.loads[2] = la->ldavg[2] * LINUX_SYSINFO_LOADS_SCALE / la->fscale;
- si.totalram = ctob(physmem);
+ si.totalram = ptoa(physmem);
si.freeram = uvmexp.free * uvmexp.pagesize;
si.sharedram = 0;/* XXX */
si.bufferram = bufpages * PAGE_SIZE;
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 1d100d71e6a..f4ab4ee9b3b 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_misc.c,v 1.47 2007/03/15 10:22:30 art Exp $ */
+/* $OpenBSD: svr4_misc.c,v 1.48 2007/09/01 15:14:44 martin Exp $ */
/* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */
/*
@@ -676,9 +676,9 @@ svr4_sys_break(p, v, retval)
if (diff > p->p_rlimit[RLIMIT_DATA].rlim_cur)
return ENOMEM;
- old = round_page(old + ctob(vm->vm_dsize));
- DPRINTF(("break(2): dsize = %x ctob %x\n",
- vm->vm_dsize, ctob(vm->vm_dsize)));
+ old = round_page(old + ptoa(vm->vm_dsize));
+ DPRINTF(("break(2): dsize = %x ptoa %x\n",
+ vm->vm_dsize, ptoa(vm->vm_dsize)));
diff = new - old;
DPRINTF(("break(3): old %lx new %lx diff %x\n", old, new, diff));