summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-26 15:41:01 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-26 15:41:01 +0000
commit55d0ea063b25d8b25fea5135f59de22437ecd4ea (patch)
tree42c739678ad68f903e06cc29eb0db1df3bf6298e /sys/arch/vax
parent47f20d782a94ebc11fb4c7b43294559377be4989 (diff)
Kill pmap_phys_address(), and force every driver's mmap() routine to return
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/include/pmap.h3
-rw-r--r--sys/arch/vax/vax/bus_dma.c4
-rw-r--r--sys/arch/vax/vsa/lcg.c4
-rw-r--r--sys/arch/vax/vsa/lcspx.c4
-rw-r--r--sys/arch/vax/vsa/smg.c4
5 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h
index 79088650d0e..dfa1568180d 100644
--- a/sys/arch/vax/include/pmap.h
+++ b/sys/arch/vax/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.30 2008/08/30 20:45:31 martin Exp $ */
+/* $OpenBSD: pmap.h,v 1.31 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */
/*
@@ -113,7 +113,6 @@ extern struct pmap kernel_pmap_store;
*/
/* Routines that are best to define as macros */
-#define pmap_phys_address(phys) ((u_int)(phys) << PGSHIFT)
#define pmap_copy(a,b,c,d,e) /* Dont do anything */
#define pmap_update(pm) /* nothing */
#define pmap_collect(pmap) /* No need so far */
diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c
index b5984fe383d..c2302f4278f 100644
--- a/sys/arch/vax/vax/bus_dma.c
+++ b/sys/arch/vax/vax/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.25 2010/11/20 20:33:24 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.26 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */
/*-
@@ -536,7 +536,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
continue;
}
- return (atop(segs[i].ds_addr + off));
+ return (segs[i].ds_addr + off);
}
/* Page not found. */
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c
index d2cbecb56f8..a714b10edae 100644
--- a/sys/arch/vax/vsa/lcg.c
+++ b/sys/arch/vax/vsa/lcg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcg.c,v 1.14 2008/12/21 21:39:50 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.15 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -491,7 +491,7 @@ lcg_mmap(void *v, off_t offset, int prot)
if (offset >= ss->ss_fbsize || offset < 0)
return (-1);
- return (LCG_FB_ADDR + offset) >> PGSHIFT;
+ return (LCG_FB_ADDR + offset);
}
int
diff --git a/sys/arch/vax/vsa/lcspx.c b/sys/arch/vax/vsa/lcspx.c
index 2298006bdcc..6e35247e5d3 100644
--- a/sys/arch/vax/vsa/lcspx.c
+++ b/sys/arch/vax/vsa/lcspx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcspx.c,v 1.15 2008/12/21 21:39:50 miod Exp $ */
+/* $OpenBSD: lcspx.c,v 1.16 2010/12/26 15:41:00 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -485,7 +485,7 @@ lcspx_mmap(void *v, off_t offset, int prot)
if (offset >= ss->ss_fbsize || offset < 0)
return (-1);
- return (LCSPX_FB_ADDR + offset) >> PGSHIFT;
+ return (LCSPX_FB_ADDR + offset);
}
int
diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c
index 27d50a88095..d8cfec8c4b1 100644
--- a/sys/arch/vax/vsa/smg.c
+++ b/sys/arch/vax/vsa/smg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smg.c,v 1.23 2009/09/05 14:09:35 miod Exp $ */
+/* $OpenBSD: smg.c,v 1.24 2010/12/26 15:41:00 miod Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -435,7 +435,7 @@ smg_mmap(void *v, off_t offset, int prot)
if (offset >= SMSIZE || offset < 0)
return (-1);
- return (SMADDR + offset) >> PGSHIFT;
+ return (SMADDR + offset);
}
int