summaryrefslogtreecommitdiff
path: root/sys/dev
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
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')
-rw-r--r--sys/dev/audio.c16
-rw-r--r--sys/dev/audio_if.h4
-rw-r--r--sys/dev/ic/ad1848var.h4
-rw-r--r--sys/dev/ic/interwave.c6
-rw-r--r--sys/dev/ic/interwavevar.h4
-rw-r--r--sys/dev/ic/rrunner.c4
-rw-r--r--sys/dev/ic/vga.c10
-rw-r--r--sys/dev/isa/ad1848_isa.c6
-rw-r--r--sys/dev/isa/ad1848var.h4
-rw-r--r--sys/dev/isa/ega.c6
-rw-r--r--sys/dev/isa/ess.c8
-rw-r--r--sys/dev/isa/isadma.c11
-rw-r--r--sys/dev/isa/isadmavar.h8
-rw-r--r--sys/dev/isa/pcdisplay.c6
-rw-r--r--sys/dev/isa/sbdsp.c6
-rw-r--r--sys/dev/isa/sbdspvar.h4
-rw-r--r--sys/dev/pci/auvia.c8
-rw-r--r--sys/dev/pci/bktr/bktr_os.c19
-rw-r--r--sys/dev/pci/cmpci.c10
-rw-r--r--sys/dev/pci/cs4280.c8
-rw-r--r--sys/dev/pci/eap.c8
-rw-r--r--sys/dev/pci/eso.c8
-rw-r--r--sys/dev/pci/fms.c8
-rw-r--r--sys/dev/pci/sv.c8
-rw-r--r--sys/dev/pci/tga.c6
-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
-rw-r--r--sys/dev/wscons/wsdisplay.c8
-rw-r--r--sys/dev/wscons/wsdisplayvar.h4
34 files changed, 158 insertions, 162 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index f7be81fb5f5..80ea816253b 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.126 2000/06/25 13:26:19 mrg Exp $ */
+/* $NetBSD: audio.c,v 1.127 2000/06/26 04:56:17 simonb Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -108,7 +108,7 @@ int audio_read __P((struct audio_softc *, struct uio *, int));
int audio_write __P((struct audio_softc *, struct uio *, int));
int audio_ioctl __P((struct audio_softc *, u_long, caddr_t, int, struct proc *));
int audio_poll __P((struct audio_softc *, int, struct proc *));
-int audio_mmap __P((struct audio_softc *, int, int));
+paddr_t audio_mmap __P((struct audio_softc *, off_t, int));
int mixer_open __P((dev_t, struct audio_softc *, int, int, struct proc *));
int mixer_close __P((struct audio_softc *, int, int, struct proc *));
@@ -755,14 +755,15 @@ audiopoll(dev, events, p)
return (error);
}
-int
+paddr_t
audiommap(dev, off, prot)
dev_t dev;
- int off, prot;
+ off_t off;
+ int prot;
{
int unit = AUDIOUNIT(dev);
struct audio_softc *sc = audio_cd.cd_devs[unit];
- int error;
+ paddr_t error;
if (sc->sc_dying)
return (-1);
@@ -1797,10 +1798,11 @@ audio_poll(sc, events, p)
return (revents);
}
-int
+paddr_t
audio_mmap(sc, off, prot)
struct audio_softc *sc;
- int off, prot;
+ off_t off;
+ int prot;
{
struct audio_hw_if *hw = sc->hw_if;
struct audio_ringbuffer *cb;
diff --git a/sys/dev/audio_if.h b/sys/dev/audio_if.h
index 5238538506c..26201b46081 100644
--- a/sys/dev/audio_if.h
+++ b/sys/dev/audio_if.h
@@ -1,4 +1,4 @@
-/* $NetBSD: audio_if.h,v 1.34 1999/09/09 10:24:45 augustss Exp $ */
+/* $NetBSD: audio_if.h,v 1.35 2000/06/26 04:56:17 simonb Exp $ */
/*
* Copyright (c) 1994 Havard Eidnes.
@@ -114,7 +114,7 @@ struct audio_hw_if {
void *(*allocm)__P((void *, int, size_t, int, int));
void (*freem)__P((void *, void *, int));
size_t (*round_buffersize)__P((void *, int, size_t));
- int (*mappage)__P((void *, void *, int, int));
+ paddr_t (*mappage)__P((void *, void *, off_t, int));
int (*get_props)__P((void *)); /* device properties */
diff --git a/sys/dev/ic/ad1848var.h b/sys/dev/ic/ad1848var.h
index 08850ed3527..a554a4e8d27 100644
--- a/sys/dev/ic/ad1848var.h
+++ b/sys/dev/ic/ad1848var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ad1848var.h,v 1.6 1999/10/05 03:31:35 itohy Exp $ */
+/* $NetBSD: ad1848var.h,v 1.7 2000/06/26 04:56:18 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -199,7 +199,7 @@ int ad1848_from_vol __P((mixer_ctrl_t *, struct ad1848_volume *));
int ad1848_halt_output __P((void *));
int ad1848_halt_input __P((void *));
-int ad1848_mappage __P((void *, void *, int, int));
+paddr_t ad1848_mappage __P((void *, void *, off_t, int));
#ifdef AUDIO_DEBUG
void ad1848_dump_regs __P((struct ad1848_softc *));
diff --git a/sys/dev/ic/interwave.c b/sys/dev/ic/interwave.c
index a07f51438b7..e6e0242a418 100644
--- a/sys/dev/ic/interwave.c
+++ b/sys/dev/ic/interwave.c
@@ -1,4 +1,4 @@
-/* $NetBSD: interwave.c,v 1.12 2000/02/07 22:07:30 thorpej Exp $ */
+/* $NetBSD: interwave.c,v 1.13 2000/06/26 04:56:18 simonb Exp $ */
/*
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -1653,11 +1653,11 @@ iw_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
iw_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
return isa_mappage(mem, off, prot);
diff --git a/sys/dev/ic/interwavevar.h b/sys/dev/ic/interwavevar.h
index 8a1166ec534..c545868725f 100644
--- a/sys/dev/ic/interwavevar.h
+++ b/sys/dev/ic/interwavevar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: interwavevar.h,v 1.7 2000/02/07 22:07:30 thorpej Exp $ */
+/* $NetBSD: interwavevar.h,v 1.8 2000/06/26 04:56:18 simonb Exp $ */
/*
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -250,7 +250,7 @@ int iw_query_devinfo __P((void *, mixer_devinfo_t *));
void * iw_malloc __P((void *, int, size_t, int, int));
void iw_free __P((void *,void *,int));
size_t iw_round_buffersize __P((void *, int, size_t));
-int iw_mappage __P((void *, void *, int, int));
+paddr_t iw_mappage __P((void *, void *, off_t, int));
int iw_get_props __P((void *));
#endif /* INTERWAVEVAR_H */
diff --git a/sys/dev/ic/rrunner.c b/sys/dev/ic/rrunner.c
index c06058f49d4..3fbe0635db7 100644
--- a/sys/dev/ic/rrunner.c
+++ b/sys/dev/ic/rrunner.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rrunner.c,v 1.16 2000/06/08 22:43:15 cgd Exp $ */
+/* $NetBSD: rrunner.c,v 1.17 2000/06/26 04:56:19 simonb Exp $ */
/*
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -132,7 +132,7 @@ void esh_fpstop __P((struct tty *tp, int rw));
int esh_fppoll __P((dev_t dev, int events, struct proc *p));
#ifdef MORE_DONE
-int esh_fpmmap __P((dev_t, int, int));
+paddr_t esh_fpmmap __P((dev_t, off_t, int));
#endif
/* General routines, not externally visable */
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index 30046677f4f..dbc37b2d199 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.28 2000/06/17 07:11:50 soda Exp $ */
+/* $NetBSD: vga.c,v 1.29 2000/06/26 04:56:19 simonb Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -102,7 +102,7 @@ struct vga_config {
void *switchcbarg;
#ifdef arc
- int (*vc_mmap) __P((void *, off_t, int));
+ paddr_t (*vc_mmap) __P((void *, off_t, int));
#endif
struct callout vc_switch_callout;
@@ -235,7 +235,7 @@ const struct wsscreen_list vga_screenlist = {
};
static int vga_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int vga_mmap __P((void *, off_t, int));
+static paddr_t vga_mmap __P((void *, off_t, int));
static int vga_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
static void vga_free_screen __P((void *, void *));
@@ -524,7 +524,7 @@ vga_extended_attach(self, iot, memt, type, map)
struct device *self;
bus_space_tag_t iot, memt;
int type;
- int (*map) __P((void *, off_t, int));
+ int (*map) __P((void *, vaddr_t, int));
{
#endif /* arc */
int console;
@@ -636,7 +636,7 @@ vga_ioctl(v, cmd, data, flag, p)
return -1;
}
-static int
+static paddr_t
vga_mmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/isa/ad1848_isa.c b/sys/dev/isa/ad1848_isa.c
index 1d4d3b8bd29..e2224cb5ce1 100644
--- a/sys/dev/isa/ad1848_isa.c
+++ b/sys/dev/isa/ad1848_isa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ad1848_isa.c,v 1.14 2000/02/07 22:07:30 thorpej Exp $ */
+/* $NetBSD: ad1848_isa.c,v 1.15 2000/06/26 04:56:20 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -724,11 +724,11 @@ ad1848_isa_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
ad1848_isa_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
return isa_mappage(mem, off, prot);
diff --git a/sys/dev/isa/ad1848var.h b/sys/dev/isa/ad1848var.h
index 2d0089377ae..dc408af4bd4 100644
--- a/sys/dev/isa/ad1848var.h
+++ b/sys/dev/isa/ad1848var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ad1848var.h,v 1.32 2000/02/07 22:07:30 thorpej Exp $ */
+/* $NetBSD: ad1848var.h,v 1.33 2000/06/26 04:56:20 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -122,6 +122,6 @@ int ad1848_isa_intr __P((void *));
void *ad1848_isa_malloc __P((void *, int, size_t, int, int));
void ad1848_isa_free __P((void *, void *, int));
size_t ad1848_isa_round_buffersize __P((void *, int, size_t));
-int ad1848_isa_mappage __P((void *, void *, int, int));
+paddr_t ad1848_isa_mappage __P((void *, void *, off_t, int));
int ad1848_isa_get_props __P((void *));
#endif
diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c
index 549976abcd0..844f474dc31 100644
--- a/sys/dev/isa/ega.c
+++ b/sys/dev/isa/ega.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ega.c,v 1.4 2000/03/23 07:01:34 thorpej Exp $ */
+/* $NetBSD: ega.c,v 1.5 2000/06/26 04:56:20 simonb Exp $ */
/*
* Copyright (c) 1999
@@ -217,7 +217,7 @@ const struct wsscreen_list ega_screenlist = {
};
static int ega_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int ega_mmap __P((void *, off_t, int));
+static paddr_t ega_mmap __P((void *, off_t, int));
static int ega_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
static void ega_free_screen __P((void *, void *));
@@ -583,7 +583,7 @@ ega_ioctl(v, cmd, data, flag, p)
return (-1);
}
-static int
+static paddr_t
ega_mmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c
index dfaf26aac53..2359142f6ab 100644
--- a/sys/dev/isa/ess.c
+++ b/sys/dev/isa/ess.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ess.c,v 1.51 2000/03/23 07:01:34 thorpej Exp $ */
+/* $NetBSD: ess.c,v 1.52 2000/06/26 04:56:20 simonb Exp $ */
/*
* Copyright 1997
@@ -146,7 +146,7 @@ int ess_get_port __P((void *, mixer_ctrl_t *));
void *ess_malloc __P((void *, int, size_t, int, int));
void ess_free __P((void *, void *, int));
size_t ess_round_buffersize __P((void *, int, size_t));
-int ess_mappage __P((void *, void *, int, int));
+paddr_t ess_mappage __P((void *, void *, off_t, int));
int ess_query_devinfo __P((void *, mixer_devinfo_t *));
@@ -2208,11 +2208,11 @@ ess_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
ess_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
return (isa_mappage(mem, off, prot));
diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c
index 28917943077..15ab08273fc 100644
--- a/sys/dev/isa/isadma.c
+++ b/sys/dev/isa/isadma.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma.c,v 1.43 2000/02/07 22:07:31 thorpej Exp $ */
+/* $NetBSD: isadma.c,v 1.44 2000/06/26 04:56:21 simonb Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -698,13 +698,14 @@ _isa_dmamem_unmap(ids, chan, kva, size)
bus_dmamem_unmap(ids->ids_dmat, kva, size);
}
-int
+paddr_t
_isa_dmamem_mmap(ids, chan, addr, size, off, prot, flags)
struct isa_dma_state *ids;
int chan;
bus_addr_t addr;
bus_size_t size;
- int off, prot, flags;
+ off_t off;
+ int prot, flags;
{
bus_dma_segment_t seg;
@@ -795,10 +796,10 @@ _isa_free(addr, pool)
free(m, pool);
}
-int
+paddr_t
_isa_mappage(mem, off, prot)
void *mem;
- int off;
+ off_t off;
int prot;
{
struct isa_mem *m;
diff --git a/sys/dev/isa/isadmavar.h b/sys/dev/isa/isadmavar.h
index 628bd4828fa..8b233c4f4fb 100644
--- a/sys/dev/isa/isadmavar.h
+++ b/sys/dev/isa/isadmavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: isadmavar.h,v 1.16 2000/02/07 22:07:31 thorpej Exp $ */
+/* $NetBSD: isadmavar.h,v 1.17 2000/06/26 04:56:21 simonb Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -129,14 +129,14 @@ int _isa_dmamem_map __P((struct isa_dma_state *, int, bus_addr_t,
bus_size_t, caddr_t *, int));
void _isa_dmamem_unmap __P((struct isa_dma_state *, int, caddr_t,
size_t));
-int _isa_dmamem_mmap __P((struct isa_dma_state *, int, bus_addr_t,
- bus_size_t, int, int, int));
+paddr_t _isa_dmamem_mmap __P((struct isa_dma_state *, int, bus_addr_t,
+ bus_size_t, off_t, int, int));
int _isa_drq_isfree __P((struct isa_dma_state *, int));
void *_isa_malloc __P((struct isa_dma_state *, int, size_t, int, int));
void _isa_free __P((void *, int));
-int _isa_mappage __P((void *, int, int));
+paddr_t _isa_mappage __P((void *, off_t, int));
#endif /* _KERNEL */
#endif /* _DEV_ISA_ISADMAVAR_H_ */
diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c
index 4ccd09d5bcc..1430762b7e2 100644
--- a/sys/dev/isa/pcdisplay.c
+++ b/sys/dev/isa/pcdisplay.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay.c,v 1.9 2000/01/25 02:44:04 ad Exp $ */
+/* $NetBSD: pcdisplay.c,v 1.10 2000/06/26 04:56:21 simonb Exp $ */
/*
* Copyright (c) 1998
@@ -108,7 +108,7 @@ const struct wsscreen_list pcdisplay_screenlist = {
};
static int pcdisplay_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
-static int pcdisplay_mmap __P((void *, off_t, int));
+static paddr_t pcdisplay_mmap __P((void *, off_t, int));
static int pcdisplay_alloc_screen __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
static void pcdisplay_free_screen __P((void *, void *));
@@ -344,7 +344,7 @@ pcdisplay_ioctl(v, cmd, data, flag, p)
return (-1);
}
-static int
+static paddr_t
pcdisplay_mmap(v, offset, prot)
void *v;
off_t offset;
diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c
index 80792e3c244..1b6721d1288 100644
--- a/sys/dev/isa/sbdsp.c
+++ b/sys/dev/isa/sbdsp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sbdsp.c,v 1.104 2000/02/07 22:07:31 thorpej Exp $ */
+/* $NetBSD: sbdsp.c,v 1.105 2000/06/26 04:56:21 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -2289,11 +2289,11 @@ sb_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
sb_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
return isa_mappage(mem, off, prot);
diff --git a/sys/dev/isa/sbdspvar.h b/sys/dev/isa/sbdspvar.h
index 8c5ed35b453..d3aee5d0032 100644
--- a/sys/dev/isa/sbdspvar.h
+++ b/sys/dev/isa/sbdspvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: sbdspvar.h,v 1.48 2000/02/07 22:07:31 thorpej Exp $ */
+/* $NetBSD: sbdspvar.h,v 1.49 2000/06/26 04:56:22 simonb Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -240,7 +240,7 @@ int sbdsp_mixer_query_devinfo __P((void *, mixer_devinfo_t *));
void *sb_malloc __P((void *, int, size_t, int, int));
void sb_free __P((void *, void *, int));
size_t sb_round_buffersize __P((void *, int, size_t));
-int sb_mappage __P((void *, void *, int, int));
+paddr_t sb_mappage __P((void *, void *, off_t, int));
int sbdsp_get_props __P((void *));
diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c
index 0c2a99f0bc8..1b400330a6d 100644
--- a/sys/dev/pci/auvia.c
+++ b/sys/dev/pci/auvia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: auvia.c,v 1.3 2000/05/15 01:27:46 thorpej Exp $ */
+/* $NetBSD: auvia.c,v 1.4 2000/06/26 04:56:22 simonb Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@ int auvia_query_devinfo(void *, mixer_devinfo_t *);
void * auvia_malloc(void *, int, size_t, int, int);
void auvia_free(void *, void *, int);
size_t auvia_round_buffersize(void *, int, size_t);
-int auvia_mappage(void *, void *, int, int);
+paddr_t auvia_mappage(void *, void *, off_t, int);
int auvia_get_props(void *);
int auvia_build_dma_ops(struct auvia_softc *, struct auvia_softc_chan *,
struct auvia_dma *, void *, void *, int);
@@ -770,8 +770,8 @@ auvia_round_buffersize(void *addr, int direction, size_t size)
}
-int
-auvia_mappage(void *addr, void *mem, int off, int prot)
+paddr_t
+auvia_mappage(void *addr, void *mem, off_t off, int prot)
{
struct auvia_softc *sc = addr;
struct auvia_dma *p;
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c
index 509e01b4f56..f7a86ee71b2 100644
--- a/sys/dev/pci/bktr/bktr_os.c
+++ b/sys/dev/pci/bktr/bktr_os.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bktr_os.c,v 1.5 2000/05/21 15:43:57 wiz Exp $ */
+/* $NetBSD: bktr_os.c,v 1.6 2000/06/26 04:56:26 simonb Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.7 2000/04/16 07:50:09 roger Exp */
@@ -679,8 +679,8 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr )
/*
*
*/
-int
-bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
+paddr_t
+bktr_mmap( dev_t dev, off_t offset, int nprot )
{
int unit;
bktr_ptr_t bktr;
@@ -1151,7 +1151,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr )
* Note: 2.2.5/2.2.6/2.2.7/3.0 users must manually
* edit the line below and change "vm_offset_t" to "int"
*/
-int bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
+paddr_t bktr_mmap( dev_t dev, off_t offset, int nprot )
{
int unit;
@@ -1236,13 +1236,6 @@ static int bktr_intr(void *arg) { return common_bktr_intr(arg); }
#define bktr_ioctl bktrioctl
#define bktr_mmap bktrmmap
-int bktr_open __P((dev_t, int, int, struct proc *));
-int bktr_close __P((dev_t, int, int, struct proc *));
-int bktr_read __P((dev_t, struct uio *, int));
-int bktr_write __P((dev_t, struct uio *, int));
-int bktr_ioctl __P((dev_t, ioctl_cmd_t, caddr_t, int, struct proc*));
-int bktr_mmap __P((dev_t, int, int));
-
vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_offset_t,
vm_offset_t, vm_offset_t);
@@ -1663,8 +1656,8 @@ bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr)
/*
*
*/
-int
-bktr_mmap(dev_t dev, int offset, int nprot)
+paddr_t
+bktr_mmap(dev_t dev, off_t offset, int nprot)
{
int unit;
bktr_ptr_t bktr;
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 06836c9020a..c5300af26b9 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmpci.c,v 1.3 2000/06/08 22:15:52 gmcgarry Exp $ */
+/* $NetBSD: cmpci.c,v 1.4 2000/06/26 04:56:23 simonb Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -139,7 +139,7 @@ static int cmpci_query_devinfo __P((void *, mixer_devinfo_t *));
static void *cmpci_allocm __P((void *, int, size_t, int, int));
static void cmpci_freem __P((void *, void *, int));
static size_t cmpci_round_buffersize __P((void *, int, size_t));
-static int cmpci_mappage __P((void *, void *, int, int));
+static paddr_t cmpci_mappage __P((void *, void *, off_t, int));
static int cmpci_get_props __P((void *));
static int cmpci_trigger_output __P((void *, void *, void *, int,
void (*)(void *), void *,
@@ -1498,12 +1498,12 @@ cmpci_round_buffersize(handle, direction, bufsize)
}
-static int
+static paddr_t
cmpci_mappage(handle, addr, offset, prot)
void *handle;
void *addr;
- int offset;
- int prot;
+ off_t offset;
+ int prot;
{
struct cmpci_softc *sc = handle;
struct cmpci_dmanode *p;
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 6f9aa9a8015..8daa3c34e52 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4280.c,v 1.4 2000/05/15 01:35:29 thorpej Exp $ */
+/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
* Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved.
@@ -211,7 +211,7 @@ int cs4280_query_devinfo __P((void *addr, mixer_devinfo_t *dip));
void *cs4280_malloc __P((void *, int, size_t, int, int));
void cs4280_free __P((void *, void *, int));
size_t cs4280_round_buffersize __P((void *, int, size_t));
-int cs4280_mappage __P((void *, void *, int, int));
+paddr_t cs4280_mappage __P((void *, void *, off_t, int));
int cs4280_get_props __P((void *));
int cs4280_trigger_output __P((void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *));
@@ -1231,11 +1231,11 @@ cs4280_mixer_get_port(addr, cp)
return (sc->codec_if->vtbl->mixer_get_port(sc->codec_if, cp));
}
-int
+paddr_t
cs4280_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
struct cs4280_softc *sc = addr;
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index a9339f58c7d..07321de737a 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eap.c,v 1.40 2000/06/01 09:58:19 augustss Exp $ */
+/* $NetBSD: eap.c,v 1.41 2000/06/26 04:56:24 simonb Exp $ */
/* $OpenBSD: eap.c,v 1.6 1999/10/05 19:24:42 csapuntz Exp $ */
/*
@@ -179,7 +179,7 @@ int eap1370_query_devinfo __P((void *, mixer_devinfo_t *));
void *eap_malloc __P((void *, int, size_t, int, int));
void eap_free __P((void *, void *, int));
size_t eap_round_buffersize __P((void *, int, size_t));
-int eap_mappage __P((void *, void *, int, int));
+paddr_t eap_mappage __P((void *, void *, off_t, int));
int eap_get_props __P((void *));
void eap1370_set_mixer __P((struct eap_softc *sc, int a, int d));
u_int32_t eap1371_src_wait __P((struct eap_softc *sc));
@@ -1707,11 +1707,11 @@ eap_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
eap_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
struct eap_softc *sc = addr;
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index e06f781cfff..e0f661e09f2 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eso.c,v 1.18 2000/03/22 14:37:43 kleink Exp $ */
+/* $NetBSD: eso.c,v 1.19 2000/06/26 04:56:24 simonb Exp $ */
/*
* Copyright (c) 1999, 2000 Klaus J. Klein
@@ -106,7 +106,7 @@ static int eso_query_devinfo __P((void *, mixer_devinfo_t *));
static void * eso_allocm __P((void *, int, size_t, int, int));
static void eso_freem __P((void *, void *, int));
static size_t eso_round_buffersize __P((void *, int, size_t));
-static int eso_mappage __P((void *, void *, int, int));
+static paddr_t eso_mappage __P((void *, void *, off_t, int));
static int eso_get_props __P((void *));
static int eso_trigger_output __P((void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *));
@@ -1597,11 +1597,11 @@ eso_round_buffersize(hdl, direction, bufsize)
return (bufsize);
}
-static int
+static paddr_t
eso_mappage(hdl, addr, offs, prot)
void *hdl;
void *addr;
- int offs;
+ off_t offs;
int prot;
{
struct eso_softc *sc = hdl;
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index f9c0a824f2e..77913921947 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fms.c,v 1.5 2000/05/15 01:27:47 thorpej Exp $ */
+/* $NetBSD: fms.c,v 1.6 2000/06/26 04:56:24 simonb Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@ int fms_query_devinfo __P((void *, mixer_devinfo_t *));
void *fms_malloc __P((void *, int, size_t, int, int));
void fms_free __P((void *, void *, int));
size_t fms_round_buffersize __P((void *, int, size_t));
-int fms_mappage __P((void *, void *, int, int));
+paddr_t fms_mappage __P((void *, void *, off_t, int));
int fms_get_props __P((void *));
int fms_trigger_output __P((void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *));
@@ -841,11 +841,11 @@ fms_round_buffersize(addr, direction, size)
return size;
}
-int
+paddr_t
fms_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
struct fms_softc *sc = addr;
diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c
index cad9c3fe230..445af941ccb 100644
--- a/sys/dev/pci/sv.c
+++ b/sys/dev/pci/sv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sv.c,v 1.10 1999/11/01 18:12:21 augustss Exp $ */
+/* $NetBSD: sv.c,v 1.11 2000/06/26 04:56:25 simonb Exp $ */
/* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */
/*
@@ -151,7 +151,7 @@ int sv_query_devinfo __P((void *, mixer_devinfo_t *));
void *sv_malloc __P((void *, int, size_t, int, int));
void sv_free __P((void *, void *, int));
size_t sv_round_buffersize __P((void *, int, size_t));
-int sv_mappage __P((void *, void *, int, int));
+paddr_t sv_mappage __P((void *, void *, off_t, int));
int sv_get_props __P((void *));
#ifdef AUDIO_DEBUG
@@ -1480,11 +1480,11 @@ sv_round_buffersize(addr, direction, size)
return (size);
}
-int
+paddr_t
sv_mappage(addr, mem, off, prot)
void *addr;
void *mem;
- int off;
+ off_t off;
int prot;
{
struct sv_softc *sc = addr;
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c
index b68af362636..7e262de2160 100644
--- a/sys/dev/pci/tga.c
+++ b/sys/dev/pci/tga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.25 2000/06/14 00:34:33 soda Exp $ */
+/* $NetBSD: tga.c,v 1.26 2000/06/26 04:56:25 simonb Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -79,7 +79,7 @@ static void tga_getdevconfig __P((bus_space_tag_t memt, pci_chipset_tag_t pc,
struct tga_devconfig tga_console_dc;
int tga_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
-int tga_mmap __P((void *, off_t, int));
+paddr_t tga_mmap __P((void *, off_t, int));
static void tga_copyrows __P((void *, int, int, int));
static void tga_copycols __P((void *, int, int, int, int));
static int tga_alloc_screen __P((void *, const struct wsscreen_descr *,
@@ -602,7 +602,7 @@ tga_intr(v)
return (1);
}
-int
+paddr_t
tga_mmap(v, offset, prot)
void *v;
off_t offset;
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;
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 26fc635a934..ec886d99551 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.37 2000/03/30 12:45:44 augustss Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.38 2000/06/26 04:56:32 simonb Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.37 2000/03/30 12:45:44 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.38 2000/06/26 04:56:32 simonb Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -1120,10 +1120,10 @@ wsdisplay_cfg_ioctl(sc, cmd, data, flag, p)
return (EINVAL);
}
-int
+paddr_t
wsdisplaymmap(dev, offset, prot)
dev_t dev;
- int offset; /* XXX */
+ off_t offset;
int prot;
{
struct wsdisplay_softc *sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(dev)];
diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h
index 0f2ad5e3151..b97a853624e 100644
--- a/sys/dev/wscons/wsdisplayvar.h
+++ b/sys/dev/wscons/wsdisplayvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplayvar.h,v 1.14 1999/12/06 18:52:23 drochner Exp $ */
+/* $NetBSD: wsdisplayvar.h,v 1.15 2000/06/26 04:56:32 simonb Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -103,7 +103,7 @@ struct wsdisplay_font;
struct wsdisplay_accessops {
int (*ioctl) __P((void *v, u_long cmd, caddr_t data, int flag,
struct proc *p));
- int (*mmap) __P((void *v, off_t off, int prot));
+ paddr_t (*mmap) __P((void *v, off_t off, int prot));
int (*alloc_screen) __P((void *, const struct wsscreen_descr *,
void **, int *, int *, long *));
void (*free_screen) __P((void *, void *));