diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index 6b8362035eb0..c5ccd8f042fc 100644 --- a/sbin/ccdconfig/ccdconfig.c +++ b/sbin/ccdconfig/ccdconfig.c @@ -40,7 +40,6 @@ static const char rcsid[] = #include #include #include -#include #include #include #include diff --git a/sys/alpha/alpha/cpuconf.c b/sys/alpha/alpha/cpuconf.c index b9b2b313fa36..4a92ae97466c 100644 --- a/sys/alpha/alpha/cpuconf.c +++ b/sys/alpha/alpha/cpuconf.c @@ -32,7 +32,6 @@ */ #include -#include #include #include #include diff --git a/sys/alpha/alpha/dec_2100_a50.c b/sys/alpha/alpha/dec_2100_a50.c index e948cfcb7d43..9a5df7d0f5b9 100644 --- a/sys/alpha/alpha/dec_2100_a50.c +++ b/sys/alpha/alpha/dec_2100_a50.c @@ -1,4 +1,5 @@ /* $NetBSD: dec_2100_a50.c,v 1.39 1998/04/17 02:45:19 mjacob Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -37,7 +38,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_3000_300.c b/sys/alpha/alpha/dec_3000_300.c index 1c465dcde7de..f1355601f4a6 100644 --- a/sys/alpha/alpha/dec_3000_300.c +++ b/sys/alpha/alpha/dec_3000_300.c @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * Copyright (c) 1997 by Matthew Jacob * NASA AMES Research Center. @@ -32,7 +33,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_3000_500.c b/sys/alpha/alpha/dec_3000_500.c index f9b6770cec0f..e4f68bf6d094 100644 --- a/sys/alpha/alpha/dec_3000_500.c +++ b/sys/alpha/alpha/dec_3000_500.c @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * Copyright (c) 1997 by Matthew Jacob * NASA AMES Research Center. @@ -32,7 +33,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_axppci_33.c b/sys/alpha/alpha/dec_axppci_33.c index 98970b91fdcf..44bd5d26016a 100644 --- a/sys/alpha/alpha/dec_axppci_33.c +++ b/sys/alpha/alpha/dec_axppci_33.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_eb164.c b/sys/alpha/alpha/dec_eb164.c index 20884072c0a7..cdbee6a7d528 100644 --- a/sys/alpha/alpha/dec_eb164.c +++ b/sys/alpha/alpha/dec_eb164.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_eb64plus.c b/sys/alpha/alpha/dec_eb64plus.c index 19a7bd5aa208..429fec2b6089 100644 --- a/sys/alpha/alpha/dec_eb64plus.c +++ b/sys/alpha/alpha/dec_eb64plus.c @@ -52,7 +52,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_kn20aa.c b/sys/alpha/alpha/dec_kn20aa.c index df06bea27348..1956f81e1183 100644 --- a/sys/alpha/alpha/dec_kn20aa.c +++ b/sys/alpha/alpha/dec_kn20aa.c @@ -1,4 +1,5 @@ /* $NetBSD: dec_kn20aa.c,v 1.38 1998/04/17 02:45:19 mjacob Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -34,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_kn8ae.c b/sys/alpha/alpha/dec_kn8ae.c index d205d38e0a39..44caf9460b5a 100644 --- a/sys/alpha/alpha/dec_kn8ae.c +++ b/sys/alpha/alpha/dec_kn8ae.c @@ -35,7 +35,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_st550.c b/sys/alpha/alpha/dec_st550.c index 853730c2ec8f..37a79ab809c8 100644 --- a/sys/alpha/alpha/dec_st550.c +++ b/sys/alpha/alpha/dec_st550.c @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. * All rights reserved. @@ -40,7 +41,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/dec_st6600.c b/sys/alpha/alpha/dec_st6600.c index 1175b5cc4e3e..e7c74167c4cf 100644 --- a/sys/alpha/alpha/dec_st6600.c +++ b/sys/alpha/alpha/dec_st6600.c @@ -34,7 +34,6 @@ #include #include -#include #include #include diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 1e4d07d6950b..0de813302338 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -51,7 +51,6 @@ #include #ifdef EVCNT_COUNTERS -#include struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */ #else #include diff --git a/sys/alpha/tlsb/tlsbmem.c b/sys/alpha/tlsb/tlsbmem.c index c46306c80031..6d61e095cf7b 100644 --- a/sys/alpha/tlsb/tlsbmem.c +++ b/sys/alpha/tlsb/tlsbmem.c @@ -1,4 +1,5 @@ /* $NetBSD: tlsbmem.c,v 1.6 1998/01/12 10:21:25 thorpej Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1997 by Matthew Jacob @@ -41,7 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: tlsbmem.c,v 1.6 1998/01/12 10:21:25 thorpej Exp $"); #include #include -#include #include #include diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 0c3909dbb2a0..03ba677aa176 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index d3c2a204a5fc..7ac31f36dbd5 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -65,7 +65,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 4ca4e813d896..7d3cc1ea0dcb 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/ata/atapi-all.c b/sys/dev/ata/atapi-all.c index a88db272b97d..f600108e269d 100644 --- a/sys/dev/ata/atapi-all.c +++ b/sys/dev/ata/atapi-all.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index 897bb2da5f52..662dc8623cad 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 9d2ef86bbab4..c4cc2bd10d9e 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -103,7 +103,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index 020920391280..769205f2f363 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -47,7 +47,6 @@ #include #include -#include #include #if NPCI > 0 diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 492010a5e17d..bca8abf19a3d 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index 70007fb87d43..4e97181471f1 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h index 91f87428ae14..ebb7b44e98fe 100644 --- a/sys/dev/vinum/vinumhdr.h +++ b/sys/dev/vinum/vinumhdr.h @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/vinum/vinumparser.c b/sys/dev/vinum/vinumparser.c index 48ec43bc2ae9..9487ce7204bd 100644 --- a/sys/dev/vinum/vinumparser.c +++ b/sys/dev/vinum/vinumparser.c @@ -71,7 +71,6 @@ #include #include #include -#include #include #include diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 9d2ef86bbab4..c4cc2bd10d9e 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -103,7 +103,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/i386/isa/bs/bsif.h b/sys/i386/isa/bs/bsif.h index 0c6347867656..193e2f9094dd 100644 --- a/sys/i386/isa/bs/bsif.h +++ b/sys/i386/isa/bs/bsif.h @@ -1,4 +1,5 @@ /* $NecBSD: bsif.h,v 1.5 1997/10/23 20:52:34 honda Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) HONDA Naofumi, KATO Takenori, 1996. All rights reserved. * @@ -105,7 +106,6 @@ #ifdef __FreeBSD__ #include -#include #include #include #include diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 6e9051cbd66e..9bbb7b4992c0 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -47,7 +47,6 @@ #include #include #include -#include /* * Autoconfiguration subroutines. diff --git a/sys/pci/ida_pci.c b/sys/pci/ida_pci.c index 70007fb87d43..4e97181471f1 100644 --- a/sys/pci/ida_pci.c +++ b/sys/pci/ida_pci.c @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/sys/svr4/svr4_stream.c b/sys/svr4/svr4_stream.c index d3c2a204a5fc..7ac31f36dbd5 100644 --- a/sys/svr4/svr4_stream.c +++ b/sys/svr4/svr4_stream.c @@ -65,7 +65,6 @@ #include #include #include -#include #include #include diff --git a/sys/sys/device.h b/sys/sys/device.h deleted file mode 100644 index fc5ce337439e..000000000000 --- a/sys/sys/device.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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, Lawrence Berkeley Laboratory. - * - * 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. - * - * @(#)device.h 8.2 (Berkeley) 2/17/94 - * $FreeBSD$ - */ - -#ifndef _SYS_DEVICE_H_ -#define _SYS_DEVICE_H_ - -#include - -/* - * Minimal device structures. - * Note that all ``system'' device types are listed here. - */ -enum devclass { - DV_DULL, /* generic, no special info */ - DV_CPU, /* CPU (carries resource utilization) */ - DV_DISK, /* disk drive (label, etc) */ - DV_IFNET, /* network interface */ - DV_TAPE, /* tape device */ - DV_TTY /* serial line interface (?) */ -}; - -struct device { - enum devclass dv_class; /* this device's classification */ - struct device *dv_next; /* next in list of all */ - struct cfdata *dv_cfdata; /* config data that found us */ - int dv_unit; /* device unit number */ - char dv_xname[16]; /* external name (name + unit) */ - struct device *dv_parent; /* pointer to parent device */ -}; - -/* `event' counters (use zero or more per device instance, as needed) */ -struct evcnt { - struct evcnt *ev_next; /* linked list */ - struct device *ev_dev; /* associated device */ - int ev_count; /* how many have occurred */ - char ev_name[8]; /* what to call them (systat display) */ -}; - -/* - * Configuration data (i.e., data placed in ioconf.c). - */ -struct cfdata { - struct cfdriver *cf_driver; /* config driver */ - short cf_unit; /* unit number */ - short cf_fstate; /* finding state (below) */ - int *cf_loc; /* locators (machine dependent) */ - int cf_flags; /* flags from config */ - short *cf_parents; /* potential parents */ - void (**cf_ivstubs) __P((void)); - /* config-generated vectors, if any */ -}; -#define FSTATE_NOTFOUND 0 /* has not been found */ -#define FSTATE_FOUND 1 /* has been found */ -#define FSTATE_STAR 2 /* duplicable */ - -typedef int (*cfmatch_t) __P((struct device *, struct cfdata *, void *)); - -/* - * `configuration' driver (what the machine-independent autoconf uses). - * As devices are found, they are applied against all the potential matches. - * The one with the best match is taken, and a device structure (plus any - * other data desired) is allocated. Pointers to these are placed into - * an array of pointers. The array itself must be dynamic since devices - * can be found long after the machine is up and running. - */ -struct cfdriver { - void **cd_devs; /* devices found */ - char *cd_name; /* device name */ - cfmatch_t cd_match; /* returns a match level */ - void (*cd_attach) __P((struct device *, struct device *, void *)); - enum devclass cd_class; /* device classification */ - size_t cd_devsize; /* size of dev data (for malloc) */ - void *cd_aux; /* additional driver, if any */ - int cd_ndevs; /* size of cd_devs array */ -}; - -struct intr_config_hook { - TAILQ_ENTRY(intr_config_hook) ich_links; - void (*ich_func) __P((void *arg)); - void *ich_arg; -}; - -/* - * Configuration printing functions, and their return codes. The second - * argument is NULL if the device was configured; otherwise it is the name - * of the parent device. The return value is ignored if the device was - * configured, so most functions can return UNCONF unconditionally. - */ -typedef int (*cfprint_t) __P((void *, char *)); -#define QUIET 0 /* print nothing */ -#define UNCONF 1 /* print " not configured\n" */ -#define UNSUPP 2 /* print " not supported\n" */ - -/* - * Pseudo-device attach information (function + number of pseudo-devs). - */ -struct pdevinit { - void (*pdev_attach) __P((int)); - int pdev_count; -}; - -extern struct device *alldevs; /* head of list of all devices */ -extern struct evcnt *allevents; /* head of list of all events */ - -struct cfdata *config_search __P((cfmatch_t, struct device *, void *)); -struct cfdata *config_rootsearch __P((cfmatch_t, char *, void *)); -int config_found __P((struct device *, void *, cfprint_t)); -int config_rootfound __P((char *, void *)); -void config_attach __P((struct device *, struct cfdata *, void *, cfprint_t)); -void evcnt_attach __P((struct device *, const char *, struct evcnt *)); -int config_intrhook_establish __P((struct intr_config_hook *hook)); -void config_intrhook_disestablish __P((struct intr_config_hook *hook)); - -#endif /* !_SYS_DEVICE_H_ */ diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index c6d984c1bb05..1dbc2159651b 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -49,6 +49,9 @@ #ifdef KERNEL +/* for intrhook below */ +#include + /* Global variables for the kernel. */ /* 1.1 */ @@ -286,4 +289,16 @@ SYSINIT(__Tunable_init_ ## var, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, __Tunable_ ## extern struct linker_set execsw_set; + + + +struct intr_config_hook { + TAILQ_ENTRY(intr_config_hook) ich_links; + void (*ich_func) __P((void *arg)); + void *ich_arg; +}; + +int config_intrhook_establish __P((struct intr_config_hook *hook)); +void config_intrhook_disestablish __P((struct intr_config_hook *hook)); + #endif /* !_SYS_KERNEL_H_*/