1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/include/asm/irqflags.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #ifndef __UNICORE_IRQFLAGS_H__
10 #define __UNICORE_IRQFLAGS_H__
14 #include <asm/ptrace.h>
16 #define ARCH_IRQ_DISABLED (PRIV_MODE | PSR_I_BIT)
17 #define ARCH_IRQ_ENABLED (PRIV_MODE)
20 * Save the current interrupt enable state.
22 static inline unsigned long arch_local_save_flags(void)
26 asm volatile("mov %0, asr" : "=r" (temp) : : "memory", "cc");
32 * restore saved IRQ state
34 static inline void arch_local_irq_restore(unsigned long flags)
47 #include <asm-generic/irqflags.h>