Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *
0004  * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org)
0005  */
0006 #ifndef __ASM_IRQ_REGS_H
0007 #define __ASM_IRQ_REGS_H
0008 
0009 #define ARCH_HAS_OWN_IRQ_REGS
0010 
0011 #include <linux/thread_info.h>
0012 
0013 static inline struct pt_regs *get_irq_regs(void)
0014 {
0015     return current_thread_info()->regs;
0016 }
0017 
0018 static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
0019 {
0020     struct pt_regs *old_regs;
0021 
0022     old_regs = get_irq_regs();
0023     current_thread_info()->regs = new_regs;
0024 
0025     return old_regs;
0026 }
0027 
0028 #endif /* __ASM_IRQ_REGS_H */