2 * Copyright (C) 2016 Cadence Design Systems Inc.
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef _XTENSA_SYSTEM_H
8 #define _XTENSA_SYSTEM_H
10 #include <asm/arch/core.h>
12 #if XCHAL_HAVE_INTERRUPTS
13 #define local_irq_save(flags) \
14 __asm__ __volatile__ ("rsil %0, %1" \
16 : "I"(XCHAL_EXCM_LEVEL) \
18 #define local_irq_restore(flags) \
19 __asm__ __volatile__ ("wsr %0, ps\n\t" \
21 :: "a"(flags) : "memory")
23 #define local_irq_save(flags) ((void)(flags))
24 #define local_irq_restore(flags) ((void)(flags))