summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
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/alpha
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/alpha')
-rw-r--r--sys/arch/alpha/alpha/mem.c6
-rw-r--r--sys/arch/alpha/dev/bus_dma.c4
-rw-r--r--sys/arch/alpha/include/pmap.h3
-rw-r--r--sys/arch/alpha/tc/cfb.c4
-rw-r--r--sys/arch/alpha/tc/sfb.c4
5 files changed, 10 insertions, 11 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c
index 01ec48b47d5..c701e98f652 100644
--- a/sys/arch/alpha/alpha/mem.c
+++ b/sys/arch/alpha/alpha/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.24 2010/04/21 03:03:25 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.25 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
@@ -234,7 +234,7 @@ mmmmap(dev, off, prot)
*/
if ((prot & alpha_pa_access(atop(off))) != prot)
return (-1);
- return (atop(off));
+ return off;
#ifdef APERTURE
case 4:
@@ -243,7 +243,7 @@ mmmmap(dev, off, prot)
case 1:
if ((prot & alpha_pa_access(atop(off))) != prot)
return (-1);
- return atop(off);
+ return off;
default:
return -1;
}
diff --git a/sys/arch/alpha/dev/bus_dma.c b/sys/arch/alpha/dev/bus_dma.c
index c2bbcdd7526..0ea8d8140f8 100644
--- a/sys/arch/alpha/dev/bus_dma.c
+++ b/sys/arch/alpha/dev/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.29 2010/11/20 20:33:21 miod Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.30 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: bus_dma.c,v 1.40 2000/07/17 04:47:56 thorpej Exp $ */
/*-
@@ -685,7 +685,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/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index d780fcb8aff..99ae8b00ef4 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.24 2008/06/26 05:42:08 ray Exp $ */
+/* $OpenBSD: pmap.h,v 1.25 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
@@ -183,7 +183,6 @@ void pmap_tlb_shootdown_q_drain(u_long, boolean_t);
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_update(pmap) /* nothing (yet) */
-#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/alpha/tc/cfb.c b/sys/arch/alpha/tc/cfb.c
index 1afc6e26334..bb60d6002a8 100644
--- a/sys/arch/alpha/tc/cfb.c
+++ b/sys/arch/alpha/tc/cfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfb.c,v 1.21 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: cfb.c,v 1.22 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: cfb.c,v 1.7 1996/12/05 01:39:39 cgd Exp $ */
/*
@@ -310,7 +310,7 @@ cfbmmap(v, offset, prot)
if (offset > CFB_SIZE)
return (-1);
- return atop(sc->sc_dc->dc_paddr + offset);
+ return sc->sc_dc->dc_paddr + offset;
}
int
diff --git a/sys/arch/alpha/tc/sfb.c b/sys/arch/alpha/tc/sfb.c
index e8af2efe73c..3766994c714 100644
--- a/sys/arch/alpha/tc/sfb.c
+++ b/sys/arch/alpha/tc/sfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sfb.c,v 1.19 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: sfb.c,v 1.20 2010/12/26 15:40:58 miod Exp $ */
/* $NetBSD: sfb.c,v 1.7 1996/12/05 01:39:44 cgd Exp $ */
/*
@@ -354,7 +354,7 @@ sfbmmap(v, offset, prot)
if (offset >= SFB_SIZE || offset < 0)
return (-1);
- return atop(sc->sc_dc->dc_paddr + offset);
+ return sc->sc_dc->dc_paddr + offset;
}
int