summaryrefslogtreecommitdiffstats
path: root/sys/arch/luna88k/include/cpu.h
blob: 0f7f04d1c076e31d5fef602af874227e8803199c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* $OpenBSD: cpu.h,v 1.10 2018/03/24 04:19:43 visa Exp $ */
/* public domain */
#ifndef	_MACHINE_CPU_H_
#define	_MACHINE_CPU_H_

#include <m88k/asm_macro.h>
#include <m88k/cpu.h>

#ifdef _KERNEL

/*
 * 88110 systems only have cpudep6..7 available so far.
 * By the time Luna2001/2010 are supported, we can grow ci_cpudep to a
 * couple more fields to unbreak this.
 */
#ifndef M88110
#define	ci_curspl	ci_cpudep4
#define	ci_swireg	ci_cpudep5
#endif
#define	ci_intr_mask	ci_cpudep6
#define	ci_clock_ack	ci_cpudep7

void luna88k_ext_int(struct trapframe *eframe);
#define	md_interrupt_func	luna88k_ext_int

static inline u_long
intr_disable(void)
{
	u_long psr;

	psr = get_psr();
	set_psr(psr | PSR_IND);
	return psr;
}

static inline void
intr_restore(u_long psr)
{
	set_psr(psr);
}

#endif	/* _KERNEL */

#endif	/* _MACHINE_CPU_H_ */