1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 3 #ifndef __ASM_CSKY_IRQFLAGS_H 4 #define __ASM_CSKY_IRQFLAGS_H 5 #include <abi/reg_ops.h> 6 7 static inline unsigned long arch_local_irq_sav 8 { 9 unsigned long flags; 10 11 flags = mfcr("psr"); 12 asm volatile("psrclr ie\n":::"memory") 13 return flags; 14 } 15 #define arch_local_irq_save arch_local_irq_sav 16 17 static inline void arch_local_irq_enable(void) 18 { 19 asm volatile("psrset ee, ie\n":::"memo 20 } 21 #define arch_local_irq_enable arch_local_irq_e 22 23 static inline void arch_local_irq_disable(void 24 { 25 asm volatile("psrclr ie\n":::"memory") 26 } 27 #define arch_local_irq_disable arch_local_irq_ 28 29 static inline unsigned long arch_local_save_fl 30 { 31 return mfcr("psr"); 32 } 33 #define arch_local_save_flags arch_local_save_ 34 35 static inline void arch_local_irq_restore(unsi 36 { 37 mtcr("psr", flags); 38 } 39 #define arch_local_irq_restore arch_local_irq_ 40 41 static inline int arch_irqs_disabled_flags(uns 42 { 43 return !(flags & (1<<6)); 44 } 45 #define arch_irqs_disabled_flags arch_irqs_dis 46 47 #include <asm-generic/irqflags.h> 48 49 #endif /* __ASM_CSKY_IRQFLAGS_H */ 50
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.