From 0a36a9ab42bf62363a53124813841de934bf316a Mon Sep 17 00:00:00 2001 From: tsutsui Date: Wed, 8 Jul 2009 12:23:09 +0000 Subject: [PATCH] Merge local into common . --- sys/arch/atari/atari/atari_init.c | 6 +-- sys/arch/atari/atari/intr.c | 6 +-- sys/arch/atari/atari/intr.h | 73 ---------------------------- sys/arch/atari/dev/atari5380.c | 7 ++- sys/arch/atari/dev/dma.c | 7 ++- sys/arch/atari/dev/hdfd.c | 6 +-- sys/arch/atari/dev/lpt.c | 6 +-- sys/arch/atari/dev/ser.c | 6 +-- sys/arch/atari/include/intr.h | 49 ++++++++++++++++++- sys/arch/atari/include/isa_machdep.h | 4 +- sys/arch/atari/include/pci_machdep.h | 4 +- sys/arch/atari/vme/if_le_vme.c | 6 +-- 12 files changed, 75 insertions(+), 105 deletions(-) delete mode 100644 sys/arch/atari/atari/intr.h diff --git a/sys/arch/atari/atari/atari_init.c b/sys/arch/atari/atari/atari_init.c index ed68625e126b..c8fd00ee49d6 100644 --- a/sys/arch/atari/atari/atari_init.c +++ b/sys/arch/atari/atari/atari_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari_init.c,v 1.82 2009/07/07 15:37:02 tsutsui Exp $ */ +/* $NetBSD: atari_init.c,v 1.83 2009/07/08 12:23:09 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.82 2009/07/07 15:37:02 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.83 2009/07/08 12:23:09 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -68,11 +68,11 @@ __KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.82 2009/07/07 15:37:02 tsutsui Exp #include #include #include +#include #include #include -#include #include #include #include diff --git a/sys/arch/atari/atari/intr.c b/sys/arch/atari/atari/intr.c index 56f29c35ffb8..ccdbbb38f5f6 100644 --- a/sys/arch/atari/atari/intr.c +++ b/sys/arch/atari/atari/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.18 2009/03/18 10:22:24 cegger Exp $ */ +/* $NetBSD: intr.c,v 1.19 2009/07/08 12:23:09 tsutsui Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.18 2009/03/18 10:22:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.19 2009/07/08 12:23:09 tsutsui Exp $"); #include #include @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.18 2009/03/18 10:22:24 cegger Exp $"); #include -#include +#include #define AVEC_MIN 1 #define AVEC_MAX 7 diff --git a/sys/arch/atari/atari/intr.h b/sys/arch/atari/atari/intr.h deleted file mode 100644 index 283175d9404a..000000000000 --- a/sys/arch/atari/atari/intr.h +++ /dev/null @@ -1,73 +0,0 @@ -/* $NetBSD: intr.h,v 1.5 2009/03/05 13:21:44 tsutsui Exp $ */ - -/*- - * Copyright (c) 1996 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Leo Weppelman. - * - * 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. - * - * 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. - */ -#ifndef _ATARI_ATARI_INTR_H_ -#define _ATARI_ATARI_INTR_H_ - -#include /* XXX: for clockframe */ - -#define AUTO_VEC 0x0001 /* We're dealing with an auto-vector */ -#define USER_VEC 0x0002 /* We're dealing with an user-vector */ - -#define FAST_VEC 0x0010 /* Fast, stash right into vector-table */ -#define ARG_CLOCKFRAME 0x0020 /* Supply clockframe as an argument */ - -/* - * Interrupt handler chains. intr_establish() inserts a handler into - * the list. The handler is called with its (single) argument or with a - * 'standard' clockframe. This depends on 'ih_type'. - */ -typedef int (*hw_ifun_t)(void *, int); - -struct intrhand { - LIST_ENTRY(intrhand) ih_link; - hw_ifun_t ih_fun; - void *ih_arg; - int ih_type; - int ih_pri; - int ih_vector; - u_long *ih_intrcnt; -}; - -void intr_init(void); -struct intrhand *intr_establish(int, int, int, hw_ifun_t, void *); -int intr_disestablish(struct intrhand *); -void intr_dispatch(struct clockframe); -void intr_glue(void); - -/* - * Exported by intrcnt.h - */ -extern u_long autovects[]; -extern u_long intrcnt_auto[]; -extern u_long uservects[]; -extern u_long intrcnt_user[]; - -#endif /* _ATARI_ATARI_INTR_H_ */ diff --git a/sys/arch/atari/dev/atari5380.c b/sys/arch/atari/dev/atari5380.c index 67eaed413e81..ad37c471db5c 100644 --- a/sys/arch/atari/dev/atari5380.c +++ b/sys/arch/atari/dev/atari5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: atari5380.c,v 1.51 2009/03/18 10:22:24 cegger Exp $ */ +/* $NetBSD: atari5380.c,v 1.52 2009/07/08 12:23:09 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.51 2009/03/18 10:22:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.52 2009/07/08 12:23:09 tsutsui Exp $"); #include "opt_atariscsi.h" @@ -61,8 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.51 2009/03/18 10:22:24 cegger Exp $" #include #include #include - -#include +#include #if defined(FALCON_SCSI) #include diff --git a/sys/arch/atari/dev/dma.c b/sys/arch/atari/dev/dma.c index 68a546c7b7e7..7e9ecbdce3f2 100644 --- a/sys/arch/atari/dev/dma.c +++ b/sys/arch/atari/dev/dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: dma.c,v 1.22 2009/03/18 10:22:24 cegger Exp $ */ +/* $NetBSD: dma.c,v 1.23 2009/07/08 12:23:09 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.22 2009/03/18 10:22:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.23 2009/07/08 12:23:09 tsutsui Exp $"); #include #include @@ -63,8 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.22 2009/03/18 10:22:24 cegger Exp $"); #include #include #include - -#include +#include #define NDMA_DEV 10 /* Max 2 floppy's, 8 hard-disks */ typedef struct dma_entry { diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c index 004a8791add2..214408826679 100644 --- a/sys/arch/atari/dev/hdfd.c +++ b/sys/arch/atari/dev/hdfd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd.c,v 1.70 2009/03/18 16:00:10 cegger Exp $ */ +/* $NetBSD: hdfd.c,v 1.71 2009/07/08 12:23:09 tsutsui Exp $ */ /*- * Copyright (c) 1996 Leo Weppelman @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.70 2009/03/18 16:00:10 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.71 2009/07/08 12:23:09 tsutsui Exp $"); #include "opt_ddb.h" @@ -120,9 +120,9 @@ __KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.70 2009/03/18 16:00:10 cegger Exp $"); #include #include #include +#include #include -#include #include #include "locators.h" diff --git a/sys/arch/atari/dev/lpt.c b/sys/arch/atari/dev/lpt.c index 183821513e47..5a6569736dc0 100644 --- a/sys/arch/atari/dev/lpt.c +++ b/sys/arch/atari/dev/lpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt.c,v 1.30 2008/06/13 08:50:12 cegger Exp $ */ +/* $NetBSD: lpt.c,v 1.31 2009/07/08 12:23:10 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.30 2008/06/13 08:50:12 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.31 2009/07/08 12:23:10 tsutsui Exp $"); #include #include @@ -74,9 +74,9 @@ __KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.30 2008/06/13 08:50:12 cegger Exp $"); #include #include #include +#include #include -#include #define TIMEOUT hz*16 /* wait up to 16 seconds for a ready */ #define STEP hz/4 diff --git a/sys/arch/atari/dev/ser.c b/sys/arch/atari/dev/ser.c index 0a6c6d80a03f..3ff5849240ba 100644 --- a/sys/arch/atari/dev/ser.c +++ b/sys/arch/atari/dev/ser.c @@ -1,4 +1,4 @@ -/* $NetBSD: ser.c,v 1.43 2009/07/03 17:05:54 tsutsui Exp $ */ +/* $NetBSD: ser.c,v 1.44 2009/07/08 12:23:10 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.43 2009/07/03 17:05:54 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.44 2009/07/08 12:23:10 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -119,7 +119,7 @@ __KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.43 2009/07/03 17:05:54 tsutsui Exp $"); #include #include -#include +#include #include #if !defined(_MILANHW_) diff --git a/sys/arch/atari/include/intr.h b/sys/arch/atari/include/intr.h index ec16b20b73cd..f8a2d3f4ca28 100644 --- a/sys/arch/atari/include/intr.h +++ b/sys/arch/atari/include/intr.h @@ -1,9 +1,12 @@ -/* $NetBSD: intr.h,v 1.20 2009/03/05 13:00:45 tsutsui Exp $ */ +/* $NetBSD: intr.h,v 1.21 2009/07/08 12:23:10 tsutsui Exp $ */ /*- - * Copyright (c) 1997, 2007 The NetBSD Foundation, Inc. + * Copyright (c) 1996, 1997, 2007 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software contributed to The NetBSD Foundation + * by Leo Weppelman. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -86,6 +89,48 @@ splraiseipl(ipl_cookie_t icookie) return _splraise(icookie._psl); } +#include +#include /* XXX: for clockframe */ + +struct clockframe; + +#define AUTO_VEC 0x0001 /* We're dealing with an auto-vector */ +#define USER_VEC 0x0002 /* We're dealing with an user-vector */ + +#define FAST_VEC 0x0010 /* Fast, stash right into vector-table */ +#define ARG_CLOCKFRAME 0x0020 /* Supply clockframe as an argument */ + +/* + * Interrupt handler chains. intr_establish() inserts a handler into + * the list. The handler is called with its (single) argument or with a + * 'standard' clockframe. This depends on 'ih_type'. + */ +typedef int (*hw_ifun_t)(void *, int); + +struct intrhand { + LIST_ENTRY(intrhand) ih_link; + hw_ifun_t ih_fun; + void *ih_arg; + int ih_type; + int ih_pri; + int ih_vector; + u_long *ih_intrcnt; +}; + +void intr_init(void); +struct intrhand *intr_establish(int, int, int, hw_ifun_t, void *); +int intr_disestablish(struct intrhand *); +void intr_dispatch(struct clockframe); +void intr_glue(void); + +/* + * Exported by intrcnt.h + */ +extern u_long autovects[]; +extern u_long intrcnt_auto[]; +extern u_long uservects[]; +extern u_long intrcnt_user[]; + #endif /* _KERNEL */ #endif /* _ATARI_INTR_H_ */ diff --git a/sys/arch/atari/include/isa_machdep.h b/sys/arch/atari/include/isa_machdep.h index 2b00d53654f1..d6c546c486bd 100644 --- a/sys/arch/atari/include/isa_machdep.h +++ b/sys/arch/atari/include/isa_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.12 2008/04/28 20:23:15 martin Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.13 2009/07/08 12:23:10 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -63,8 +63,8 @@ #define _ATARI_ISA_MACHDEP_H_ #include +#include #include -#include struct atari_isa_chipset { struct isa_dma_state ic_dmastate; diff --git a/sys/arch/atari/include/pci_machdep.h b/sys/arch/atari/include/pci_machdep.h index 53e34ec286d9..fdac52e6a14a 100644 --- a/sys/arch/atari/include/pci_machdep.h +++ b/sys/arch/atari/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.12 2005/12/11 12:16:59 christos Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.13 2009/07/08 12:23:10 tsutsui Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -34,7 +34,7 @@ #ifndef _ATARI_PCI_MACHDEP_H_ #define _ATARI_PCI_MACHDEP_H_ -#include +#include /* * Machine-specific definitions for PCI autoconfiguration. diff --git a/sys/arch/atari/vme/if_le_vme.c b/sys/arch/atari/vme/if_le_vme.c index ebcfddaaff6b..d6a54444d4bc 100644 --- a/sys/arch/atari/vme/if_le_vme.c +++ b/sys/arch/atari/vme/if_le_vme.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_vme.c,v 1.25 2009/03/18 17:06:43 cegger Exp $ */ +/* $NetBSD: if_le_vme.c,v 1.26 2009/07/08 12:23:10 tsutsui Exp $ */ /*- * Copyright (c) 1998 maximum entropy. All rights reserved. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.25 2009/03/18 17:06:43 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.26 2009/07/08 12:23:10 tsutsui Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -99,9 +99,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.25 2009/03/18 17:06:43 cegger Exp $" #include #include #include +#include #include -#include #include #include