1
2
3
4
5
6
7
8
9
10
11
12#ifndef __UNICORE_IRQFLAGS_H__
13#define __UNICORE_IRQFLAGS_H__
14
15#ifdef __KERNEL__
16
17#include <asm/ptrace.h>
18
19#define ARCH_IRQ_DISABLED (PRIV_MODE | PSR_I_BIT)
20#define ARCH_IRQ_ENABLED (PRIV_MODE)
21
22
23
24
25static inline unsigned long arch_local_save_flags(void)
26{
27 unsigned long temp;
28
29 asm volatile("mov %0, asr" : "=r" (temp) : : "memory", "cc");
30
31 return temp & PSR_c;
32}
33
34
35
36
37static inline void arch_local_irq_restore(unsigned long flags)
38{
39 unsigned long temp;
40
41 asm volatile(
42 "mov %0, asr\n"
43 "mov.a asr, %1\n"
44 "mov.f asr, %0"
45 : "=&r" (temp)
46 : "r" (flags)
47 : "memory", "cc");
48}
49
50#include <asm-generic/irqflags.h>
51
52#endif
53#endif
54