Warning: This file is not a C or C++ file. It does not have highlighting.

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
7
8#define ARCH_HAS_OWN_IRQ_REGS
9
10#include <linux/thread_info.h>
11
12static inline struct pt_regs *get_irq_regs(void)
13{
14 return current_thread_info()->regs;
15}
16
17static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
18{
19 struct pt_regs *old_regs;
20
21 old_regs = get_irq_regs();
22 current_thread_info()->regs = new_regs;
23
24 return old_regs;
25}
26
27#endif /* __ASM_IRQ_REGS_H */
28

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of linux/arch/loongarch/include/asm/irq_regs.h