summaryrefslogtreecommitdiff
path: root/sys/dev/tc
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>2000-06-26 04:55:19 +0000
committersimonb <simonb@NetBSD.org>2000-06-26 04:55:19 +0000
commit889c658b5bade4e72ee61a17ccc6b886541a16ee (patch)
tree0f00804a921864ab4d9f6ef08d469cbdc9a9cf33 /sys/dev/tc
parent472221aa398d2e7677796734a88fde50951e3ebc (diff)
Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which only changed the offset to a "vm_offset_t". Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
Diffstat (limited to 'sys/dev/tc')
-rw-r--r--sys/dev/tc/bba.c8
-rw-r--r--sys/dev/tc/cfb.c18
-rw-r--r--sys/dev/tc/mfb.c18
-rw-r--r--sys/dev/tc/sfb.c18
-rw-r--r--sys/dev/tc/sfbplus.c18
-rw-r--r--sys/dev/tc/tfb.c18
-rw-r--r--sys/dev/tc/xcfb.c20
7 files changed, 59 insertions, 59 deletions
diff --git a/sys/dev/tc/bba.c b/sys/dev/tc/bba.c
index 57776b8e89c..6f3a80da09b 100644
--- a/sys/dev/tc/bba.c
+++ b/sys/dev/tc/bba.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bba.c,v 1.6 2000/06/12 22:40:20 gmcgarry Exp $ */
+/* $NetBSD: bba.c,v 1.7 2000/06/26 04:56:27 simonb Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@ void *bba_allocm __P((void *, int, size_t, int, int));
void bba_freem __P((void *, void *, int));
size_t bba_round_buffersize __P((void *, int, size_t));
int bba_get_props __P((void *));
-int bba_mappage __P((void *, void *, int, int));
+paddr_t bba_mappage __P((void *, void *, off_t, int));
int bba_trigger_output __P((void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *));
int bba_trigger_input __P((void *, void *, void *, int,
@@ -629,11 +629,11 @@ bba_get_props(addr)
return (AUDIO_PROP_MMAP | am7930_get_props(addr));
}
-int
+paddr_t
bba_mappage(addr, mem, offset, prot)
void *addr;
void *mem;
- int offset;
+ off_t offset;
int prot;
{
struct bba_softc *sc = addr;
diff --git a/sys/dev/tc/cfb.c b/sys/dev/tc/cfb.c
index c385c769d07..3d667444775 100644
--- a/sys/dev/tc/cfb.c
+++ b/sys/dev/tc/cfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.20 2000/03/16 05:50:57 nisimura Exp $ */
+/* $NetBSD: cfb.c,v 1.21 2000/06/26 04:56:27 simonb Exp $ */
/*
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.20 2000/03/16 05:50:57 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.21 2000/06/26 04:56:27 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -186,14 +186,14 @@ static const struct wsscreen_list cfb_screenlist = {
sizeof(_cfb_scrlist) / sizeof(struct wsscreen_descr *), _cfb_scrlist
};
-static int cfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int cfbmmap __P((void *, off_t, int));
+static int cfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t cfbmmap __P((void *, off_t, int));
-static int cfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+static int cfb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
-static void cfb_free_screen __P((void *, void *));
-static int cfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static void cfb_free_screen __P((void *, void *));
+static int cfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
static const struct wsdisplay_accessops cfb_accessops = {
cfbioctl,
@@ -435,7 +435,7 @@ cfbioctl(v, cmd, data, flag, p)
return ENOTTY;
}
-int
+paddr_t
cfbmmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/tc/mfb.c b/sys/dev/tc/mfb.c
index f1784386639..a9aa35ca1dd 100644
--- a/sys/dev/tc/mfb.c
+++ b/sys/dev/tc/mfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.22 2000/03/16 05:50:57 nisimura Exp $ */
+/* $NetBSD: mfb.c,v 1.23 2000/06/26 04:56:27 simonb Exp $ */
/*
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.22 2000/03/16 05:50:57 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.23 2000/06/26 04:56:27 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -165,14 +165,14 @@ static const struct wsscreen_list mfb_screenlist = {
sizeof(_mfb_scrlist) / sizeof(struct wsscreen_descr *), _mfb_scrlist
};
-static int mfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int mfbmmap __P((void *, off_t, int));
+static int mfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t mfbmmap __P((void *, off_t, int));
-static int mfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+static int mfb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
-static void mfb_free_screen __P((void *, void *));
-static int mfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static void mfb_free_screen __P((void *, void *));
+static int mfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
static const struct wsdisplay_accessops mfb_accessops = {
mfbioctl,
@@ -410,7 +410,7 @@ mfbioctl(v, cmd, data, flag, p)
return (ENOTTY);
}
-static int
+static paddr_t
mfbmmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/tc/sfb.c b/sys/dev/tc/sfb.c
index dcce46e9e22..d7de43074a6 100644
--- a/sys/dev/tc/sfb.c
+++ b/sys/dev/tc/sfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.35 2000/03/16 05:48:28 nisimura Exp $ */
+/* $NetBSD: sfb.c,v 1.36 2000/06/26 04:56:28 simonb Exp $ */
/*
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.35 2000/03/16 05:48:28 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.36 2000/06/26 04:56:28 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -188,14 +188,14 @@ static const struct wsscreen_list sfb_screenlist = {
sizeof(_sfb_scrlist) / sizeof(struct wsscreen_descr *), _sfb_scrlist
};
-static int sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int sfbmmap __P((void *, off_t, int));
+static int sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t sfbmmap __P((void *, off_t, int));
-static int sfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+static int sfb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
-static void sfb_free_screen __P((void *, void *));
-static int sfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static void sfb_free_screen __P((void *, void *));
+static int sfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
static const struct wsdisplay_accessops sfb_accessops = {
sfbioctl,
@@ -459,7 +459,7 @@ sfbioctl(v, cmd, data, flag, p)
return ENOTTY;
}
-static int
+static paddr_t
sfbmmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/tc/sfbplus.c b/sys/dev/tc/sfbplus.c
index 557fb6bce77..7a68e5685b5 100644
--- a/sys/dev/tc/sfbplus.c
+++ b/sys/dev/tc/sfbplus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sfbplus.c,v 1.3 1999/12/15 15:09:37 ad Exp $ */
+/* $NetBSD: sfbplus.c,v 1.4 2000/06/26 04:56:28 simonb Exp $ */
/*
* Copyright (c) 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.3 1999/12/15 15:09:37 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.4 2000/06/26 04:56:28 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -170,14 +170,14 @@ static const struct wsscreen_list sfb_screenlist = {
sizeof(_sfb_scrlist) / sizeof(struct wsscreen_descr *), _sfb_scrlist
};
-static int sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int sfbmmap __P((void *, off_t, int));
+static int sfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t sfbmmap __P((void *, off_t, int));
-static int sfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+static int sfb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
-static void sfb_free_screen __P((void *, void *));
-static int sfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static void sfb_free_screen __P((void *, void *));
+static int sfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
/* EXPORT */ int sfb_alloc_attr __P((void *, int, int, int, long *));
static const struct wsdisplay_accessops sfb_accessops = {
@@ -480,7 +480,7 @@ sfbioctl(v, cmd, data, flag, p)
return ENOTTY;
}
-int
+paddr_t
sfbmmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/tc/tfb.c b/sys/dev/tc/tfb.c
index a3ee9453839..32864bef34b 100644
--- a/sys/dev/tc/tfb.c
+++ b/sys/dev/tc/tfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tfb.c,v 1.24 2000/03/16 05:50:57 nisimura Exp $ */
+/* $NetBSD: tfb.c,v 1.25 2000/06/26 04:56:31 simonb Exp $ */
/*
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.24 2000/03/16 05:50:57 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.25 2000/06/26 04:56:31 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -242,14 +242,14 @@ static const struct wsscreen_list tfb_screenlist = {
sizeof(_tfb_scrlist) / sizeof(struct wsscreen_descr *), _tfb_scrlist
};
-static int tfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int tfbmmap __P((void *, off_t, int));
+static int tfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t tfbmmap __P((void *, off_t, int));
-static int tfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+static int tfb_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
-static void tfb_free_screen __P((void *, void *));
-static int tfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static void tfb_free_screen __P((void *, void *));
+static int tfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
static const struct wsdisplay_accessops tfb_accessops = {
tfbioctl,
@@ -490,7 +490,7 @@ tfbioctl(v, cmd, data, flag, p)
return (ENOTTY);
}
-static int
+static paddr_t
tfbmmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/tc/xcfb.c b/sys/dev/tc/xcfb.c
index f9fa7cb6671..2214a4e4b4c 100644
--- a/sys/dev/tc/xcfb.c
+++ b/sys/dev/tc/xcfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xcfb.c,v 1.17 2000/03/16 05:50:57 nisimura Exp $ */
+/* $NetBSD: xcfb.c,v 1.18 2000/06/26 04:56:31 simonb Exp $ */
/*
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.17 2000/03/16 05:50:57 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.18 2000/06/26 04:56:31 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -136,14 +136,14 @@ static const struct wsscreen_list xcfb_screenlist = {
sizeof(_xcfb_scrlist) / sizeof(struct wsscreen_descr *), _xcfb_scrlist
};
-static int xcfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int xcfbmmap __P((void *, off_t, int));
+static int xcfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
+static paddr_t xcfbmmap __P((void *, off_t, int));
-static int xcfb_alloc_screen __P((void *, const struct wsscreen_descr *,
- void **, int *, int *, long *));
-static void xcfb_free_screen __P((void *, void *));
-static int xcfb_show_screen __P((void *, void *, int,
- void (*) (void *, int, int), void *));
+static int xcfb_alloc_screen __P((void *, const struct wsscreen_descr *,
+ void **, int *, int *, long *));
+static void xcfb_free_screen __P((void *, void *));
+static int xcfb_show_screen __P((void *, void *, int,
+ void (*) (void *, int, int), void *));
static const struct wsdisplay_accessops xcfb_accessops = {
xcfbioctl,
@@ -464,7 +464,7 @@ xcfbioctl(v, cmd, data, flag, p)
return (ENOTTY);
}
-static int
+static paddr_t
xcfbmmap(v, offset, prot)
void *v;
off_t offset;