diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2008-05-04 09:57:48 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2008-05-04 09:57:48 +0000 |
commit | ac601af741ec6b7286d79ec95cef84354dcf0cfe (patch) | |
tree | 30e30d5498181365c90c7a66f100a09adcd4a2d0 /sys/arch/mips64 | |
parent | 36fc7f0644092574a9ce2540ddf97cbffd75da71 (diff) |
convert arm and mips64 platforms to ptoa/atop
tested by maja@
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/mem.c | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/sendsig.c | 4 |
3 files changed, 5 insertions, 9 deletions
diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h index 526d0927187..33cb7050b92 100644 --- a/sys/arch/mips64/include/param.h +++ b/sys/arch/mips64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.17 2007/05/28 21:02:49 thib Exp $ */ +/* $OpenBSD: param.h,v 1.18 2008/05/04 09:57:47 martin Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -106,10 +106,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) (((x) + PGOFSET) >> PGSHIFT) - /* bytes to disk blocks */ #define btodb(x) ((x) >> DEV_BSHIFT) #define dbtob(x) ((x) << DEV_BSHIFT) diff --git a/sys/arch/mips64/mips64/mem.c b/sys/arch/mips64/mips64/mem.c index 965a00d085f..906ce0f09d9 100644 --- a/sys/arch/mips64/mips64/mem.c +++ b/sys/arch/mips64/mips64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.11 2008/03/31 04:03:32 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.12 2008/05/04 09:57:47 martin Exp $ */ /* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */ /* @@ -113,7 +113,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) case 0: v = uio->uio_offset; c = iov->iov_len; - if (v + c > ctob(physmem)) + if (v + c > ptoa(physmem)) return (EFAULT); v = (vaddr_t)PHYS_TO_XKPHYS(v, CCA_NONCOHERENT); error = uiomove((caddr_t)v, c, uio); diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c index 698697f2aad..474591aad89 100644 --- a/sys/arch/mips64/mips64/sendsig.c +++ b/sys/arch/mips64/mips64/sendsig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendsig.c,v 1.9 2006/03/04 19:33:21 miod Exp $ */ +/* $OpenBSD: sendsig.c,v 1.10 2008/05/04 09:57:47 martin Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -131,7 +131,7 @@ sendsig(catcher, sig, mask, code, type, val) psp->ps_sigstk.ss_flags |= SA_ONSTACK; } else fp = (struct sigframe *)(regs->sp - fsize); - if ((vaddr_t)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) + if ((vaddr_t)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize)) (void)uvm_grow(p, (vaddr_t)fp); #ifdef DEBUG if ((sigdebug & SDB_FOLLOW) || |