Lines Matching +full:key +full:- +full:int
4 * SPDX-License-Identifier: Apache-2.0
48 static ALWAYS_INLINE unsigned int arch_irq_lock(void) in arch_irq_lock()
50 unsigned int key, tmp; in arch_irq_lock() local
53 "rdctl %[key], status\n\t" in arch_irq_lock()
54 "movi %[tmp], -2\n\t" in arch_irq_lock()
55 "and %[tmp], %[key], %[tmp]\n\t" in arch_irq_lock()
57 : [key] "=r" (key), [tmp] "=r" (tmp) in arch_irq_lock()
60 return key; in arch_irq_lock()
63 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument
67 * in which case we can just write the value stored in key, in arch_irq_unlock()
79 "andi %[key], %[key], 1\n\t" in arch_irq_unlock()
80 "beq %[key], zero, 1f\n\t" in arch_irq_unlock()
81 "rdctl %[key], status\n\t" in arch_irq_unlock()
82 "ori %[key], %[key], 1\n\t" in arch_irq_unlock()
83 "wrctl status, %[key]\n\t" in arch_irq_unlock()
85 : [key] "+r" (key) in arch_irq_unlock()
89 "wrctl status, %[key]" in arch_irq_unlock()
90 : : [key] "r" (key) in arch_irq_unlock()
95 static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key) in arch_irq_unlocked() argument
97 return key & 1; in arch_irq_unlocked()
100 void arch_irq_enable(unsigned int irq);
101 void arch_irq_disable(unsigned int irq);
103 FUNC_NORETURN void z_SysFatalErrorHandler(unsigned int reason,
106 FUNC_NORETURN void z_NanoFatalErrorHandler(unsigned int reason,
110 NIOS2_EXCEPTION_UNKNOWN = -1,