treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / csky / include / asm / irqflags.h
blob9e3a569a55d67869762442ad0f0ce137506c79e1
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)
9 unsigned long flags;
11 flags = mfcr("psr");
12 asm volatile("psrclr ie\n":::"memory");
13 return flags;
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)
31 return mfcr("psr");
33 #define arch_local_save_flags arch_local_save_flags
35 static inline void arch_local_irq_restore(unsigned long flags)
37 mtcr("psr", 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 */