1 #ifndef __ASM_SH_IRQFLAGS_64_H
2 #define __ASM_SH_IRQFLAGS_64_H
4 #include <asm/cpu/registers.h>
6 #define SR_MASK_LL 0x00000000000000f0LL
7 #define SR_BL_LL 0x0000000010000000LL
9 static inline void raw_local_irq_enable(void)
11 unsigned long long __dummy0
, __dummy1
= ~SR_MASK_LL
;
13 __asm__
__volatile__("getcon " __SR
", %0\n\t"
15 "putcon %0, " __SR
"\n\t"
20 static inline void raw_local_irq_disable(void)
22 unsigned long long __dummy0
, __dummy1
= SR_MASK_LL
;
24 __asm__
__volatile__("getcon " __SR
", %0\n\t"
26 "putcon %0, " __SR
"\n\t"
31 static inline void set_bl_bit(void)
33 unsigned long long __dummy0
, __dummy1
= SR_BL_LL
;
35 __asm__
__volatile__("getcon " __SR
", %0\n\t"
37 "putcon %0, " __SR
"\n\t"
43 static inline void clear_bl_bit(void)
45 unsigned long long __dummy0
, __dummy1
= ~SR_BL_LL
;
47 __asm__
__volatile__("getcon " __SR
", %0\n\t"
49 "putcon %0, " __SR
"\n\t"
54 static inline unsigned long __raw_local_save_flags(void)
56 unsigned long long __dummy
= SR_MASK_LL
;
59 __asm__
__volatile__ (
60 "getcon " __SR
", %0\n\t"
68 static inline unsigned long __raw_local_irq_save(void)
70 unsigned long long __dummy0
, __dummy1
= SR_MASK_LL
;
73 __asm__
__volatile__ (
74 "getcon " __SR
", %1\n\t"
77 "putcon %1, " __SR
"\n\t"
79 : "=&r" (flags
), "=&r" (__dummy0
)
85 #endif /* __ASM_SH_IRQFLAGS_64_H */