diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2007-10-27 22:20:17 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2007-10-27 22:20:17 +0000 |
commit | 22bd45329d6acaa82d62c2bb8a8a7091cccf21bd (patch) | |
tree | dbb3318a8a8b6b92a6978f1ca4b11740283299a3 /sys/arch/sparc64 | |
parent | a218880a8c90e12a2a67958014bf6210860da560 (diff) |
get rid of btoc/ctob in favor of atop/ptoa
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/db_interface.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/pmap.c | 6 |
3 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/sparc64/include/param.h b/sys/arch/sparc64/include/param.h index 37038b88296..07e9d24c34e 100644 --- a/sys/arch/sparc64/include/param.h +++ b/sys/arch/sparc64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.28 2007/09/09 14:59:37 kettenis Exp $ */ +/* $OpenBSD: param.h,v 1.29 2007/10/27 22:20:16 martin Exp $ */ /* $NetBSD: param.h,v 1.25 2001/05/30 12:28:51 mrg Exp $ */ /* @@ -168,10 +168,6 @@ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) #define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) -/* pages to bytes */ -#define ctob(x) ((x) << PGSHIFT) -#define btoc(x) (((vsize_t)(x) + PGOFSET) >> PGSHIFT) - /* bytes to disk blocks */ #define btodb(x) ((x) >> DEV_BSHIFT) #define dbtob(x) ((x) << DEV_BSHIFT) diff --git a/sys/arch/sparc64/sparc64/db_interface.c b/sys/arch/sparc64/sparc64/db_interface.c index 2e121551152..94dc495514e 100644 --- a/sys/arch/sparc64/sparc64/db_interface.c +++ b/sys/arch/sparc64/sparc64/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.23 2007/05/02 18:46:07 kettenis Exp $ */ +/* $OpenBSD: db_interface.c,v 1.24 2007/10/27 22:20:16 martin Exp $ */ /* $NetBSD: db_interface.c,v 1.61 2001/07/31 06:55:47 eeh Exp $ */ /* @@ -792,7 +792,7 @@ db_proc_cmd(addr, have_addr, count, modif) p->p_wchan, p->p_priority, p->p_usrpri); db_printf("maxsaddr:%p ssiz:%dpg or %llxB\n", p->p_vmspace->vm_maxsaddr, p->p_vmspace->vm_ssize, - (unsigned long long)ctob(p->p_vmspace->vm_ssize)); + (unsigned long long)ptoa(p->p_vmspace->vm_ssize)); db_printf("profile timer: %ld sec %ld usec\n", p->p_stats->p_timer[ITIMER_PROF].it_value.tv_sec, p->p_stats->p_timer[ITIMER_PROF].it_value.tv_usec); diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index b58e0f79d28..ac32d5b2211 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.45 2007/10/18 20:44:47 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.46 2007/10/27 22:20:16 martin Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -827,7 +827,7 @@ remap_data: BDPRINTF(PDB_BOOT1, ("Calculating physmem:")); for (mp = mem; mp->size; mp++) - physmem += btoc(mp->size); + physmem += atop(mp->size); BDPRINTF(PDB_BOOT1, (" result %x or %d pages\r\n", (int)physmem, (int)physmem)); /* @@ -1183,7 +1183,7 @@ remap_data: } s = mp->start; sz = mp->size; - npgs += btoc(sz); + npgs += atop(sz); for (mp1 = avail; mp1 < mp; mp1++) if (s < mp1->start) break; |