Source-Changes-HG archive

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

[src/trunk]: src/sys now that mem_no is emitted by config(8), there is no rea...



details:   https://anonhg.NetBSD.org/src/rev/f985d8247efd
branches:  trunk
changeset: 538709:f985d8247efd
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Oct 26 13:50:17 2002 +0000

description:
now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies

diffstat:

 sys/arch/acorn26/acorn26/conf.c               |  14 +-----
 sys/arch/acorn32/acorn32/conf.c               |  12 +----
 sys/arch/algor/algor/conf.c                   |  54 -----------------------
 sys/arch/algor/conf/files.algor               |   3 +-
 sys/arch/alpha/alpha/conf.c                   |  54 -----------------------
 sys/arch/alpha/conf/files.alpha               |   3 +-
 sys/arch/amiga/amiga/conf.c                   |  15 +-----
 sys/arch/arc/arc/conf.c                       |  53 -----------------------
 sys/arch/arc/conf/files.arc                   |   3 +-
 sys/arch/arm/arm32/conf.c                     |  58 -------------------------
 sys/arch/atari/atari/conf.c                   |  13 +-----
 sys/arch/bebox/bebox/conf.c                   |  51 ----------------------
 sys/arch/bebox/conf/files.bebox               |   3 +-
 sys/arch/cats/conf/files.cats                 |   4 +-
 sys/arch/cesfic/cesfic/conf.c                 |  50 ----------------------
 sys/arch/cesfic/conf/files.cesfic             |   3 +-
 sys/arch/cobalt/cobalt/conf.c                 |  47 --------------------
 sys/arch/cobalt/conf/files.cobalt             |   3 +-
 sys/arch/dreamcast/dreamcast/conf.c           |  13 +-----
 sys/arch/evbarm/conf/files.evbarm             |   3 +-
 sys/arch/evbsh3/evbsh3/conf.c                 |  13 +-----
 sys/arch/hp300/conf/files.hp300               |   3 +-
 sys/arch/hp300/hp300/conf.c                   |  53 -----------------------
 sys/arch/hp700/hp700/conf.c                   |  13 +-----
 sys/arch/hpcarm/conf/files.hpcarm             |   4 +-
 sys/arch/hpcmips/conf/files.hpcmips           |   3 +-
 sys/arch/hpcmips/hpcmips/conf.c               |  52 -----------------------
 sys/arch/hpcsh/conf/files.hpcsh               |   3 +-
 sys/arch/hpcsh/hpcsh/conf.c                   |  46 --------------------
 sys/arch/i386/conf/files.i386                 |   3 +-
 sys/arch/i386/i386/conf.c                     |  54 -----------------------
 sys/arch/luna68k/conf/files.luna68k           |   3 +-
 sys/arch/luna68k/luna68k/conf.c               |  54 -----------------------
 sys/arch/mac68k/mac68k/conf.c                 |  14 +-----
 sys/arch/macppc/conf/files.macppc             |   3 +-
 sys/arch/macppc/macppc/conf.c                 |  45 -------------------
 sys/arch/mipsco/conf/files.mipsco             |   3 +-
 sys/arch/mipsco/mipsco/conf.c                 |  53 -----------------------
 sys/arch/mmeye/mmeye/conf.c                   |  13 +-----
 sys/arch/mvme68k/mvme68k/conf.c               |  13 +-----
 sys/arch/mvmeppc/conf/files.mvmeppc           |   3 +-
 sys/arch/mvmeppc/mvmeppc/conf.c               |  51 ----------------------
 sys/arch/netwinder/conf/files.netwinder       |   4 +-
 sys/arch/news68k/conf/files.news68k           |   3 +-
 sys/arch/news68k/news68k/conf.c               |  53 -----------------------
 sys/arch/newsmips/conf/files.newsmips         |   3 +-
 sys/arch/newsmips/newsmips/conf.c             |  53 -----------------------
 sys/arch/next68k/next68k/conf.c               |  13 +-----
 sys/arch/ofppc/ofppc/conf.c                   |  12 +----
 sys/arch/pc532/pc532/conf.c                   |  13 +-----
 sys/arch/playstation2/conf/files.playstation2 |   3 +-
 sys/arch/playstation2/playstation2/conf.c     |  46 --------------------
 sys/arch/pmax/conf/files.pmax                 |   3 +-
 sys/arch/pmax/pmax/conf.c                     |  53 -----------------------
 sys/arch/pmppc/conf/files.pmppc               |   3 +-
 sys/arch/pmppc/pmppc/conf.c                   |  51 ----------------------
 sys/arch/prep/conf/files.prep                 |   3 +-
 sys/arch/prep/prep/conf.c                     |  51 ----------------------
 sys/arch/sandpoint/conf/files.sandpoint       |   3 +-
 sys/arch/sandpoint/sandpoint/conf.c           |  51 ----------------------
 sys/arch/sgimips/conf/files.sgimips           |   3 +-
 sys/arch/sgimips/sgimips/conf.c               |  49 ---------------------
 sys/arch/sh5/sh5/conf.c                       |  13 +-----
 sys/arch/shark/shark/conf.c                   |  12 +----
 sys/arch/sparc/conf/files.sparc               |   3 +-
 sys/arch/sparc/sparc/conf.c                   |  61 ---------------------------
 sys/arch/sparc64/conf/files.sparc64           |   3 +-
 sys/arch/sparc64/sparc64/conf.c               |  61 ---------------------------
 sys/arch/sun2/conf/files.sun2                 |   3 +-
 sys/arch/sun2/sun2/conf.c                     |  51 ----------------------
 sys/arch/sun3/conf/files.sun3                 |   3 +-
 sys/arch/sun3/sun3/conf.c                     |  51 ----------------------
 sys/arch/vax/vax/conf.c                       |  13 +-----
 sys/arch/walnut/conf/files.walnut             |   3 +-
 sys/arch/walnut/walnut/conf.c                 |  45 -------------------
 sys/arch/x68k/x68k/conf.c                     |  13 +-----
 sys/arch/x86_64/conf/files.x86_64             |   3 +-
 sys/arch/x86_64/x86_64/conf.c                 |  51 ----------------------
 sys/miscfs/specfs/spec_vnops.c                |  17 ++++++-
 sys/sys/conf.h                                |   5 +-
 80 files changed, 67 insertions(+), 1778 deletions(-)

diffs (truncated from 2692 to 300 lines):

diff -r 2d966e3304cf -r f985d8247efd sys/arch/acorn26/acorn26/conf.c
--- a/sys/arch/acorn26/acorn26/conf.c   Sat Oct 26 13:49:11 2002 +0000
+++ b/sys/arch/acorn26/acorn26/conf.c   Sat Oct 26 13:50:17 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.5 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: conf.c,v 1.6 2002/10/26 13:50:18 jdolecek Exp $ */
 /*-
  * Copyright (c) 1998, 2000 Ben Harris
  * All rights reserved.
@@ -31,23 +31,13 @@
 
 #include <sys/param.h>
 
-__RCSID("$NetBSD: conf.c,v 1.5 2002/09/06 13:18:43 gehenna Exp $");
+__RCSID("$NetBSD: conf.c,v 1.6 2002/10/26 13:50:18 jdolecek Exp $");
 
 #include <sys/conf.h>
 #include <dev/cons.h>
 
 #include "rs.h"
 
-/*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;
-{
-       return (major(dev) == mem_no && minor(dev) < 2);
-}
-
 struct consdev constab[] = {
 #if NRS > 0
        cons_init(rs),
diff -r 2d966e3304cf -r f985d8247efd sys/arch/acorn32/acorn32/conf.c
--- a/sys/arch/acorn32/acorn32/conf.c   Sat Oct 26 13:49:11 2002 +0000
+++ b/sys/arch/acorn32/acorn32/conf.c   Sat Oct 26 13:50:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.8 2002/09/06 13:18:43 gehenna Exp $ */
+/*     $NetBSD: conf.c,v 1.9 2002/10/26 13:50:19 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -51,16 +51,6 @@
 #include "com.h"
 
 /*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;
-{
-       return (major(dev) == mem_no && minor(dev) < 2);
-}
-
-/*
  * This entire table could be autoconfig()ed but that would mean that
  * the kernel's idea of the console would be out of sync with that of
  * the standalone boot.  I think it best that they both use the same
diff -r 2d966e3304cf -r f985d8247efd sys/arch/algor/algor/conf.c
--- a/sys/arch/algor/algor/conf.c       Sat Oct 26 13:49:11 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*     $NetBSD: conf.c,v 1.8 2002/09/06 13:18:43 gehenna Exp $ */
-
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * 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 University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- *
- *      @(#)conf.c     7.9 (Berkeley) 5/28/91
- */
-
-#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.8 2002/09/06 13:18:43 gehenna Exp $");
-
-#include <sys/param.h>
-#include <sys/conf.h>
-
-/*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;
-{
-
-       return (major(dev) == mem_no && minor(dev) < 2);
-}
diff -r 2d966e3304cf -r f985d8247efd sys/arch/algor/conf/files.algor
--- a/sys/arch/algor/conf/files.algor   Sat Oct 26 13:49:11 2002 +0000
+++ b/sys/arch/algor/conf/files.algor   Sat Oct 26 13:50:17 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.algor,v 1.14 2002/09/06 13:18:43 gehenna Exp $
+#      $NetBSD: files.algor,v 1.15 2002/10/26 13:50:20 jdolecek Exp $
 
 # Algorithmics evaluation board specific configuration info.
 
@@ -37,7 +37,6 @@
 file   arch/algor/algor/bus_dma.c
 file   arch/algor/algor/clock.c
 file   dev/clock_subr.c
-file   arch/algor/algor/conf.c
 file   arch/algor/algor/disksubr.c
 file   arch/algor/algor/interrupt.c
 file   arch/algor/algor/led.c
diff -r 2d966e3304cf -r f985d8247efd sys/arch/alpha/alpha/conf.c
--- a/sys/arch/alpha/alpha/conf.c       Sat Oct 26 13:49:11 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/* $NetBSD: conf.c,v 1.67 2002/09/06 13:18:43 gehenna Exp $ */
-
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * 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 University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- *
- *      @(#)conf.c     7.9 (Berkeley) 5/28/91
- */
-
-#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.67 2002/09/06 13:18:43 gehenna Exp $");
-
-#include <sys/param.h>
-#include <sys/conf.h>
-
-/*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;
-{
-
-       return (major(dev) == mem_no && minor(dev) < 2);
-}
diff -r 2d966e3304cf -r f985d8247efd sys/arch/alpha/conf/files.alpha
--- a/sys/arch/alpha/conf/files.alpha   Sat Oct 26 13:49:11 2002 +0000
+++ b/sys/arch/alpha/conf/files.alpha   Sat Oct 26 13:50:17 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.158 2002/09/24 13:30:42 ad Exp $
+# $NetBSD: files.alpha,v 1.159 2002/10/26 13:50:21 jdolecek Exp $
 #
 # alpha-specific configuration info
 
@@ -470,7 +470,6 @@
 file   arch/alpha/alpha/autoconf.c
 file   arch/alpha/alpha/clock.c
 file   dev/clock_subr.c
-file   arch/alpha/alpha/conf.c
 file   arch/alpha/alpha/cpuconf.c
 file   arch/alpha/alpha/interrupt.c
 file   arch/alpha/alpha/ipifuncs.c             multiprocessor
diff -r 2d966e3304cf -r f985d8247efd sys/arch/amiga/amiga/conf.c
--- a/sys/arch/amiga/amiga/conf.c       Sat Oct 26 13:49:11 2002 +0000
+++ b/sys/arch/amiga/amiga/conf.c       Sat Oct 26 13:50:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.69 2002/09/06 13:18:43 gehenna Exp $        */
+/*     $NetBSD: conf.c,v 1.70 2002/10/26 13:50:21 jdolecek Exp $       */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.69 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.70 2002/10/26 13:50:21 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -48,17 +48,6 @@
 #include "amidisplaycc.h"
 
 /*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;
-{
-
-       return (major(dev) == mem_no && minor(dev) < 2);
-}
-
-/*
  * This entire table could be autoconfig()ed but that would mean that
  * the kernel's idea of the console would be out of sync with that of
  * the standalone boot.  I think it best that they both use the same
diff -r 2d966e3304cf -r f985d8247efd sys/arch/arc/arc/conf.c
--- a/sys/arch/arc/arc/conf.c   Sat Oct 26 13:49:11 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*     $NetBSD: conf.c,v 1.26 2002/09/06 13:18:43 gehenna Exp $        */
-/*     $OpenBSD: conf.c,v 1.27 1999/08/12 13:06:33 niklas Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ralph Campbell.
- *
- * 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 University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- *
- *     from: @(#)conf.c        8.2 (Berkeley) 11/14/93
- */
-
-#include <sys/param.h>
-#include <sys/conf.h>
-
-/*
- * Routine that identifies /dev/mem and /dev/kmem.
- */
-int
-iskmemdev(dev)
-       dev_t dev;



Home | Main Index | Thread Index | Old Index