Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / loongarch / include / asm / irq_regs.h
blob3d62d815bf6b73967017fab1cd1dc450eb2d883f
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4 */
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;
24 return old_regs;
27 #endif /* __ASM_IRQ_REGS_H */