diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2005-11-09 18:08:38 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2005-11-09 18:08:38 +0000 |
commit | dd911d3a6513d0234c5faa7fe84a1c8e4caafbda (patch) | |
tree | 1c638b81ec520c3a4255cb438be7f16d560224f4 /sys/arch/arm | |
parent | 055e9ae6eeb7810687cd1bbbbb2216433a2bf429 (diff) |
use atop() and ptoa()
tested by jolan@
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/arm/bus_dma.c | 4 | ||||
-rw-r--r-- | sys/arch/arm/arm/mem.c | 4 | ||||
-rw-r--r-- | sys/arch/arm/include/param.h | 5 | ||||
-rw-r--r-- | sys/arch/arm/include/pmap.h | 4 | ||||
-rw-r--r-- | sys/arch/arm/mainbus/mainbus_io.c | 4 |
5 files changed, 9 insertions, 12 deletions
diff --git a/sys/arch/arm/arm/bus_dma.c b/sys/arch/arm/arm/bus_dma.c index 928b412f112..6a83e02a6b7 100644 --- a/sys/arch/arm/arm/bus_dma.c +++ b/sys/arch/arm/arm/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.6 2005/05/27 20:15:50 uwe Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.7 2005/11/09 18:08:37 martin Exp $ */ /* $NetBSD: bus_dma.c,v 1.38 2003/10/30 08:44:13 scw Exp $ */ /*- @@ -801,7 +801,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, continue; } - return (arm_btop((u_long)segs[i].ds_addr + off)); + return (atop(segs[i].ds_addr + off)); } /* Page not found. */ diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c index 2492d0755ba..94157bd6dde 100644 --- a/sys/arch/arm/arm/mem.c +++ b/sys/arch/arm/arm/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.3 2004/02/26 04:58:38 drahn Exp $ */ +/* $OpenBSD: mem.c,v 1.4 2005/11/09 18:08:37 martin Exp $ */ /* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */ /* @@ -264,7 +264,7 @@ mmmmap(dev, off, prot) if (off >= ctob(physmem) && suser(p, 0) != 0) return -1; - return arm_btop(off); + return atop(off); } /*ARGSUSED*/ int diff --git a/sys/arch/arm/include/param.h b/sys/arch/arm/include/param.h index 496cf7859d8..7f1276566d9 100644 --- a/sys/arch/arm/include/param.h +++ b/sys/arch/arm/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.8 2005/10/21 15:43:01 martin Exp $ */ +/* $OpenBSD: param.h,v 1.9 2005/11/09 18:08:37 martin Exp $ */ /* $NetBSD: param.h,v 1.9 2002/03/24 03:37:23 thorpej Exp $ */ /* @@ -100,9 +100,6 @@ #define USPACE_UNDEF_STACK_TOP (USPACE_SVC_STACK_BOTTOM - 0x10) #define USPACE_UNDEF_STACK_BOTTOM (sizeof(struct user) + FPCONTEXTSIZE + 10) -#define arm_btop(x) ((x) >> PAGE_SHIFT) -#define arm_ptob(x) ((x) << PAGE_SHIFT) - #ifdef _KERNEL #ifndef _LOCORE void delay (unsigned); diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h index 7d263e7cc94..2c979015165 100644 --- a/sys/arch/arm/include/pmap.h +++ b/sys/arch/arm/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.3 2004/08/06 22:39:12 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.4 2005/11/09 18:08:37 martin Exp $ */ /* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */ /* @@ -244,7 +244,7 @@ extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */ #define pmap_copy(dp, sp, da, l, sa) /* nothing */ -#define pmap_phys_address(ppn) (arm_ptob((ppn))) +#define pmap_phys_address(ppn) (ptoa(ppn)) #define pmap_proc_iflush(p, va, len) /* nothing */ #define pmap_unuse_final(p) /* nothing */ diff --git a/sys/arch/arm/mainbus/mainbus_io.c b/sys/arch/arm/mainbus/mainbus_io.c index 4a6235b7804..e78f7ee4fa2 100644 --- a/sys/arch/arm/mainbus/mainbus_io.c +++ b/sys/arch/arm/mainbus/mainbus_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus_io.c,v 1.1 2004/02/01 05:09:49 drahn Exp $ */ +/* $OpenBSD: mainbus_io.c,v 1.2 2005/11/09 18:08:37 martin Exp $ */ /* $NetBSD: mainbus_io.c,v 1.14 2003/12/06 22:05:33 bjh21 Exp $ */ /* @@ -233,7 +233,7 @@ mainbus_bs_mmap(t, paddr, offset, prot, flags) /* * mmap from address `paddr+offset' for one page */ - return (arm_btop((paddr + offset))); + return (atop(paddr + offset)); } void |