xref: /openbsd/sys/arch/luna88k/include/cpu.h (revision aa27b838)
1 /* $OpenBSD: cpu.h,v 1.10 2018/03/24 04:19:43 visa Exp $ */
2 /* public domain */
3 #ifndef	_MACHINE_CPU_H_
4 #define	_MACHINE_CPU_H_
5 
6 #include <m88k/asm_macro.h>
7 #include <m88k/cpu.h>
8 
9 #ifdef _KERNEL
10 
11 /*
12  * 88110 systems only have cpudep6..7 available so far.
13  * By the time Luna2001/2010 are supported, we can grow ci_cpudep to a
14  * couple more fields to unbreak this.
15  */
16 #ifndef M88110
17 #define	ci_curspl	ci_cpudep4
18 #define	ci_swireg	ci_cpudep5
19 #endif
20 #define	ci_intr_mask	ci_cpudep6
21 #define	ci_clock_ack	ci_cpudep7
22 
23 void luna88k_ext_int(struct trapframe *eframe);
24 #define	md_interrupt_func	luna88k_ext_int
25 
26 static inline u_long
intr_disable(void)27 intr_disable(void)
28 {
29 	u_long psr;
30 
31 	psr = get_psr();
32 	set_psr(psr | PSR_IND);
33 	return psr;
34 }
35 
36 static inline void
intr_restore(u_long psr)37 intr_restore(u_long psr)
38 {
39 	set_psr(psr);
40 }
41 
42 #endif	/* _KERNEL */
43 
44 #endif	/* _MACHINE_CPU_H_ */
45