summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-01 12:13:48 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-01 12:13:48 +0000
commitd5cc9696a2b0e4aab5c615d0009f9ab5030bbcaa (patch)
tree9a94822b0c5101e2ea8729a3c2885a26f42e1493 /sys/arch/sparc/dev
parent9dcaf3656438ee022f80bec8c3b7b7d5d3765802 (diff)
Change d_mmap in struct cdevsw from:
int (*d_mmap) __P((dev_t, int, int)); to: paddr_t (*d_mmap) __P((dev_t, off_t, int)); This allows us to mmap devices past 4GB offsets.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/bwtwo.c7
-rw-r--r--sys/arch/sparc/dev/cgeight.c7
-rw-r--r--sys/arch/sparc/dev/cgfour.c7
-rw-r--r--sys/arch/sparc/dev/cgfourteen.c7
-rw-r--r--sys/arch/sparc/dev/cgsix.c7
-rw-r--r--sys/arch/sparc/dev/cgthree.c7
-rw-r--r--sys/arch/sparc/dev/cgtwo.c7
-rw-r--r--sys/arch/sparc/dev/fb.c9
-rw-r--r--sys/arch/sparc/dev/p9100.c7
-rw-r--r--sys/arch/sparc/dev/tcx.c7
10 files changed, 41 insertions, 31 deletions
diff --git a/sys/arch/sparc/dev/bwtwo.c b/sys/arch/sparc/dev/bwtwo.c
index da78add7781..da88fe0fdbc 100644
--- a/sys/arch/sparc/dev/bwtwo.c
+++ b/sys/arch/sparc/dev/bwtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwtwo.c,v 1.17 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: bwtwo.c,v 1.18 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: bwtwo.c,v 1.33 1997/05/24 20:16:02 pk Exp $ */
/*
@@ -444,10 +444,11 @@ bwtwounblank(dev)
* Return the address that would map the given device at the given
* offset, allowing for the given protection, or return -1 for error.
*/
-int
+paddr_t
bwtwommap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct bwtwo_softc *sc = bwtwo_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sparc/dev/cgeight.c b/sys/arch/sparc/dev/cgeight.c
index bfc361f659b..b3991667997 100644
--- a/sys/arch/sparc/dev/cgeight.c
+++ b/sys/arch/sparc/dev/cgeight.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgeight.c,v 1.10 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgeight.c,v 1.11 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgeight.c,v 1.13 1997/05/24 20:16:04 pk Exp $ */
/*
@@ -381,10 +381,11 @@ cgeightioctl(dev, cmd, data, flags, p)
* goes. Starting at 8MB, it maps the ramdac for NBPG, then the p4
* register for NBPG, then the bootrom for 0x40000.
*/
-int
+paddr_t
cgeightmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgeight_softc *sc = cgeight_cd.cd_devs[minor(dev)];
int poff;
diff --git a/sys/arch/sparc/dev/cgfour.c b/sys/arch/sparc/dev/cgfour.c
index 64252e2459e..995bcfeefc6 100644
--- a/sys/arch/sparc/dev/cgfour.c
+++ b/sys/arch/sparc/dev/cgfour.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfour.c,v 1.10 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgfour.c,v 1.11 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgfour.c,v 1.13 1997/05/24 20:16:06 pk Exp $ */
/*
@@ -381,10 +381,11 @@ cgfourioctl(dev, cmd, data, flags, p)
* As well, mapping at an offset of 0x04000000 causes the cg4 to map
* only it's colour plane, at 0.
*/
-int
+paddr_t
cgfourmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgfour_softc *sc = cgfour_cd.cd_devs[minor(dev)];
int poff;
diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c
index 0c7dec4c72e..0c3422d65af 100644
--- a/sys/arch/sparc/dev/cgfourteen.c
+++ b/sys/arch/sparc/dev/cgfourteen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfourteen.c,v 1.6 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgfourteen.c,v 1.7 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */
/*
@@ -560,10 +560,11 @@ cgfourteenunblank(dev)
* tell the chip to ignore the X channel. XXX where does it get the X value
* to use?
*/
-int
+paddr_t
cgfourteenmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgfourteen_softc *sc = cgfourteen_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c
index 580f687c54b..3dc5a1ef021 100644
--- a/sys/arch/sparc/dev/cgsix.c
+++ b/sys/arch/sparc/dev/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.15 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgsix.c,v 1.16 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */
/*
@@ -718,10 +718,11 @@ struct mmo {
*
* XXX needs testing against `demanding' applications (e.g., aviator)
*/
-int
+paddr_t
cgsixmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgsix_softc *sc = cgsix_cd.cd_devs[minor(dev)];
register struct mmo *mo;
diff --git a/sys/arch/sparc/dev/cgthree.c b/sys/arch/sparc/dev/cgthree.c
index 7eb7195cf11..3f0a542ecfa 100644
--- a/sys/arch/sparc/dev/cgthree.c
+++ b/sys/arch/sparc/dev/cgthree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgthree.c,v 1.10 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgthree.c,v 1.11 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgthree.c,v 1.33 1997/05/24 20:16:11 pk Exp $ */
/*
@@ -419,10 +419,11 @@ cgthreeloadcmap(sc, start, ncolors)
* As well, mapping at an offset of 0x04000000 causes the cg3 to be
* mapped in flat mode without the cg4 emulation.
*/
-int
+paddr_t
cgthreemmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgthree_softc *sc = cgthree_cd.cd_devs[minor(dev)];
#define START (128*1024 + 128*1024)
diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c
index 9cdbe59a1fc..e31704f793d 100644
--- a/sys/arch/sparc/dev/cgtwo.c
+++ b/sys/arch/sparc/dev/cgtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwo.c,v 1.16 2001/09/16 00:42:44 millert Exp $ */
+/* $OpenBSD: cgtwo.c,v 1.17 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cgtwo.c,v 1.22 1997/05/24 20:16:12 pk Exp $ */
/*
@@ -415,10 +415,11 @@ cgtwoputcmap(sc, cmap)
* Return the address that would map the given device at the given
* offset, allowing for the given protection, or return -1 for error.
*/
-int
+paddr_t
cgtwommap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct cgtwo_softc *sc = cgtwo_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index a9148a0e069..c7e126ce752 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.16 2001/09/08 18:02:29 jason Exp $ */
+/* $OpenBSD: fb.c,v 1.17 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -181,12 +181,13 @@ fbioctl(dev, cmd, data, flags, p)
return (devfb->fb_driver->fbd_ioctl)(dev, cmd, data, flags, p);
}
-int
+paddr_t
fbmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
- int (*map)__P((dev_t, int, int)) = devfb->fb_driver->fbd_mmap;
+ paddr_t (*map)__P((dev_t, off_t, int)) = devfb->fb_driver->fbd_mmap;
if (map == NULL)
return (-1);
diff --git a/sys/arch/sparc/dev/p9100.c b/sys/arch/sparc/dev/p9100.c
index 78dbb603241..737bb41ece0 100644
--- a/sys/arch/sparc/dev/p9100.c
+++ b/sys/arch/sparc/dev/p9100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p9100.c,v 1.4 2001/08/17 13:52:29 mickey Exp $ */
+/* $OpenBSD: p9100.c,v 1.5 2001/11/01 12:13:46 art Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -449,10 +449,11 @@ p9100loadcmap(sc, start, ncolors)
* Return the address that would map the given device at the given
* offset, allowing for the given protection, or return -1 for error.
*/
-int
+paddr_t
p9100mmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
struct p9100_softc *sc = pnozz_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c
index 24e3c8be31d..97da6f676a2 100644
--- a/sys/arch/sparc/dev/tcx.c
+++ b/sys/arch/sparc/dev/tcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcx.c,v 1.3 2001/08/17 13:52:29 mickey Exp $ */
+/* $OpenBSD: tcx.c,v 1.4 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */
/*
@@ -437,10 +437,11 @@ struct mmo {
*
* XXX needs testing against `demanding' applications (e.g., aviator)
*/
-int
+paddr_t
tcxmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register struct tcx_softc *sc = tcx_cd.cd_devs[minor(dev)];
register struct mmo *mo;