diff options
author | phk <phk@FreeBSD.org> | 1996-09-06 23:09:20 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-06 23:09:20 +0000 |
commit | bca885205da7f15208946f0896edc2eda3caff01 (patch) | |
tree | 35dad08bf59366e84921fd4aad9718c2f9426a1b /sys/amd64 | |
parent | 9640e2d9e8f825813ec445d294de60884ad82bc8 (diff) | |
download | FreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.zip FreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.tar.gz |
Remove devconf, it never grew up to be of any use.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/fpu.c | 31 | ||||
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 16 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 10 | ||||
-rw-r--r-- | sys/amd64/isa/isa.c | 55 | ||||
-rw-r--r-- | sys/amd64/isa/npx.c | 31 |
5 files changed, 5 insertions, 138 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index ad03e2a..687ff73 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.29 1996/01/06 23:10:52 peter Exp $ + * $Id: npx.c,v 1.30 1996/06/25 20:30:38 bde Exp $ */ #include "npx.h" @@ -47,7 +47,6 @@ #include <sys/conf.h> #include <sys/file.h> #include <sys/proc.h> -#include <sys/devconf.h> #include <sys/ioctl.h> #include <sys/syslog.h> #include <sys/signalvar.h> @@ -158,30 +157,6 @@ _probetrap: iret "); -static struct kern_devconf kdc_npx[NNPX] = { { - 0, 0, 0, /* filled in by dev_attach */ - "npx", 0, { MDDT_ISA, 0 }, - isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_UNCONFIGURED, /* state */ - "Floating-point unit", - DC_CLS_MISC /* class */ -} }; - -static inline void -npx_registerdev(struct isa_device *id) -{ - int unit; - - unit = id->id_unit; - if (unit != 0) - kdc_npx[unit] = kdc_npx[0]; - kdc_npx[unit].kdc_unit = unit; - kdc_npx[unit].kdc_isa = id; - dev_attach(&kdc_npx[unit]); -} - /* * Probe routine. Initialize cr0 to give correct behaviour for [f]wait * whether the device exists or not (XXX should be elsewhere). Set flags @@ -205,7 +180,6 @@ npxprobe(dvp) * install suitable handlers and run with interrupts enabled so we * won't need to do so much here. */ - npx_registerdev(dvp); npx_intrno = NRSVIDT + ffs(dvp->id_irq) - 1; save_eflags = read_eflags(); disable_intr(); @@ -366,9 +340,6 @@ npxattach(dvp) printf("npx%d: no 387 emulator in kernel!\n", dvp->id_unit); #endif npxinit(__INITIAL_NPXCW__); - if (npx_exists) { - kdc_npx[dvp->id_unit].kdc_state = DC_BUSY; - } return (1); /* XXX unused */ } diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 4c49f3e..81a24e7 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.3 1996/08/10 06:35:35 peter Exp $ + * $Id: identcpu.c,v 1.4 1996/08/10 08:04:24 peter Exp $ */ #include <sys/param.h> @@ -43,7 +43,6 @@ #include <sys/sysproto.h> #include <sys/kernel.h> #include <sys/sysctl.h> -#include <sys/devconf.h> #include <machine/cpu.h> #include <machine/reg.h> @@ -51,7 +50,6 @@ #include <machine/clock.h> #include <machine/specialreg.h> #include <machine/sysarch.h> -#include <machine/devconf.h> #include <machine/md_var.h> /* XXX - should be in header file */ @@ -69,17 +67,6 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, ""); -struct kern_devconf kdc_cpu0 = { - 0, 0, 0, /* filled in by dev_attach */ - "cpu", 0, { MDDT_CPU }, - 0, 0, 0, CPU_EXTERNALLEN, - 0, /* CPU has no parent */ - 0, /* no parentdata */ - DC_BUSY, /* the CPU is always busy */ - cpu_model, /* no sense in duplication */ - DC_CLS_CPU /* class */ -}; - static struct cpu_nameclass i386_cpus[] = { { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ { "i386SX", CPUCLASS_386 }, /* CPU_386SX */ @@ -273,7 +260,6 @@ identifycpu(void) default: break; } - dev_attach(&kdc_cpu0); } /* diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 6e771c7..e4186ee 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.200 1996/09/01 02:16:07 nate Exp $ + * $Id: machdep.c,v 1.201 1996/09/03 18:50:36 nate Exp $ */ #include "npx.h" @@ -64,7 +64,6 @@ #include <sys/sysent.h> #include <sys/tty.h> #include <sys/sysctl.h> -#include <sys/devconf.h> #include <sys/vmmeter.h> #ifdef SYSVSHM @@ -106,7 +105,6 @@ #include <machine/specialreg.h> #include <machine/sysarch.h> #include <machine/cons.h> -#include <machine/devconf.h> #include <machine/bootinfo.h> #include <machine/md_var.h> #ifdef PERFMON @@ -1535,9 +1533,3 @@ bad: bp->b_flags |= B_ERROR; return(-1); } - -int -disk_externalize(int drive, struct sysctl_req *req) -{ - return SYSCTL_OUT(req, &drive, sizeof drive); -} diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index e944509..f03e18b 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.70 1996/05/02 10:43:09 phk Exp $ + * $Id: isa.c,v 1.71 1996/06/25 20:30:36 bde Exp $ */ /* @@ -64,7 +64,6 @@ #include <i386/isa/isa.h> #include <i386/isa/icu.h> #include <i386/isa/ic/i8237.h> -#include <sys/devconf.h> #include "vector.h" /* @@ -89,19 +88,6 @@ u_int intr_mask[ICU_LEN]; u_int* intr_mptr[ICU_LEN]; int intr_unit[ICU_LEN]; -extern struct kern_devconf kdc_cpu0; - -struct kern_devconf kdc_isa0 = { - 0, 0, 0, /* filled in by dev_attach */ - "isa", 0, { MDDT_BUS, 0 }, - 0, 0, 0, BUS_EXTERNALLEN, - &kdc_cpu0, /* parent is the CPU */ - 0, /* no parentdata */ - DC_BUSY, /* busses are always busy */ - "ISA bus", - DC_CLS_BUS /* class */ -}; - static inthand_t *fastintr[ICU_LEN] = { &IDTVEC(fastintr0), &IDTVEC(fastintr1), &IDTVEC(fastintr2), &IDTVEC(fastintr3), @@ -269,8 +255,6 @@ void isa_configure() { struct isa_device *dvp; - dev_attach(&kdc_isa0); - splhigh(); printf("Probing for devices on the ISA bus:\n"); /* First probe all the sensitive probes */ @@ -487,43 +471,6 @@ config_isadev_c(isdp, mp, reconfig) } /* - * Provide ISA-specific device information to user programs using the - * hw.devconf interface. - */ -int -isa_externalize(struct isa_device *id, struct sysctl_req *req) -{ - return (SYSCTL_OUT(req, id, sizeof *id)); -} - -/* - * This is used to forcibly reconfigure an ISA device. It currently just - * returns an error 'cos you can't do that yet. It is here to demonstrate - * what the `internalize' routine is supposed to do. - */ -int -isa_internalize(struct isa_device *id, struct sysctl_req *req) -{ - struct isa_device myid; - int rv; - - rv = SYSCTL_IN(req, &myid, sizeof *id); - if(rv) - return rv; - - rv = EOPNOTSUPP; - /* code would go here to validate the configuration request */ - /* code would go here to actually perform the reconfiguration */ - return rv; -} - -int -isa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req) -{ - return isa_externalize(kdc->kdc_isa, req); -} - -/* * Fill in default interrupt table (in case of spuruious interrupt * during configuration of kernel, setup interrupt control unit */ diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index ad03e2a..687ff73 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.29 1996/01/06 23:10:52 peter Exp $ + * $Id: npx.c,v 1.30 1996/06/25 20:30:38 bde Exp $ */ #include "npx.h" @@ -47,7 +47,6 @@ #include <sys/conf.h> #include <sys/file.h> #include <sys/proc.h> -#include <sys/devconf.h> #include <sys/ioctl.h> #include <sys/syslog.h> #include <sys/signalvar.h> @@ -158,30 +157,6 @@ _probetrap: iret "); -static struct kern_devconf kdc_npx[NNPX] = { { - 0, 0, 0, /* filled in by dev_attach */ - "npx", 0, { MDDT_ISA, 0 }, - isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_UNCONFIGURED, /* state */ - "Floating-point unit", - DC_CLS_MISC /* class */ -} }; - -static inline void -npx_registerdev(struct isa_device *id) -{ - int unit; - - unit = id->id_unit; - if (unit != 0) - kdc_npx[unit] = kdc_npx[0]; - kdc_npx[unit].kdc_unit = unit; - kdc_npx[unit].kdc_isa = id; - dev_attach(&kdc_npx[unit]); -} - /* * Probe routine. Initialize cr0 to give correct behaviour for [f]wait * whether the device exists or not (XXX should be elsewhere). Set flags @@ -205,7 +180,6 @@ npxprobe(dvp) * install suitable handlers and run with interrupts enabled so we * won't need to do so much here. */ - npx_registerdev(dvp); npx_intrno = NRSVIDT + ffs(dvp->id_irq) - 1; save_eflags = read_eflags(); disable_intr(); @@ -366,9 +340,6 @@ npxattach(dvp) printf("npx%d: no 387 emulator in kernel!\n", dvp->id_unit); #endif npxinit(__INITIAL_NPXCW__); - if (npx_exists) { - kdc_npx[dvp->id_unit].kdc_state = DC_BUSY; - } return (1); /* XXX unused */ } |