1
2
3
4
5
6
7
8
9#ifndef __SPARC_IRQ_H__
10#define __SPARC_IRQ_H__
11
12#include <asm/psr.h>
13
14
15static inline void set_pil(unsigned int level)
16{
17 unsigned int psr = get_psr();
18
19 put_psr((psr & ~PSR_PIL) | ((level & 0xf) << PSR_PIL_OFS));
20}
21
22
23static inline unsigned int get_pil(void)
24{
25 unsigned int psr = get_psr();
26 return (psr & PSR_PIL) >> PSR_PIL_OFS;
27}
28
29
30extern int intLock(void);
31
32
33extern void intUnlock(int oldLevel);
34
35
36extern int interrupt_is_enabled(void);
37
38#endif
39