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.
This commit is contained in:
parent
9b86a4168f
commit
7f47cf2f4a
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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_
|
||||
@ -114,16 +114,6 @@
|
||||
#define aston() setsoftast()
|
||||
#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.
|
||||
*/
|
||||
@ -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 */
|
||||
|
@ -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_ */
|
||||
|
@ -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 */
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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_
|
||||
@ -114,16 +114,6 @@
|
||||
#define aston() setsoftast()
|
||||
#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.
|
||||
*/
|
||||
@ -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 */
|
||||
|
@ -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_ */
|
||||
|
@ -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 */
|
||||
|
@ -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>
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user