1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
5 #ifndef __ASM_IRQ_REGS_H
6 #define __ASM_IRQ_REGS_H
8 #define ARCH_HAS_OWN_IRQ_REGS
10 #include <linux/thread_info.h>
12 static inline struct pt_regs
*get_irq_regs(void)
14 return current_thread_info()->regs
;
17 static inline struct pt_regs
*set_irq_regs(struct pt_regs
*new_regs
)
19 struct pt_regs
*old_regs
;
21 old_regs
= get_irq_regs();
22 current_thread_info()->regs
= new_regs
;
27 #endif /* __ASM_IRQ_REGS_H */