xref: /netbsd-src/sys/arch/newsmips/include/cpu.h (revision 4472dbe5e3bd91ef2540bada7a7ca7384627ff9b)
1 /*	$NetBSD: cpu.h,v 1.9 2000/05/30 11:42:05 tsubai Exp $	*/
2 
3 #ifndef _MACHINE_CPU_H_
4 #define _MACHINE_CPU_H_
5 
6 #include <mips/cpu.h>
7 #include <mips/cpuregs.h>
8 
9 #ifndef _LOCORE
10 #if defined(_KERNEL) && !defined(_LKM)
11 #include "opt_lockdebug.h"
12 #endif
13 
14 extern int systype;
15 
16 #define NEWS3400	1
17 #define NEWS5000	2
18 
19 #include <sys/sched.h>
20 struct cpu_info {
21 	struct schedstate_percpu ci_schedstate; /* scheduler state */
22 #if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
23 	u_long ci_spin_locks;		/* # of spin locks held */
24 	u_long ci_simple_locks;		/* # of simple locks held */
25 #endif
26 };
27 
28 #ifdef _KERNEL
29 extern struct cpu_info cpu_info_store;
30 
31 #define	curcpu()		(&cpu_info_store)
32 #define	cpu_number()		0
33 #endif /* _KERNEL */
34 
35 #endif /* _LOCORE */
36 #endif /* _MACHINE_CPU_H_ */
37