1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef __ASM_CSKY_IRQFLAGS_H
4 #define __ASM_CSKY_IRQFLAGS_H
5 #include <abi/reg_ops.h>
7 static inline unsigned long arch_local_irq_save(void)
12 asm volatile("psrclr ie\n":::"memory");
15 #define arch_local_irq_save arch_local_irq_save
17 static inline void arch_local_irq_enable(void)
19 asm volatile("psrset ee, ie\n":::"memory");
21 #define arch_local_irq_enable arch_local_irq_enable
23 static inline void arch_local_irq_disable(void)
25 asm volatile("psrclr ie\n":::"memory");
27 #define arch_local_irq_disable arch_local_irq_disable
29 static inline unsigned long arch_local_save_flags(void)
33 #define arch_local_save_flags arch_local_save_flags
35 static inline void arch_local_irq_restore(unsigned long flags
)
39 #define arch_local_irq_restore arch_local_irq_restore
41 static inline int arch_irqs_disabled_flags(unsigned long flags
)
43 return !(flags
& (1<<6));
45 #define arch_irqs_disabled_flags arch_irqs_disabled_flags
47 #include <asm-generic/irqflags.h>
49 #endif /* __ASM_CSKY_IRQFLAGS_H */