From 5ab7d519a3dcd4edc0b39a732a45696c517c46ea Mon Sep 17 00:00:00 2001 From: jdolecek Date: Mon, 28 Oct 2002 13:33:07 +0000 Subject: [PATCH] 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 --- sys/arch/evbmips/conf/files.malta | 3 +- sys/arch/evbmips/conf/files.pb1000 | 3 +- sys/arch/evbmips/evbmips/conf_common.c | 54 -------------------------- 3 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 sys/arch/evbmips/evbmips/conf_common.c diff --git a/sys/arch/evbmips/conf/files.malta b/sys/arch/evbmips/conf/files.malta index 81e0334d0bad..1460df16ce64 100644 --- a/sys/arch/evbmips/conf/files.malta +++ b/sys/arch/evbmips/conf/files.malta @@ -1,4 +1,4 @@ -# $NetBSD: files.malta,v 1.5 2002/09/09 06:40:42 simonb Exp $ +# $NetBSD: files.malta,v 1.6 2002/10/28 13:33:07 jdolecek Exp $ file arch/evbmips/malta/malta_bus_io.c file arch/evbmips/malta/malta_bus_mem.c @@ -11,7 +11,6 @@ file arch/evbmips/malta/machdep.c file arch/mips/mips/bus_dma.c file arch/evbmips/evbmips/clock.c -file arch/evbmips/evbmips/conf_common.c file arch/evbmips/evbmips/disksubr.c file arch/evbmips/evbmips/interrupt.c file arch/evbmips/evbmips/yamon.c # XXX should be in arch/mips/yamon ? diff --git a/sys/arch/evbmips/conf/files.pb1000 b/sys/arch/evbmips/conf/files.pb1000 index 35ddc607c0bb..d2332896e024 100644 --- a/sys/arch/evbmips/conf/files.pb1000 +++ b/sys/arch/evbmips/conf/files.pb1000 @@ -1,4 +1,4 @@ -# $NetBSD: files.pb1000,v 1.3 2002/09/09 06:40:42 simonb Exp $ +# $NetBSD: files.pb1000,v 1.4 2002/10/28 13:33:07 jdolecek Exp $ file arch/evbmips/alchemy/pb1000_intr.c @@ -7,7 +7,6 @@ file arch/evbmips/alchemy/machdep.c file arch/mips/mips/bus_dma.c file arch/evbmips/evbmips/clock.c -file arch/evbmips/evbmips/conf_common.c file arch/evbmips/evbmips/disksubr.c file arch/evbmips/evbmips/interrupt.c file arch/evbmips/evbmips/yamon.c diff --git a/sys/arch/evbmips/evbmips/conf_common.c b/sys/arch/evbmips/evbmips/conf_common.c deleted file mode 100644 index a1159b77b9e7..000000000000 --- a/sys/arch/evbmips/evbmips/conf_common.c +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: conf_common.c,v 1.4 2002/09/06 13:18:43 gehenna 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. - */ - -#include /* RCS ID & Copyright macro defns */ - -__KERNEL_RCSID(0, "$NetBSD: conf_common.c,v 1.4 2002/09/06 13:18:43 gehenna Exp $"); - -#include -#include - -/* - * Returns true if dev is /dev/mem or /dev/kmem. - */ -int -iskmemdev(dev_t dev) -{ - - return (major(dev) == mem_no && minor(dev) < 2); -}