diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2005-11-06 10:26:57 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2005-11-06 10:26:57 +0000 |
commit | 53c1a0a9cb11d56e4f92519803feafce9f050ac8 (patch) | |
tree | 2094b57f25ec607eb22412439eb34d63b0e760c2 /sys/arch/mips64 | |
parent | eb19df2972a79ae79ac1784d17976381f84e0bb0 (diff) |
byebye Mach macros
testing and ok kettenis@, hshoexer@
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/include/param.h | 10 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/busdma.c | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/mem.c | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 8 |
4 files changed, 11 insertions, 17 deletions
diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h index ab0ce4b99af..93fec9fa6ab 100644 --- a/sys/arch/mips64/include/param.h +++ b/sys/arch/mips64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.9 2005/09/12 23:05:05 miod Exp $ */ +/* $OpenBSD: param.h,v 1.10 2005/11/06 10:26:56 martin Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -134,14 +134,6 @@ */ #define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) -/* - * Conversion macros - */ -#define mips_round_page(x) ((((u_long)(x)) + NBPG - 1) & ~(NBPG-1)) -#define mips_trunc_page(x) ((u_long)(x) & ~(NBPG-1)) -#define mips_btop(x) ((u_long)(x) >> PGSHIFT) -#define mips_ptob(x) ((u_long)(x) << PGSHIFT) - #ifdef _KERNEL #ifndef _LOCORE diff --git a/sys/arch/mips64/mips64/busdma.c b/sys/arch/mips64/mips64/busdma.c index 979a4a0c219..5405889012e 100644 --- a/sys/arch/mips64/mips64/busdma.c +++ b/sys/arch/mips64/mips64/busdma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: busdma.c,v 1.7 2004/12/25 23:02:24 miod Exp $ */ +/* $OpenBSD: busdma.c,v 1.8 2005/11/06 10:26:56 martin Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -558,7 +558,7 @@ _dmamem_mmap(t, segs, nsegs, off, prot, flags) continue; } - return (mips_btop((caddr_t)segs[i].ds_addr + off - t->dma_offs)); + return (atop(segs[i].ds_addr + off - t->dma_offs)); } /* Page not found. */ diff --git a/sys/arch/mips64/mips64/mem.c b/sys/arch/mips64/mips64/mem.c index cf18f53cfd0..af8d4723be0 100644 --- a/sys/arch/mips64/mips64/mem.c +++ b/sys/arch/mips64/mips64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.5 2004/09/09 22:11:38 pefo Exp $ */ +/* $OpenBSD: mem.c,v 1.6 2005/11/06 10:26:56 martin Exp $ */ /* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */ /* @@ -193,10 +193,10 @@ mmmmap(dev_t dev, off_t off, int prot) if (minor(dev) == 4) { if (off >= 0x0000 && off < 0x10000) { off += sys_config.pci_io[0].bus_base; - return mips_btop(off); + return atop(off); } else if (off >= 0xa0000 && off < 0x10000000) { off += sys_config.pci_mem[0].bus_base; - return mips_btop(off); + return atop(off); } else { return -1; } diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 5472f4c4c85..d3de97d148e 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.25 2005/10/24 20:20:03 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.26 2005/11/06 10:26:56 martin Exp $ */ /* tracked to 1.23 */ /* @@ -63,6 +63,8 @@ #include <net/netisr.h> #include <miscfs/procfs/procfs.h> +#include <uvm/uvm_extern.h> + #include <machine/trap.h> #include <machine/psl.h> #include <machine/cpu.h> @@ -210,7 +212,7 @@ trap(trapframe) panic("trap: ktlbmod: invalid pte"); #endif if (pmap_is_page_ro(pmap_kernel(), - mips_trunc_page(trapframe->badvaddr), entry)) { + trunc_page(trapframe->badvaddr), entry)) { /* write to read only page in the kernel */ ftype = VM_PROT_WRITE; goto kernel_fault; @@ -244,7 +246,7 @@ trap(trapframe) panic("trap: utlbmod: invalid pte"); #endif if (pmap_is_page_ro(pmap, - mips_trunc_page(trapframe->badvaddr), entry)) { + trunc_page(trapframe->badvaddr), entry)) { /* write to read only page */ ftype = VM_PROT_WRITE; goto dofault; |