Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch Pull up mmap paddr_t/off_t changes from trunk.



details:   https://anonhg.NetBSD.org/src/rev/e27531718cd1
branches:  netbsd-1-5
changeset: 488339:e27531718cd1
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Jun 30 16:27:12 2000 +0000

description:
Pull up mmap paddr_t/off_t changes from trunk.

diffstat:

 sys/arch/alpha/alpha/mem.c                |   10 +-
 sys/arch/alpha/common/bus_dma.c           |   10 +-
 sys/arch/alpha/include/bus.h              |   10 +-
 sys/arch/alpha/tc/cfb.c                   |    8 +-
 sys/arch/amiga/amiga/mem.c                |   17 +-
 sys/arch/amiga/dev/grf.c                  |   11 +-
 sys/arch/amiga/dev/view.c                 |    9 +-
 sys/arch/arc/arc/bus_dma.c                |  881 ++++++++++++++++++++++++++++++
 sys/arch/arc/dev/pccons.c                 |    6 +-
 sys/arch/arc/include/bus.h                |  861 +++++++++++++++++++++++++++++
 sys/arch/arc/jazz/vga_jazzio.c            |    6 +-
 sys/arch/arm26/arm26/mem.c                |    7 +-
 sys/arch/arm26/vidc/arcvideo.c            |    8 +-
 sys/arch/arm32/arm32/bus_dma.c            |    8 +-
 sys/arch/arm32/arm32/mem.c                |    9 +-
 sys/arch/arm32/include/bus.h              |   10 +-
 sys/arch/arm32/include/vconsole.h         |    4 +-
 sys/arch/arm32/ofw/ofrom.c                |    7 +-
 sys/arch/arm32/shark/pccons.c             |    6 +-
 sys/arch/arm32/vidc/console/console.c     |    8 +-
 sys/arch/arm32/vidc/console/vidcconsole.c |    6 +-
 sys/arch/arm32/vidc/console/vidcvideo.c   |    8 +-
 sys/arch/atari/atari/bus.c                |    8 +-
 sys/arch/atari/atari/mem.c                |   14 +-
 sys/arch/atari/dev/grf.c                  |   15 +-
 sys/arch/atari/dev/view.c                 |   15 +-
 sys/arch/atari/include/bus.h              |    6 +-
 sys/arch/atari/vme/et4000.c               |    7 +-
 sys/arch/atari/vme/leo.c                  |    6 +-
 sys/arch/bebox/bebox/bus_dma.c            |    8 +-
 sys/arch/bebox/include/bus.h              |   10 +-
 sys/arch/bebox/isa/pccons.c               |    8 +-
 sys/arch/bebox/pci/pfb.c                  |    6 +-
 sys/arch/cobalt/cobalt/bus.c              |    8 +-
 sys/arch/cobalt/include/bus.h             |   10 +-
 sys/arch/hp300/dev/grf.c                  |   15 +-
 sys/arch/hp300/dev/grfvar.h               |    4 +-
 sys/arch/hp300/dev/hil.c                  |    7 +-
 sys/arch/hp300/hp300/mem.c                |   16 +-
 sys/arch/hpcmips/dev/bivideo.c            |    8 +-
 sys/arch/hpcmips/dev/hpcfb.c              |    8 +-
 sys/arch/hpcmips/dev/hpcfbvar.h           |    4 +-
 sys/arch/hpcmips/dev/plumvideo.c          |    6 +-
 sys/arch/hpcmips/dev/ucbsnd.c             |    7 +-
 sys/arch/hpcmips/hpcmips/bus_dma.c        |    8 +-
 sys/arch/hpcmips/include/bus.h            |   10 +-
 sys/arch/hpcmips/tx/tx3912video.c         |    6 +-
 sys/arch/i386/i386/bus_machdep.c          |    8 +-
 sys/arch/i386/i386/mem.c                  |   37 +-
 sys/arch/i386/include/bus.h               |   10 +-
 sys/arch/i386/isa/pccons.c                |    8 +-
 sys/arch/luna68k/dev/lunafb.c             |   16 +-
 sys/arch/luna68k/luna68k/mem.c            |   11 +-
 sys/arch/mac68k/dev/grf_compat.c          |   10 +-
 sys/arch/mac68k/dev/macfb.c               |   10 +-
 sys/arch/mac68k/mac68k/mem.c              |    7 +-
 sys/arch/mac68k/obio/asc.c                |    6 +-
 sys/arch/mac68k/obio/ascvar.h             |    4 +-
 sys/arch/macppc/dev/nvram.c               |    7 +-
 sys/arch/macppc/dev/ofb.c                 |    6 +-
 sys/arch/macppc/include/bus.h             |   10 +-
 sys/arch/macppc/macppc/bus_dma.c          |    8 +-
 sys/arch/mips/mips/mem.c                  |    7 +-
 sys/arch/mvme68k/include/bus_dma.h        |   10 +-
 sys/arch/mvme68k/mvme68k/bus_dma.c        |   10 +-
 sys/arch/mvme68k/mvme68k/mem.c            |    7 +-
 sys/arch/news68k/news68k/mem.c            |    7 +-
 sys/arch/newsmips/dev/fb.c                |   15 +-
 sys/arch/next68k/dev/bus_dma.c            |   10 +-
 sys/arch/next68k/dev/nextdisplay.c        |    6 +-
 sys/arch/next68k/include/bus_dma.h        |   10 +-
 sys/arch/next68k/next68k/mem.c            |    7 +-
 sys/arch/pc532/pc532/mem.c                |   37 +-
 sys/arch/pmax/dev/fb_usrreq.c             |   11 +-
 sys/arch/pmax/dev/px.c                    |    9 +-
 sys/arch/pmax/dev/rcons.c                 |   10 +-
 sys/arch/pmax/include/bus.h               |   10 +-
 sys/arch/pmax/pmax/bus_dma.c              |    8 +-
 sys/arch/powerpc/powerpc/mem.c            |    7 +-
 sys/arch/prep/include/bus.h               |   10 +-
 sys/arch/prep/isa/pccons.c                |    8 +-
 sys/arch/prep/prep/bus_dma.c              |    8 +-
 sys/arch/sgimips/include/bus.h            |   10 +-
 sys/arch/sgimips/sgimips/bus.c            |    8 +-
 84 files changed, 2148 insertions(+), 365 deletions(-)

diffs (truncated from 4198 to 300 lines):

diff -r 3874684c56f3 -r e27531718cd1 sys/arch/alpha/alpha/mem.c
--- a/sys/arch/alpha/alpha/mem.c        Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/alpha/alpha/mem.c        Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
+/* $NetBSD: mem.c,v 1.26.4.1 2000/06/30 16:27:12 simonb Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26.4.1 2000/06/30 16:27:12 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -190,10 +190,10 @@
        return (error);
 }
 
-int
+paddr_t
 mmmmap(dev, off, prot)
        dev_t dev;
-       int off;                        /* XXX */
+       off_t off;
        int prot;
 {
        /*
@@ -210,7 +210,7 @@
        /*
         * Allow access only in RAM.
         */
-       if ((prot & alpha_pa_access(atop((paddr_t)off))) != prot)
+       if ((prot & alpha_pa_access(atop(off))) != prot)
                return (-1);
        return (alpha_btop(off));
 }
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/alpha/common/bus_dma.c
--- a/sys/arch/alpha/common/bus_dma.c   Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/alpha/common/bus_dma.c   Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.36 2000/02/06 01:23:30 thorpej Exp $ */
+/* $NetBSD: bus_dma.c,v 1.36.4.1 2000/06/30 16:27:13 simonb Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36 2000/02/06 01:23:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36.4.1 2000/06/30 16:27:13 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -645,11 +645,13 @@
  * Common functin for mmap(2)'ing DMA-safe memory.  May be called by
  * bus-specific DMA mmap(2)'ing functions.
  */
-int
+paddr_t
 _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags)
        bus_dma_tag_t t;
        bus_dma_segment_t *segs;
-       int nsegs, off, prot, flags;
+       int nsegs;
+       off_t off;
+       int prot, flags;
 {
        int i;
 
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/alpha/include/bus.h
--- a/sys/arch/alpha/include/bus.h      Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/alpha/include/bus.h      Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.39 2000/06/08 03:10:06 thorpej Exp $ */
+/* $NetBSD: bus.h,v 1.39.2.1 2000/06/30 16:27:13 simonb Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -599,8 +599,8 @@
        int     (*_dmamem_map)(bus_dma_tag_t, bus_dma_segment_t *,
                    int, size_t, caddr_t *, int);
        void    (*_dmamem_unmap)(bus_dma_tag_t, caddr_t, size_t);
-       int     (*_dmamem_mmap)(bus_dma_tag_t, bus_dma_segment_t *,
-                   int, int, int, int);
+       paddr_t (*_dmamem_mmap)(bus_dma_tag_t, bus_dma_segment_t *,
+                   int, off_t, int, int);
 };
 
 #define        alphabus_dma_get_tag(t, b)                              \
@@ -701,8 +701,8 @@
            int nsegs, size_t size, caddr_t *kvap, int flags);
 void   _bus_dmamem_unmap(bus_dma_tag_t tag, caddr_t kva,
            size_t size);
-int    _bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs,
-           int nsegs, int off, int prot, int flags);
+paddr_t        _bus_dmamem_mmap(bus_dma_tag_t tag, bus_dma_segment_t *segs,
+           int nsegs, off_t off, int prot, int flags);
 #endif /* _ALPHA_BUS_DMA_PRIVATE */
 
 #endif /* _KERNEL */
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/alpha/tc/cfb.c
--- a/sys/arch/alpha/tc/cfb.c   Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/alpha/tc/cfb.c   Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.24 2000/03/26 10:32:52 nisimura Exp $ */
+/* $NetBSD: cfb.c,v 1.24.4.1 2000/06/30 16:27:14 simonb Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.24 2000/03/26 10:32:52 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.24.4.1 2000/06/30 16:27:14 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,7 +94,7 @@
 };
 
 int    cfbioctl __P((void *, u_long, caddr_t, int, struct proc *));
-int    cfbmmap __P((void *, off_t, int));
+paddr_t        cfbmmap __P((void *, off_t, int));
 
 int    cfbintr __P((void *));
 static int     cfb_alloc_screen __P((void *, const struct wsscreen_descr *,
@@ -296,7 +296,7 @@
        return (-1);
 }
 
-int
+paddr_t
 cfbmmap(v, offset, prot)
        void *v;
        off_t offset;
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/amiga/amiga/mem.c
--- a/sys/arch/amiga/amiga/mem.c        Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/amiga/amiga/mem.c        Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem.c,v 1.26 1999/12/04 21:20:02 ragge Exp $   */
+/*     $NetBSD: mem.c,v 1.26.4.1 2000/06/30 16:27:14 simonb Exp $      */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -58,16 +58,14 @@
 
 #include <uvm/uvm_extern.h>
 
+#define mmread  mmrw
+#define mmwrite mmrw
+cdev_decl(mm);
+
 extern int kernel_reload_write(struct uio *uio);
 extern u_int lowram;
 static 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));
-
-
 /*ARGSUSED*/
 int
 mmopen(dev, flag, mode, p)
@@ -232,10 +230,11 @@
        return (error);
 }
 
-int
+paddr_t
 mmmmap(dev, off, prot)
        dev_t dev;
-       int off, prot;
+       off_t off;
+       int prot;
 {
 
        return (-1);
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/amiga/dev/grf.c
--- a/sys/arch/amiga/dev/grf.c  Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/amiga/dev/grf.c  Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf.c,v 1.34 1999/08/16 19:55:27 is Exp $      */
+/*     $NetBSD: grf.c,v 1.34.12.1 2000/06/30 16:27:14 simonb Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -318,10 +318,11 @@
  * 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;
@@ -333,7 +334,7 @@
         * control registers
         */
        if (off >= 0 && off < gi->gd_regsize)
-               return(((u_int)gi->gd_regaddr + off) >> PGSHIFT);
+               return(((paddr_t)gi->gd_regaddr + off) >> PGSHIFT);
 
        /*
         * frame buffer
@@ -344,7 +345,7 @@
                if (gi->gd_bank_size)
                        off %= gi->gd_bank_size;
 #endif
-               return(((u_int)gi->gd_fbaddr + off) >> PGSHIFT);
+               return(((paddr_t)gi->gd_fbaddr + off) >> PGSHIFT);
        }
        /* bogus */
        return(-1);
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/amiga/dev/view.c
--- a/sys/arch/amiga/dev/view.c Fri Jun 30 13:58:16 2000 +0000
+++ b/sys/arch/amiga/dev/view.c Fri Jun 30 16:27:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: view.c,v 1.16 1996/10/13 03:07:35 christos Exp $       */
+/*     $NetBSD: view.c,v 1.16.38.1 2000/06/30 16:27:15 simonb Exp $    */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -390,10 +390,11 @@
 }
 
 /*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;
@@ -406,7 +407,7 @@
        bmd_size = bm->bytes_per_row*bm->rows*bm->depth;
 
        if (off >= 0 && off < bmd_size)
-               return(((u_int)bmd_start + off) >> PGSHIFT);
+               return(((paddr_t)bmd_start + off) >> PGSHIFT);
 
        return(-1);
 }
diff -r 3874684c56f3 -r e27531718cd1 sys/arch/arc/arc/bus_dma.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arc/arc/bus_dma.c        Fri Jun 30 16:27:12 2000 +0000
@@ -0,0 +1,881 @@
+/*     $NetBSD: bus_dma.c,v 1.2.2.2 2000/06/30 16:27:15 simonb Exp $   */
+/*     NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp         */
+
+/*-
+ * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
+ * NASA Ames Research Center.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.



Home | Main Index | Thread Index | Old Index