1 1.15.6.2 bouyer /* $NetBSD: cpu.h,v 1.15.6.2 2000/11/20 20:00:35 bouyer Exp $ */ 2 1.15.6.2 bouyer /* $OpenBSD: cpu.h,v 1.9 1998/01/28 13:46:10 pefo Exp $ */ 3 1.15.6.2 bouyer 4 1.15.6.2 bouyer #ifndef _ARC_CPU_H_ 5 1.15.6.2 bouyer #define _ARC_CPU_H_ 6 1.15.6.2 bouyer 7 1.15.6.2 bouyer /* 8 1.15.6.2 bouyer * Internal timer causes hard interrupt 5. 9 1.15.6.2 bouyer */ 10 1.15.6.2 bouyer #define MIPS_INT_MASK_CLOCK MIPS_INT_MASK_5 11 1.15.6.2 bouyer 12 1.15.6.2 bouyer #include <mips/cpu.h> 13 1.15.6.2 bouyer #include <mips/cpuregs.h> 14 1.15.6.2 bouyer 15 1.15.6.2 bouyer #ifndef _LOCORE 16 1.15.6.2 bouyer #if defined(_KERNEL) && !defined(_LKM) 17 1.15.6.2 bouyer #include "opt_lockdebug.h" 18 1.15.6.2 bouyer #endif 19 1.15.6.2 bouyer 20 1.15.6.2 bouyer #include <sys/sched.h> 21 1.15.6.2 bouyer struct cpu_info { 22 1.15.6.2 bouyer struct schedstate_percpu ci_schedstate; /* scheduler state */ 23 1.15.6.2 bouyer #if defined(DIAGNOSTIC) || defined(LOCKDEBUG) 24 1.15.6.2 bouyer u_long ci_spin_locks; /* # of spin locks held */ 25 1.15.6.2 bouyer u_long ci_simple_locks; /* # of simple locks held */ 26 1.15.6.2 bouyer #endif 27 1.15.6.2 bouyer }; 28 1.15.6.2 bouyer 29 1.15.6.2 bouyer #ifdef _KERNEL 30 1.15.6.2 bouyer extern struct cpu_info cpu_info_store; 31 1.15.6.2 bouyer 32 1.15.6.2 bouyer #define curcpu() (&cpu_info_store) 33 1.15.6.2 bouyer #define cpu_number() (0) 34 1.15.6.2 bouyer #endif 35 1.15.6.2 bouyer #endif /* !_LOCORE */ 36 1.15.6.2 bouyer 37 1.15.6.2 bouyer /* 38 1.15.6.2 bouyer * definitions of cpu-dependent requirements 39 1.15.6.2 bouyer * referenced in generic code 40 1.15.6.2 bouyer */ 41 1.15.6.2 bouyer #define COPY_SIGCODE /* copy sigcode above user stack in exec */ 42 1.15.6.2 bouyer 43 1.15.6.2 bouyer #define INT_MASK_REAL_DEV MIPS3_HARD_INT_MASK /* XXX */ 44 1.15.6.2 bouyer 45 1.15.6.2 bouyer #ifndef _LOCORE 46 1.15.6.2 bouyer struct tlb; 47 1.15.6.2 bouyer extern void mips3_TLBWriteIndexedVPS __P((u_int index, struct tlb *tlb)); 48 1.15.6.2 bouyer #endif /* ! _LOCORE */ 49 1.15.6.2 bouyer 50 1.15.6.2 bouyer #endif /* _ARC_CPU_H_ */ 51