Lines Matching +full:flags +full:- +full:mask

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
16 u32 flags = CSR_CRMD_IE; in arch_local_irq_enable() local
18 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_enable()
19 : [val] "+r" (flags) in arch_local_irq_enable()
20 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_enable()
26 u32 flags = 0; in arch_local_irq_disable() local
28 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_disable()
29 : [val] "+r" (flags) in arch_local_irq_disable()
30 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_disable()
36 u32 flags = 0; in arch_local_irq_save() local
38 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_save()
39 : [val] "+r" (flags) in arch_local_irq_save()
40 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_save()
42 return flags; in arch_local_irq_save()
45 static inline void arch_local_irq_restore(unsigned long flags) in arch_local_irq_restore() argument
48 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_restore()
49 : [val] "+r" (flags) in arch_local_irq_restore()
50 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_restore()
56 u32 flags; in arch_local_save_flags() local
59 : [val] "=r" (flags) in arch_local_save_flags()
62 return flags; in arch_local_save_flags()
65 static inline int arch_irqs_disabled_flags(unsigned long flags) in arch_irqs_disabled_flags() argument
67 return !(flags & CSR_CRMD_IE); in arch_irqs_disabled_flags()