[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
arm: byebye to Mach macros
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: arm: byebye to Mach macros
- From: Martin Reindl <mreindl_(_at_)_catai_(_dot_)_org>
- Date: Mon, 7 Nov 2005 20:37:50 +0100
- Reply-to: martin_(_at_)_openbsd_(_dot_)_org
Hello,
Due to my lack of arm hardware, i could use some feedback on compiling and
running this diff. Just another round of deprecated MD macro removal. Thanks.
Martin
Index: arm/bus_dma.c
===================================================================
RCS file: /mnt/src/sys/arch/arm/arm/bus_dma.c,v
retrieving revision 1.6
diff -u -p -r1.6 bus_dma.c
--- arm/bus_dma.c 27 May 2005 20:15:50 -0000 1.6
+++ arm/bus_dma.c 6 Nov 2005 10:44:51 -0000
@@ -801,7 +801,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm
continue;
}
- return (arm_btop((u_long)segs[i].ds_addr + off));
+ return (atop(segs[i].ds_addr + off));
}
/* Page not found. */
Index: arm/mem.c
===================================================================
RCS file: /mnt/src/sys/arch/arm/arm/mem.c,v
retrieving revision 1.3
diff -u -p -r1.3 mem.c
--- arm/mem.c 26 Feb 2004 04:58:38 -0000 1.3
+++ arm/mem.c 6 Nov 2005 10:45:09 -0000
@@ -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
Index: include/param.h
===================================================================
RCS file: /mnt/src/sys/arch/arm/include/param.h,v
retrieving revision 1.8
diff -u -p -r1.8 param.h
--- include/param.h 21 Oct 2005 15:43:01 -0000 1.8
+++ include/param.h 6 Nov 2005 10:45:27 -0000
@@ -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);
Index: include/pmap.h
===================================================================
RCS file: /mnt/src/sys/arch/arm/include/pmap.h,v
retrieving revision 1.3
diff -u -p -r1.3 pmap.h
--- include/pmap.h 6 Aug 2004 22:39:12 -0000 1.3
+++ include/pmap.h 6 Nov 2005 10:47:35 -0000
@@ -244,7 +244,7 @@ extern int pmap_debug_level; /* Only ex
#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 */
Index: mainbus/mainbus_io.c
===================================================================
RCS file: /mnt/src/sys/arch/arm/mainbus/mainbus_io.c,v
retrieving revision 1.1
diff -u -p -r1.1 mainbus_io.c
--- mainbus/mainbus_io.c 1 Feb 2004 05:09:49 -0000 1.1
+++ mainbus/mainbus_io.c 6 Nov 2005 10:46:10 -0000
@@ -233,7 +233,7 @@ mainbus_bs_mmap(t, paddr, offset, prot,
/*
* mmap from address `paddr+offset' for one page
*/
- return (arm_btop((paddr + offset)));
+ return (atop(paddr + offset));
}
void
Visit your host, monkey.org