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