diff options
Diffstat (limited to 'sys/arch')
48 files changed, 184 insertions, 155 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c index 1a5328420c6..0e9b04fecce 100644 --- a/sys/arch/alpha/alpha/mem.c +++ b/sys/arch/alpha/alpha/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.13 2001/01/20 20:29:53 art Exp $ */ +/* $OpenBSD: mem.c,v 1.14 2001/11/01 12:13:45 art Exp $ */ /* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */ /* @@ -193,10 +193,10 @@ kmemphys: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off; /* XXX */ + off_t off; int prot; { /* diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c index bc83cdfba96..d5ba3c6d83c 100644 --- a/sys/arch/amiga/amiga/mem.c +++ b/sys/arch/amiga/amiga/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.14 2001/07/25 13:25:31 art Exp $ */ +/* $OpenBSD: mem.c,v 1.15 2001/11/01 12:13:45 art Exp $ */ /* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */ /* @@ -65,7 +65,7 @@ caddr_t devzeropage; int mmopen __P((dev_t, int, int, struct proc *)); int mmclose __P((dev_t, int, int, struct proc *)); int mmrw __P((dev_t, struct uio *, int)); -int mmmmap __P((dev_t, int, int)); +paddr_t mmmmap __P((dev_t, off_t, int)); int mmioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); /*ARGSUSED*/ @@ -239,10 +239,10 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { return (-1); diff --git a/sys/arch/amiga/dev/grf.c b/sys/arch/amiga/dev/grf.c index 29fe4a7e4b6..1210e75ffb0 100644 --- a/sys/arch/amiga/dev/grf.c +++ b/sys/arch/amiga/dev/grf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf.c,v 1.11 2001/09/11 20:05:20 miod Exp $ */ +/* $OpenBSD: grf.c,v 1.12 2001/11/01 12:13:45 art Exp $ */ /* $NetBSD: grf.c,v 1.32 1996/12/23 09:10:01 veego Exp $ */ /* @@ -314,10 +314,11 @@ grfselect(dev, rw, p) * map the contents of a graphics display card into process' * memory space. */ -int +paddr_t grfmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off + int prot; { struct grf_softc *gp; struct grfinfo *gi; diff --git a/sys/arch/amiga/dev/view.c b/sys/arch/amiga/dev/view.c index bc29ae7b157..0d2d6d3657d 100644 --- a/sys/arch/amiga/dev/view.c +++ b/sys/arch/amiga/dev/view.c @@ -1,4 +1,4 @@ -/* $OpenBSD: view.c,v 1.4 2001/05/16 12:49:44 ho Exp $ */ +/* $OpenBSD: view.c,v 1.5 2001/11/01 12:13:45 art Exp $ */ /* $NetBSD: view.c,v 1.16 1996/10/13 03:07:35 christos Exp $ */ /* @@ -386,10 +386,11 @@ view_set_colormap(vu, ucm) } /*ARGSUSED*/ -int +paddr_t viewmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { struct view_softc *vu; bmap_t *bm; diff --git a/sys/arch/hp300/dev/grf.c b/sys/arch/hp300/dev/grf.c index 62ab0256a0a..b54ba27555b 100644 --- a/sys/arch/hp300/dev/grf.c +++ b/sys/arch/hp300/dev/grf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf.c,v 1.14 2001/09/11 20:05:24 miod Exp $ */ +/* $OpenBSD: grf.c,v 1.15 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: grf.c,v 1.30 1998/08/20 08:33:41 kleink Exp $ */ /* @@ -301,10 +301,11 @@ grfselect(dev, rw, p) } /*ARGSUSED*/ -int +paddr_t grfmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)]; diff --git a/sys/arch/hp300/dev/hil.c b/sys/arch/hp300/dev/hil.c index d6a858a22ee..9ca2a2061a7 100644 --- a/sys/arch/hp300/dev/hil.c +++ b/sys/arch/hp300/dev/hil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hil.c,v 1.13 2001/08/12 21:14:31 mickey Exp $ */ +/* $OpenBSD: hil.c,v 1.14 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: hil.c,v 1.34 1997/04/02 22:37:32 scottr Exp $ */ /* @@ -728,10 +728,11 @@ hpuxhilioctl(dev, cmd, data, flag) #endif /* ARGSUSED */ -int +paddr_t hilmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); } diff --git a/sys/arch/hp300/hp300/mem.c b/sys/arch/hp300/hp300/mem.c index fcda2b512d4..9cf245677a1 100644 --- a/sys/arch/hp300/hp300/mem.c +++ b/sys/arch/hp300/hp300/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.15 2001/07/25 13:25:31 art Exp $ */ +/* $OpenBSD: mem.c,v 1.16 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.25 1999/03/27 00:30:06 mycroft Exp $ */ /* @@ -65,7 +65,7 @@ static caddr_t devzeropage; int mmopen __P((dev_t, int, int)); int mmclose __P((dev_t, int, int)); int mmrw __P((dev_t, struct uio *, int)); -int mmmmap __P((dev_t, int, int)); +paddr_t mmmmap __P((dev_t, off_t, int)); int mmioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); /*ARGSUSED*/ @@ -220,10 +220,11 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { /* * /dev/mem is the only one that makes sense through this diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c index 64dbc4edefe..1f7f9518861 100644 --- a/sys/arch/hppa/dev/mem.c +++ b/sys/arch/hppa/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.5 2001/05/05 20:56:36 art Exp $ */ +/* $OpenBSD: mem.c,v 1.6 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1998,1999 Michael Shalayeff @@ -277,10 +277,11 @@ mmrw(dev, uio, flags) return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { if (minor(dev) != 0) return (-1); diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c index e2dfe79fd2e..c3070705798 100644 --- a/sys/arch/i386/i386/mem.c +++ b/sys/arch/i386/i386/mem.c @@ -1,5 +1,5 @@ /* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */ -/* $OpenBSD: mem.c,v 1.19 2001/07/25 13:25:32 art Exp $ */ +/* $OpenBSD: mem.c,v 1.20 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1982, 1986, 1990, 1993 @@ -222,10 +222,11 @@ mmrw(dev, uio, flags) return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { struct proc *p = curproc; /* XXX */ @@ -237,12 +238,6 @@ mmmmap(dev, off, prot) return -1; return i386_btop((u_int)off); -/* minor device 1 is kernel memory */ - case 1: - /* XXX - writability, executability checks? */ - if (!uvm_kernacc((caddr_t)off, NBPG, B_READ)) - return -1; - return i386_btop(vtophys(off)); #ifdef APERTURE /* minor device 4 is aperture driver */ case 4: diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c index 3f3f19879e9..ce9e6a98eb7 100644 --- a/sys/arch/i386/isa/pccons.c +++ b/sys/arch/i386/isa/pccons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccons.c,v 1.47 2001/05/16 05:07:48 millert Exp $ */ +/* $OpenBSD: pccons.c,v 1.48 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */ /*- @@ -1890,10 +1890,10 @@ loop: goto top; } -int +paddr_t pcmmap(dev, offset, nprot) dev_t dev; - int offset; + off_t offset; int nprot; { diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c index 4c7a5d700ab..b587b2b446e 100644 --- a/sys/arch/mac68k/dev/asc.c +++ b/sys/arch/mac68k/dev/asc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asc.c,v 1.11 2001/08/23 08:17:40 miod Exp $ */ +/* $OpenBSD: asc.c,v 1.12 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */ /* @@ -272,10 +272,10 @@ ascselect(dev, rw, p) return (0); } -int +paddr_t ascmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { int unit = ASCUNIT(dev); diff --git a/sys/arch/mac68k/dev/ascvar.h b/sys/arch/mac68k/dev/ascvar.h index e850f83707e..ff05129d144 100644 --- a/sys/arch/mac68k/dev/ascvar.h +++ b/sys/arch/mac68k/dev/ascvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ascvar.h,v 1.3 2001/08/23 08:17:40 miod Exp $ */ +/* $OpenBSD: ascvar.h,v 1.4 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: ascvar.h,v 1.3 1997/02/24 05:47:34 scottr Exp $ */ /* @@ -48,4 +48,4 @@ int ascread __P((dev_t, struct uio *, int)); int ascwrite __P((dev_t, struct uio *, int)); int ascioctl __P((dev_t, int, caddr_t, int, struct proc *p)); int ascselect __P((dev_t dev, int rw, struct proc *p)); -int ascmmap __P((dev_t dev, int off, int prot)); +paddr_t ascmmap __P((dev_t dev, off_t off, int prot)); diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c index d0f1810a74e..19e2ebd6cbf 100644 --- a/sys/arch/mac68k/dev/grf.c +++ b/sys/arch/mac68k/dev/grf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf.c,v 1.16 2001/09/11 20:05:24 miod Exp $ */ +/* $OpenBSD: grf.c,v 1.17 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: grf.c,v 1.41 1997/02/24 06:20:04 scottr Exp $ */ /* @@ -271,10 +271,10 @@ grfselect(dev, rw, p) } /*ARGSUSED*/ -int +paddr_t grfmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { int unit = GRFUNIT(dev); diff --git a/sys/arch/mac68k/dev/grfvar.h b/sys/arch/mac68k/dev/grfvar.h index f4ad26636d0..f6031403ab6 100644 --- a/sys/arch/mac68k/dev/grfvar.h +++ b/sys/arch/mac68k/dev/grfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: grfvar.h,v 1.8 1997/05/01 03:36:51 briggs Exp $ */ +/* $OpenBSD: grfvar.h,v 1.9 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: grfvar.h,v 1.11 1996/08/04 06:03:58 scottr Exp $ */ /* @@ -144,7 +144,7 @@ int grfopen __P((dev_t dev, int flag, int mode, struct proc *p)); int grfclose __P((dev_t dev, int flag, int mode, struct proc *p)); int grfioctl __P((dev_t, int, caddr_t, int, struct proc *p)); int grfselect __P((dev_t dev, int rw, struct proc *p)); -int grfmmap __P((dev_t dev, int off, int prot)); +paddr_t grfmmap __P((dev_t dev, off_t off, int prot)); int grfon __P((dev_t dev)); int grfoff __P((dev_t dev)); int grfaddr __P((struct grf_softc *gp, register int off)); diff --git a/sys/arch/mac68k/mac68k/mem.c b/sys/arch/mac68k/mac68k/mem.c index 34d0c7b4f77..764078ea26f 100644 --- a/sys/arch/mac68k/mac68k/mem.c +++ b/sys/arch/mac68k/mac68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.14 2001/07/25 13:25:32 art Exp $ */ +/* $OpenBSD: mem.c,v 1.15 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.22 1999/03/27 00:30:07 mycroft Exp $ */ /* @@ -211,10 +211,11 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { /* * /dev/mem is the only one that makes sense through this diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c index 30b861109b9..5c56aa1d18e 100644 --- a/sys/arch/macppc/macppc/mem.c +++ b/sys/arch/macppc/macppc/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.1 2001/09/01 15:44:20 drahn Exp $ */ +/* $OpenBSD: mem.c,v 1.2 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -163,10 +163,11 @@ mmrw(dev, uio, flags) return error; } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); } diff --git a/sys/arch/mvme68k/dev/flash.c b/sys/arch/mvme68k/dev/flash.c index 3bafb882bea..bd1907c403f 100644 --- a/sys/arch/mvme68k/dev/flash.c +++ b/sys/arch/mvme68k/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.8 2001/05/16 12:49:46 ho Exp $ */ +/* $OpenBSD: flash.c,v 1.9 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -474,10 +474,11 @@ tryerase: return (error); } -int +paddr_t flashmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct flashsoftc *sc = (struct flashsoftc *) flash_cd.cd_devs[unit]; diff --git a/sys/arch/mvme68k/dev/nvram.c b/sys/arch/mvme68k/dev/nvram.c index 5d32e7bcf1d..fe17a557c75 100644 --- a/sys/arch/mvme68k/dev/nvram.c +++ b/sys/arch/mvme68k/dev/nvram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvram.c,v 1.7 2001/01/04 04:00:51 smurph Exp $ */ +/* $OpenBSD: nvram.c,v 1.8 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -409,10 +409,11 @@ int flags; * will also be mmap'd, due to NBPG being 4K. On the MVME147 the NVRAM * repeats, so userland gets two copies back-to-back. */ -int +paddr_t nvrammmap(dev, off, prot) -dev_t dev; -int off, prot; + dev_t dev; + off_t off; + int prot; { int unit = minor(dev); struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; diff --git a/sys/arch/mvme68k/dev/sram.c b/sys/arch/mvme68k/dev/sram.c index 4175f2cea99..09228b823b9 100644 --- a/sys/arch/mvme68k/dev/sram.c +++ b/sys/arch/mvme68k/dev/sram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sram.c,v 1.5 1997/11/20 17:02:31 etheisen Exp $ */ +/* $OpenBSD: sram.c,v 1.6 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -217,10 +217,11 @@ sramwrite(dev, uio, flags) return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } -int +paddr_t srammmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c index 1762bc20fbe..aba946017de 100644 --- a/sys/arch/mvme68k/dev/vmel.c +++ b/sys/arch/mvme68k/dev/vmel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmel.c,v 1.5 1996/12/11 21:04:14 deraadt Exp $ */ +/* $OpenBSD: vmel.c,v 1.6 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -155,10 +155,10 @@ vmelwrite(dev, uio, flags) return (vmerw(sc->sc_vme, uio, flags, BUS_VMEL)); } -int +paddr_t vmelmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { int unit = minor(dev); diff --git a/sys/arch/mvme68k/dev/vmes.c b/sys/arch/mvme68k/dev/vmes.c index f4fb5c564bb..fa79cc6e4a5 100644 --- a/sys/arch/mvme68k/dev/vmes.c +++ b/sys/arch/mvme68k/dev/vmes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmes.c,v 1.6 1997/02/05 15:50:56 deraadt Exp $ */ +/* $OpenBSD: vmes.c,v 1.7 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -155,10 +155,10 @@ vmeswrite(dev, uio, flags) return (vmerw(sc->sc_vme, uio, flags, BUS_VMES)); } -int +paddr_t vmesmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { int unit = minor(dev); diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c index 4d64e7b1d04..3a58c6c6986 100644 --- a/sys/arch/mvme68k/mvme68k/mem.c +++ b/sys/arch/mvme68k/mvme68k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.15 2001/07/25 13:25:32 art Exp $ */ +/* $OpenBSD: mem.c,v 1.16 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -232,10 +232,11 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { /* * /dev/mem is the only one that makes sense through this diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c index a2a54b3eac0..3c1b526a4ef 100644 --- a/sys/arch/mvme88k/dev/nvram.c +++ b/sys/arch/mvme88k/dev/nvram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvram.c,v 1.11 2001/08/26 02:37:07 miod Exp $ */ +/* $OpenBSD: nvram.c,v 1.12 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -82,7 +82,7 @@ int nvramioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)); int nvramread __P((dev_t dev, struct uio *uio, int flags)); int nvramwrite __P((dev_t dev, struct uio *uio, int flags)); -int nvrammmap __P((dev_t dev, int off, int prot)); +paddr_t nvrammmap __P((dev_t dev, off_t off, int prot)); u_long chiptotime __P((int, int, int, int, int, int)); @@ -487,10 +487,11 @@ nvramwrite(dev, uio, flags) * will also be mmap'd, due to NBPG being 4K. On the MVME147 the NVRAM * repeats, so userland gets two copies back-to-back. */ -int +paddr_t nvrammmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; diff --git a/sys/arch/mvme88k/dev/sram.c b/sys/arch/mvme88k/dev/sram.c index 79c128a33a0..c8ffa6923bc 100644 --- a/sys/arch/mvme88k/dev/sram.c +++ b/sys/arch/mvme88k/dev/sram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sram.c,v 1.2 2001/06/14 21:30:34 miod Exp $ */ +/* $OpenBSD: sram.c,v 1.3 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -205,10 +205,11 @@ sramwrite(dev, uio, flags) return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } -int +paddr_t srammmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c index 8c91db1892b..4b6660783e1 100644 --- a/sys/arch/mvme88k/dev/vmel.c +++ b/sys/arch/mvme88k/dev/vmel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmel.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */ +/* $OpenBSD: vmel.c,v 1.6 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -65,7 +65,7 @@ int vmelclose __P((dev_t, int, int)); int vmelioctl __P((dev_t, int, caddr_t, int, struct proc *)); int vmelread __P((dev_t, struct uio *, int)); int vmelwrite __P((dev_t, struct uio *, int)); -int vmelmmap __P((dev_t, int, int)); +paddr_t vmelmmap __P((dev_t, off_t, int)); int vmelmatch(parent, cf, args) @@ -161,10 +161,11 @@ vmelwrite(dev, uio, flags) return (vmerw(sc->sc_vme, uio, flags, BUS_VMEL)); } -int +paddr_t vmelmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c index 4832d7f73cc..f907c093b1e 100644 --- a/sys/arch/mvme88k/dev/vmes.c +++ b/sys/arch/mvme88k/dev/vmes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmes.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */ +/* $OpenBSD: vmes.c,v 1.6 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -65,7 +65,7 @@ int vmesclose __P((dev_t, int, int)); int vmesioctl __P((dev_t, int, caddr_t, int, struct proc *)); int vmesread __P((dev_t, struct uio *, int)); int vmeswrite __P((dev_t, struct uio *, int)); -int vmesmmap __P((dev_t, int, int)); +paddr_t vmesmmap __P((dev_t, off_t, int)); int vmesmatch(parent, cf, args) @@ -161,10 +161,11 @@ vmeswrite(dev, uio, flags) return (vmerw(sc->sc_vme, uio, flags, BUS_VMES)); } -int +paddr_t vmesmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { int unit = minor(dev); struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c index 522f5bb0b12..d3770956fb4 100644 --- a/sys/arch/mvme88k/mvme88k/mem.c +++ b/sys/arch/mvme88k/mvme88k/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.11 2001/08/26 14:31:12 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.12 2001/11/01 12:13:46 art Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -61,7 +61,7 @@ caddr_t zeropage; int mmopen __P((dev_t, int, int)); int mmclose __P((dev_t, int, int)); int mmrw __P((dev_t, struct uio *, int)); -int mmmmap __P((dev_t, int, int)); +paddr_t mmmmap __P((dev_t, off_t, int)); int mmioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); /*ARGSUSED*/ @@ -217,10 +217,11 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); } diff --git a/sys/arch/mvmeppc/dev/mem.c b/sys/arch/mvmeppc/dev/mem.c index ec3e4b35481..60f11f0c53e 100644 --- a/sys/arch/mvmeppc/dev/mem.c +++ b/sys/arch/mvmeppc/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.2 2001/08/21 22:10:10 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.3 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -155,10 +155,11 @@ mmrw(dev, uio, flags) return error; } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); } 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; diff --git a/sys/arch/sparc/include/fbvar.h b/sys/arch/sparc/include/fbvar.h index 75117be959c..a9491f2eda9 100644 --- a/sys/arch/sparc/include/fbvar.h +++ b/sys/arch/sparc/include/fbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fbvar.h,v 1.3 1997/08/08 08:26:18 downsj Exp $ */ +/* $OpenBSD: fbvar.h,v 1.4 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: fbvar.h,v 1.9 1997/07/07 23:31:30 pk Exp $ */ /* @@ -60,7 +60,7 @@ struct fbdriver { int (*fbd_open) __P((dev_t, int, int, struct proc *)); int (*fbd_close) __P((dev_t, int, int, struct proc *)); int (*fbd_ioctl) __P((dev_t, u_long, caddr_t, int, struct proc *)); - int (*fbd_mmap) __P((dev_t, int, int)); + paddr_t (*fbd_mmap) __P((dev_t, off_t, int)); #ifdef notyet void (*fbd_wrrop)(); /* `write region' rasterop */ void (*fbd_cprop)(); /* `copy region' rasterop */ diff --git a/sys/arch/sparc/sparc/mem.c b/sys/arch/sparc/sparc/mem.c index 434dec5bcd6..a614e4b2a9e 100644 --- a/sys/arch/sparc/sparc/mem.c +++ b/sys/arch/sparc/sparc/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.17 2001/09/19 20:50:57 mickey Exp $ */ +/* $OpenBSD: mem.c,v 1.18 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.13 1996/03/30 21:12:16 christos Exp $ */ /* @@ -218,10 +218,11 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); diff --git a/sys/arch/sparc64/sparc64/mem.c b/sys/arch/sparc64/sparc64/mem.c index c6f8c040f0f..17f8ae8bf46 100644 --- a/sys/arch/sparc64/sparc64/mem.c +++ b/sys/arch/sparc64/sparc64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.3 2001/08/20 20:23:53 jason Exp $ */ +/* $OpenBSD: mem.c,v 1.4 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.18 2001/04/24 04:31:12 thorpej Exp $ */ /* @@ -266,10 +266,10 @@ unlock: return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off; + off_t off; int prot; { 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; diff --git a/sys/arch/vax/vax/mem.c b/sys/arch/vax/vax/mem.c index f381ab3dbe8..4d96ac7bb7b 100644 --- a/sys/arch/vax/vax/mem.c +++ b/sys/arch/vax/vax/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.8 2001/05/05 20:56:57 art Exp $ */ +/* $OpenBSD: mem.c,v 1.9 2001/11/01 12:13:46 art Exp $ */ /* $NetBSD: mem.c,v 1.15 1999/03/24 05:51:17 mrg Exp $ */ /* @@ -64,7 +64,7 @@ caddr_t zeropage; int mmopen __P((dev_t, int, int)); int mmclose __P((dev_t, int, int)); int mmrw __P((dev_t, struct uio *, int)); -int mmmmap __P((dev_t, int, int)); +paddr_t mmmmap __P((dev_t, off_t, int)); /*ARGSUSED*/ @@ -172,10 +172,11 @@ mmrw(dev, uio, flags) return (error); } -int +paddr_t mmmmap(dev, off, prot) dev_t dev; - int off, prot; + off_t off; + int prot; { return (-1); |