summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2005-09-15 18:52:45 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2005-09-15 18:52:45 +0000
commit506380a7d9fb61033b545861eb521a2dc9d6bf60 (patch)
treed60346f98414c3a2767d7c9383ab0c268fbc9d7d /sys
parent9a7decdb09c8a0a11df7822828b6c0a8d04479b9 (diff)
get rid of MD m68k_trunc_page and m68k_round_page and replace by MI
trunc_page and round_page go go go! miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/hp300/bus_space.c6
-rw-r--r--sys/arch/m68k/include/param.h4
-rw-r--r--sys/arch/mac68k/dev/grf.c6
-rw-r--r--sys/arch/mac68k/dev/grf_iv.c6
-rw-r--r--sys/arch/mac68k/mac68k/bus_space.c14
-rw-r--r--sys/arch/mac68k/mac68k/pmap_bootstrap.c6
6 files changed, 21 insertions, 21 deletions
diff --git a/sys/arch/hp300/hp300/bus_space.c b/sys/arch/hp300/hp300/bus_space.c
index 34225a6f11c..754b54c5a12 100644
--- a/sys/arch/hp300/hp300/bus_space.c
+++ b/sys/arch/hp300/hp300/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.2 2005/01/23 16:55:17 miod Exp $ */
+/* $OpenBSD: bus_space.c,v 1.3 2005/09/15 18:52:44 martin Exp $ */
/* $NetBSD: bus_space.c,v 1.6 2002/09/27 15:36:02 provos Exp $ */
/*-
@@ -95,7 +95,7 @@ bus_space_map(t, bpa, size, flags, bshp)
/*
* Allocate virtual address space from the extio extent map.
*/
- size = m68k_round_page(size);
+ size = round_page(size);
error = extent_alloc(extio, size, PAGE_SIZE, 0, EX_NOBOUNDARY,
EX_NOWAIT | EX_MALLOCOK, &kva);
if (error)
@@ -180,7 +180,7 @@ bus_space_unmap(t, bsh, size)
panic("bus_space_unmap: bad space tag");
}
- size = m68k_round_page(size);
+ size = round_page(size);
#ifdef DIAGNOSTIC
if (bsh & PGOFSET)
diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h
index f5fe631af62..d1f75f458db 100644
--- a/sys/arch/m68k/include/param.h
+++ b/sys/arch/m68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.13 2005/09/12 23:05:05 miod Exp $ */
+/* $OpenBSD: param.h,v 1.14 2005/09/15 18:52:43 martin Exp $ */
/* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */
/*
@@ -140,8 +140,6 @@
*/
#define m68k_round_seg(x) ((((unsigned)(x)) + SEGOFSET) & ~SEGOFSET)
#define m68k_trunc_seg(x) ((unsigned)(x) & ~SEGOFSET)
-#define m68k_round_page(x) ((((unsigned)(x)) + PGOFSET) & ~PGOFSET)
-#define m68k_trunc_page(x) ((unsigned)(x) & ~PGOFSET)
#define m68k_page_offset(x) ((unsigned)(x) & PGOFSET)
#define m68k_btop(x) ((unsigned)(x) >> PGSHIFT)
#define m68k_ptob(x) ((unsigned)(x) << PGSHIFT)
diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c
index 09af2b76281..7922e9a0db1 100644
--- a/sys/arch/mac68k/dev/grf.c
+++ b/sys/arch/mac68k/dev/grf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf.c,v 1.28 2005/08/06 19:51:43 martin Exp $ */
+/* $OpenBSD: grf.c,v 1.29 2005/09/15 18:52:44 martin Exp $ */
/* $NetBSD: grf.c,v 1.53 1998/06/02 02:14:20 scottr Exp $ */
/*
@@ -264,8 +264,8 @@ grfmmap(dev, off, prot)
printf("grfmmap(%x): off %x, prot %x\n", dev, off, prot);
#endif
- if (off < m68k_trunc_page(gm->fboff) ||
- off >= m68k_round_page(gm->fbsize + gm->fboff))
+ if (off < trunc_page(gm->fboff) ||
+ off >= round_page(gm->fbsize + gm->fboff))
addr = (-1); /* XXX bogus */
else
addr = m68k_btop(gp->sc_phys + off);
diff --git a/sys/arch/mac68k/dev/grf_iv.c b/sys/arch/mac68k/dev/grf_iv.c
index 96a64919ee4..8472635f00b 100644
--- a/sys/arch/mac68k/dev/grf_iv.c
+++ b/sys/arch/mac68k/dev/grf_iv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_iv.c,v 1.27 2005/09/12 10:07:29 martin Exp $ */
+/* $OpenBSD: grf_iv.c,v 1.28 2005/09/15 18:52:44 martin Exp $ */
/* $NetBSD: grf_iv.c,v 1.17 1997/02/20 00:23:27 scottr Exp $ */
/*
@@ -75,6 +75,8 @@
#include <machine/grfioctl.h>
#include <machine/viareg.h>
+#include <uvm/uvm_extern.h>
+
#include <mac68k/dev/nubus.h>
#include <mac68k/dev/obiovar.h>
#include <mac68k/dev/grfvar.h>
@@ -277,7 +279,7 @@ grfiv_attach(parent, self, aux)
printf(": Civic\n");
break;
default:
- sc->sc_basepa = m68k_trunc_page(mac68k_vidphys);
+ sc->sc_basepa = trunc_page(mac68k_vidphys);
sc->sc_fbofs = m68k_page_offset(mac68k_vidphys);
length = mac68k_vidlen + sc->sc_fbofs;
diff --git a/sys/arch/mac68k/mac68k/bus_space.c b/sys/arch/mac68k/mac68k/bus_space.c
index 282c8476867..70ca735ada0 100644
--- a/sys/arch/mac68k/mac68k/bus_space.c
+++ b/sys/arch/mac68k/mac68k/bus_space.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space.c,v 1.18 2005/09/12 10:07:29 martin Exp $ */
+/* $OpenBSD: bus_space.c,v 1.19 2005/09/15 18:52:44 martin Exp $ */
/* $NetBSD: bus_space.c,v 1.5 1999/03/26 23:41:30 mycroft Exp $ */
/*-
@@ -77,8 +77,8 @@ bus_space_map(t, bpa, size, flags, bshp)
if (error)
return (error);
- pa = m68k_trunc_page(bpa + t);
- endpa = m68k_round_page((bpa + t + size) - 1);
+ pa = trunc_page(bpa + t);
+ endpa = round_page((bpa + t + size) - 1);
#ifdef DIAGNOSTIC
if (endpa <= pa)
@@ -157,8 +157,8 @@ bus_mem_add_mapping(bpa, size, flags, bshp)
vaddr_t va;
pt_entry_t *pte;
- pa = m68k_trunc_page(bpa);
- endpa = m68k_round_page((bpa + size) - 1);
+ pa = trunc_page(bpa);
+ endpa = round_page((bpa + size) - 1);
#ifdef DIAGNOSTIC
if (endpa <= pa)
@@ -222,8 +222,8 @@ bus_space_unmap(t, bsh, size)
vaddr_t va, endva;
bus_addr_t bpa;
- va = m68k_trunc_page(bsh.base);
- endva = m68k_round_page((bsh.base + size) - 1);
+ va = trunc_page(bsh.base);
+ endva = round_page((bsh.base + size) - 1);
#ifdef DIAGNOSTIC
if (endva <= va)
diff --git a/sys/arch/mac68k/mac68k/pmap_bootstrap.c b/sys/arch/mac68k/mac68k/pmap_bootstrap.c
index 94a94a29568..60bc7f009c2 100644
--- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c
+++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.32 2005/09/12 10:07:29 martin Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.33 2005/09/15 18:52:44 martin Exp $ */
/* $NetBSD: pmap_bootstrap.c,v 1.50 1999/04/07 06:14:33 scottr Exp $ */
/*
@@ -91,7 +91,7 @@ void bootstrap_mac68k(int);
#define PA2VA(v, t) *((t*)((u_int)&(v) - firstpa))
extern caddr_t kernel_start;
-#define PMAP_MD_RWLOW m68k_btop(m68k_round_page((vaddr_t)&kernel_start))
+#define PMAP_MD_RWLOW m68k_btop(round_page((vaddr_t)&kernel_start))
/*
* Present a totally tricky view of the world here...
@@ -149,7 +149,7 @@ do { \
if (vidlen != 0) { \
pte = PA2VA(vidpa, u_int *); \
epte = pte + VIDMAPSIZE; \
- protopte = m68k_trunc_page(mac68k_vidphys) | \
+ protopte = trunc_page(mac68k_vidphys) | \
PG_RW | PG_V | PG_CI; \
while (pte < epte) { \
*pte++ = protopte; \