summaryrefslogtreecommitdiff
path: root/sys/arch/sun3
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/sun3
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/sun3')
-rw-r--r--sys/arch/sun3/dev/bw2.c7
-rw-r--r--sys/arch/sun3/dev/cg2.c7
-rw-r--r--sys/arch/sun3/dev/cg4.c6
-rw-r--r--sys/arch/sun3/dev/fb.c7
-rw-r--r--sys/arch/sun3/dev/fbvar.h4
-rw-r--r--sys/arch/sun3/sun3/mem.c7
6 files changed, 21 insertions, 17 deletions
diff --git a/sys/arch/sun3/dev/bw2.c b/sys/arch/sun3/dev/bw2.c
index 08ee1f252a6..d0364f61bd2 100644
--- a/sys/arch/sun3/dev/bw2.c
+++ b/sys/arch/sun3/dev/bw2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bw2.c,v 1.8 1997/01/16 04:03:42 kstailey Exp $ */
+/* $OpenBSD: bw2.c,v 1.9 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: bw2.c,v 1.8 1996/10/13 03:47:25 christos Exp $ */
/*
@@ -223,10 +223,11 @@ bw2ioctl(dev, cmd, data, flags, p)
* 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
bw2mmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
struct bw2_softc *sc = bwtwo_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sun3/dev/cg2.c b/sys/arch/sun3/dev/cg2.c
index 884934c33cc..12c7bf9ee1a 100644
--- a/sys/arch/sun3/dev/cg2.c
+++ b/sys/arch/sun3/dev/cg2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cg2.c,v 1.7 2001/09/16 00:42:44 millert Exp $ */
+/* $OpenBSD: cg2.c,v 1.8 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cg2.c,v 1.7 1996/10/13 03:47:26 christos Exp $ */
/*
@@ -232,10 +232,11 @@ cg2ioctl(dev, cmd, data, flags, p)
* 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
cg2mmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
struct cg2_softc *sc = cgtwo_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sun3/dev/cg4.c b/sys/arch/sun3/dev/cg4.c
index 27221fe73e5..ac1ba39ea96 100644
--- a/sys/arch/sun3/dev/cg4.c
+++ b/sys/arch/sun3/dev/cg4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cg4.c,v 1.8 1997/01/16 04:03:43 kstailey Exp $ */
+/* $OpenBSD: cg4.c,v 1.9 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: cg4.c,v 1.11 1996/10/29 19:54:19 gwr Exp $ */
/*
@@ -305,10 +305,10 @@ cg4ioctl(dev, cmd, data, flags, p)
* 1920k gap
* 1024k color memory
*/
-int
+paddr_t
cg4mmap(dev, off, prot)
dev_t dev;
- register int off;
+ off_t off;
int prot;
{
struct cg4_softc *sc = cgfour_cd.cd_devs[minor(dev)];
diff --git a/sys/arch/sun3/dev/fb.c b/sys/arch/sun3/dev/fb.c
index c7178e11a18..ce099b11cf4 100644
--- a/sys/arch/sun3/dev/fb.c
+++ b/sys/arch/sun3/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.4 1997/01/16 04:03:45 kstailey Exp $ */
+/* $OpenBSD: fb.c,v 1.5 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: fb.c,v 1.3 1995/04/10 05:45:56 mycroft Exp $ */
/*
@@ -112,10 +112,11 @@ fbioctl(dev, cmd, data, flags, p)
return (fbioctlfb(devfb, cmd, data));
}
-int
+paddr_t
fbmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
return ((*devfb->fb_driver->fbd_mmap)(dev, off, prot));
}
diff --git a/sys/arch/sun3/dev/fbvar.h b/sys/arch/sun3/dev/fbvar.h
index e9a9a541553..9a6dce8fc4f 100644
--- a/sys/arch/sun3/dev/fbvar.h
+++ b/sys/arch/sun3/dev/fbvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fbvar.h,v 1.5 1997/01/16 04:03:45 kstailey Exp $ */
+/* $OpenBSD: fbvar.h,v 1.6 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: fbvar.h,v 1.3 1996/10/29 19:27:37 gwr Exp $ */
/*
@@ -70,7 +70,7 @@ struct fbdriver {
/* These avoid the need to know our major number. */
int (*fbd_open) __P((dev_t, int, int, struct proc *));
int (*fbd_close) __P((dev_t, int, int, struct proc *));
- int (*fbd_mmap) __P((dev_t, int, int));
+ paddr_t (*fbd_mmap) __P((dev_t, off_t, int));
/* These are the internal ioctl functions */
int (*fbd_gattr) __P((struct fbdevice *, struct fbgattr *));
int (*fbd_gvideo) __P((struct fbdevice *, int *));
diff --git a/sys/arch/sun3/sun3/mem.c b/sys/arch/sun3/sun3/mem.c
index c4d0d8292ff..9af2a56312d 100644
--- a/sys/arch/sun3/sun3/mem.c
+++ b/sys/arch/sun3/sun3/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.15 2001/09/11 20:05:24 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.16 2001/11/01 12:13:46 art Exp $ */
/* $NetBSD: mem.c,v 1.19 1995/08/08 21:09:01 gwr Exp $ */
/*
@@ -262,10 +262,11 @@ unlock:
return (error);
}
-int
+paddr_t
mmmmap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
register int v = off;