diff options
author | bde <bde@FreeBSD.org> | 1997-10-28 11:43:57 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-10-28 11:43:57 +0000 |
commit | 561cc79f5093268af954eefbb941f99824e15be4 (patch) | |
tree | 1ce3e367848ae19f363ddefb9175eb769538fec7 /sys | |
parent | c2c827e04f2282df60ba15e573159b3c7c0968b1 (diff) | |
download | FreeBSD-src-561cc79f5093268af954eefbb941f99824e15be4.zip FreeBSD-src-561cc79f5093268af954eefbb941f99824e15be4.tar.gz |
Don't include <machine/cputypes.h> or declare cputype/class interfaces
in <machine/cpu.h>. Moved the declarations to <machine/cputypes.h>.
Fixed style bugs in the moved code. Fixed everything that depended on
the nested include. Don't include <machine/cpu.h> (in the changed files)
unless something in it is used directly.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/fpu.c | 7 | ||||
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/tsc.c | 7 | ||||
-rw-r--r-- | sys/amd64/include/cpu.h | 14 | ||||
-rw-r--r-- | sys/amd64/include/cputypes.h | 29 | ||||
-rw-r--r-- | sys/amd64/isa/clock.c | 7 | ||||
-rw-r--r-- | sys/amd64/isa/npx.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/identcpu.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/tsc.c | 7 | ||||
-rw-r--r-- | sys/i386/include/cpu.h | 14 | ||||
-rw-r--r-- | sys/i386/include/cputypes.h | 29 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 7 | ||||
-rw-r--r-- | sys/i386/isa/npx.c | 7 | ||||
-rw-r--r-- | sys/isa/atrtc.c | 7 |
14 files changed, 86 insertions, 66 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 8e2416d..1b2fd6f 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.51 1997/08/18 06:58:44 charnier Exp $ + * $Id: npx.c,v 1.52 1997/08/21 06:32:58 charnier Exp $ */ #include "npx.h" @@ -53,12 +53,15 @@ #include <sys/signalvar.h> #include <machine/asmacros.h> -#include <machine/cpu.h> +#include <machine/cputypes.h> +#include <machine/frame.h> #include <machine/ipl.h> #include <machine/md_var.h> #include <machine/pcb.h> +#include <machine/psl.h> #include <machine/clock.h> #include <machine/specialreg.h> +#include <machine/segments.h> #include <i386/isa/icu.h> #include <i386/isa/isa_device.h> diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 57e0d48..b1356b8 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.28 1997/09/20 13:18:48 phk Exp $ + * $Id: identcpu.c,v 1.29 1997/10/03 14:23:47 kato Exp $ */ #include "opt_cpu.h" @@ -47,8 +47,9 @@ #include <sys/sysctl.h> #include <machine/asmacros.h> -#include <machine/cpu.h> #include <machine/clock.h> +#include <machine/cputypes.h> +#include <machine/segments.h> #include <machine/specialreg.h> #include <machine/md_var.h> diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index e812a20..b8ad0c1 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.12 1997/09/01 07:37:01 smp Exp smp $ + * $Id: clock.c,v 1.102 1997/09/01 07:45:23 fsmp Exp $ */ /* @@ -61,10 +61,13 @@ #ifdef CLK_CALIBRATION_LOOP #include <machine/cons.h> #endif -#include <machine/cpu.h> +#include <machine/cputypes.h> #include <machine/frame.h> #include <machine/ipl.h> #include <machine/limits.h> +#ifdef APIC_IO +#include <machine/segments.h> +#endif #if defined(SMP) || defined(APIC_IO) #include <machine/smp.h> #endif /* SMP || APIC_IO */ diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 5c0c532..4b5e6e9 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $Id: cpu.h,v 1.33 1997/08/30 02:51:58 kato Exp $ + * $Id: cpu.h,v 1.34 1997/10/27 17:23:02 bde Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -115,16 +115,6 @@ #define astoff() /* - * pull in #defines for kinds of processors - */ -#include <machine/cputypes.h> - -struct cpu_nameclass { - char *cpu_name; - int cpu_class; -}; - -/* * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ @@ -145,8 +135,6 @@ struct cpu_nameclass { #ifdef KERNEL extern char btext[]; -extern int cpu; -extern int cpu_class; extern char etext[]; extern u_char intr_nesting_level; extern int want_resched; /* resched was called */ diff --git a/sys/amd64/include/cputypes.h b/sys/amd64/include/cputypes.h index f3c1e9e..fbe53f3 100644 --- a/sys/amd64/include/cputypes.h +++ b/sys/amd64/include/cputypes.h @@ -24,26 +24,24 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cputypes.h,v 1.8 1997/03/22 18:53:03 kato Exp $ + * $Id: cputypes.h,v 1.9 1997/04/26 04:08:54 kato Exp $ */ #ifndef _MACHINE_CPUTYPES_H_ -#define _MACHINE_CPUTYPES_H_ 1 +#define _MACHINE_CPUTYPES_H_ /* - * Classes of Processor + * Classes of processor. */ - #define CPUCLASS_286 0 #define CPUCLASS_386 1 #define CPUCLASS_486 2 #define CPUCLASS_586 3 -#define CPUCLASS_686 4 +#define CPUCLASS_686 4 /* - * Kinds of Processor + * Kinds of processor. */ - #define CPU_286 0 /* Intel 80286 */ #define CPU_386SX 1 /* Intel 80386SX */ #define CPU_386 2 /* Intel 80386DX */ @@ -51,11 +49,22 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 6 /* Cyrix 486DLC */ -#define CPU_686 7 /* Pentium Pro */ +#define CPU_686 7 /* Pentium Pro */ #define CPU_M1SC 8 /* Cyrix M1sc (aka 5x86) */ #define CPU_M1 9 /* Cyrix M1 (aka 6x86) */ #define CPU_BLUE 10 /* IBM BlueLighting CPU */ #define CPU_M2 11 /* Cyrix M2 (aka enhanced 6x86 with MMX */ -#define CPU_NX586 12 /* NexGen (now AMD) 586 */ +#define CPU_NX586 12 /* NexGen (now AMD) 586 */ #define CPU_CY486DX 13 /* Cyrix 486S/DX/DX2/DX4 */ -#endif /* _MACHINE_CPUTYPES_H_ */ + +#ifndef LOCORE +struct cpu_nameclass { + char *cpu_name; + int cpu_class; +}; + +extern int cpu; +extern int cpu_class; +#endif + +#endif /* !_MACHINE_CPUTYPES_H_ */ diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index e812a20..b8ad0c1 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.12 1997/09/01 07:37:01 smp Exp smp $ + * $Id: clock.c,v 1.102 1997/09/01 07:45:23 fsmp Exp $ */ /* @@ -61,10 +61,13 @@ #ifdef CLK_CALIBRATION_LOOP #include <machine/cons.h> #endif -#include <machine/cpu.h> +#include <machine/cputypes.h> #include <machine/frame.h> #include <machine/ipl.h> #include <machine/limits.h> +#ifdef APIC_IO +#include <machine/segments.h> +#endif #if defined(SMP) || defined(APIC_IO) #include <machine/smp.h> #endif /* SMP || APIC_IO */ diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index 8e2416d..1b2fd6f 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.51 1997/08/18 06:58:44 charnier Exp $ + * $Id: npx.c,v 1.52 1997/08/21 06:32:58 charnier Exp $ */ #include "npx.h" @@ -53,12 +53,15 @@ #include <sys/signalvar.h> #include <machine/asmacros.h> -#include <machine/cpu.h> +#include <machine/cputypes.h> +#include <machine/frame.h> #include <machine/ipl.h> #include <machine/md_var.h> #include <machine/pcb.h> +#include <machine/psl.h> #include <machine/clock.h> #include <machine/specialreg.h> +#include <machine/segments.h> #include <i386/isa/icu.h> #include <i386/isa/isa_device.h> diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index 57e0d48..b1356b8 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.28 1997/09/20 13:18:48 phk Exp $ + * $Id: identcpu.c,v 1.29 1997/10/03 14:23:47 kato Exp $ */ #include "opt_cpu.h" @@ -47,8 +47,9 @@ #include <sys/sysctl.h> #include <machine/asmacros.h> -#include <machine/cpu.h> #include <machine/clock.h> +#include <machine/cputypes.h> +#include <machine/segments.h> #include <machine/specialreg.h> #include <machine/md_var.h> diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index e812a20..b8ad0c1 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.12 1997/09/01 07:37:01 smp Exp smp $ + * $Id: clock.c,v 1.102 1997/09/01 07:45:23 fsmp Exp $ */ /* @@ -61,10 +61,13 @@ #ifdef CLK_CALIBRATION_LOOP #include <machine/cons.h> #endif -#include <machine/cpu.h> +#include <machine/cputypes.h> #include <machine/frame.h> #include <machine/ipl.h> #include <machine/limits.h> +#ifdef APIC_IO +#include <machine/segments.h> +#endif #if defined(SMP) || defined(APIC_IO) #include <machine/smp.h> #endif /* SMP || APIC_IO */ diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index 5c0c532..4b5e6e9 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $Id: cpu.h,v 1.33 1997/08/30 02:51:58 kato Exp $ + * $Id: cpu.h,v 1.34 1997/10/27 17:23:02 bde Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -115,16 +115,6 @@ #define astoff() /* - * pull in #defines for kinds of processors - */ -#include <machine/cputypes.h> - -struct cpu_nameclass { - char *cpu_name; - int cpu_class; -}; - -/* * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ @@ -145,8 +135,6 @@ struct cpu_nameclass { #ifdef KERNEL extern char btext[]; -extern int cpu; -extern int cpu_class; extern char etext[]; extern u_char intr_nesting_level; extern int want_resched; /* resched was called */ diff --git a/sys/i386/include/cputypes.h b/sys/i386/include/cputypes.h index f3c1e9e..fbe53f3 100644 --- a/sys/i386/include/cputypes.h +++ b/sys/i386/include/cputypes.h @@ -24,26 +24,24 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cputypes.h,v 1.8 1997/03/22 18:53:03 kato Exp $ + * $Id: cputypes.h,v 1.9 1997/04/26 04:08:54 kato Exp $ */ #ifndef _MACHINE_CPUTYPES_H_ -#define _MACHINE_CPUTYPES_H_ 1 +#define _MACHINE_CPUTYPES_H_ /* - * Classes of Processor + * Classes of processor. */ - #define CPUCLASS_286 0 #define CPUCLASS_386 1 #define CPUCLASS_486 2 #define CPUCLASS_586 3 -#define CPUCLASS_686 4 +#define CPUCLASS_686 4 /* - * Kinds of Processor + * Kinds of processor. */ - #define CPU_286 0 /* Intel 80286 */ #define CPU_386SX 1 /* Intel 80386SX */ #define CPU_386 2 /* Intel 80386DX */ @@ -51,11 +49,22 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 6 /* Cyrix 486DLC */ -#define CPU_686 7 /* Pentium Pro */ +#define CPU_686 7 /* Pentium Pro */ #define CPU_M1SC 8 /* Cyrix M1sc (aka 5x86) */ #define CPU_M1 9 /* Cyrix M1 (aka 6x86) */ #define CPU_BLUE 10 /* IBM BlueLighting CPU */ #define CPU_M2 11 /* Cyrix M2 (aka enhanced 6x86 with MMX */ -#define CPU_NX586 12 /* NexGen (now AMD) 586 */ +#define CPU_NX586 12 /* NexGen (now AMD) 586 */ #define CPU_CY486DX 13 /* Cyrix 486S/DX/DX2/DX4 */ -#endif /* _MACHINE_CPUTYPES_H_ */ + +#ifndef LOCORE +struct cpu_nameclass { + char *cpu_name; + int cpu_class; +}; + +extern int cpu; +extern int cpu_class; +#endif + +#endif /* !_MACHINE_CPUTYPES_H_ */ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index e812a20..b8ad0c1 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.12 1997/09/01 07:37:01 smp Exp smp $ + * $Id: clock.c,v 1.102 1997/09/01 07:45:23 fsmp Exp $ */ /* @@ -61,10 +61,13 @@ #ifdef CLK_CALIBRATION_LOOP #include <machine/cons.h> #endif -#include <machine/cpu.h> +#include <machine/cputypes.h> #include <machine/frame.h> #include <machine/ipl.h> #include <machine/limits.h> +#ifdef APIC_IO +#include <machine/segments.h> +#endif #if defined(SMP) || defined(APIC_IO) #include <machine/smp.h> #endif /* SMP || APIC_IO */ diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 8e2416d..1b2fd6f 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.51 1997/08/18 06:58:44 charnier Exp $ + * $Id: npx.c,v 1.52 1997/08/21 06:32:58 charnier Exp $ */ #include "npx.h" @@ -53,12 +53,15 @@ #include <sys/signalvar.h> #include <machine/asmacros.h> -#include <machine/cpu.h> +#include <machine/cputypes.h> +#include <machine/frame.h> #include <machine/ipl.h> #include <machine/md_var.h> #include <machine/pcb.h> +#include <machine/psl.h> #include <machine/clock.h> #include <machine/specialreg.h> +#include <machine/segments.h> #include <i386/isa/icu.h> #include <i386/isa/isa_device.h> diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index e812a20..b8ad0c1 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.12 1997/09/01 07:37:01 smp Exp smp $ + * $Id: clock.c,v 1.102 1997/09/01 07:45:23 fsmp Exp $ */ /* @@ -61,10 +61,13 @@ #ifdef CLK_CALIBRATION_LOOP #include <machine/cons.h> #endif -#include <machine/cpu.h> +#include <machine/cputypes.h> #include <machine/frame.h> #include <machine/ipl.h> #include <machine/limits.h> +#ifdef APIC_IO +#include <machine/segments.h> +#endif #if defined(SMP) || defined(APIC_IO) #include <machine/smp.h> #endif /* SMP || APIC_IO */ |