1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2384740dcSRalf Baechle /* 3384740dcSRalf Baechle * 4384740dcSRalf Baechle * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) 5384740dcSRalf Baechle */ 6384740dcSRalf Baechle #ifndef __ASM_IRQ_REGS_H 7384740dcSRalf Baechle #define __ASM_IRQ_REGS_H 8384740dcSRalf Baechle 9384740dcSRalf Baechle #define ARCH_HAS_OWN_IRQ_REGS 10384740dcSRalf Baechle 11384740dcSRalf Baechle #include <linux/thread_info.h> 12384740dcSRalf Baechle get_irq_regs(void)13384740dcSRalf Baechlestatic inline struct pt_regs *get_irq_regs(void) 14384740dcSRalf Baechle { 15384740dcSRalf Baechle return current_thread_info()->regs; 16384740dcSRalf Baechle } 17384740dcSRalf Baechle set_irq_regs(struct pt_regs * new_regs)181d2753a6SDavid Daneystatic inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs) 191d2753a6SDavid Daney { 201d2753a6SDavid Daney struct pt_regs *old_regs; 211d2753a6SDavid Daney 221d2753a6SDavid Daney old_regs = get_irq_regs(); 231d2753a6SDavid Daney current_thread_info()->regs = new_regs; 241d2753a6SDavid Daney 251d2753a6SDavid Daney return old_regs; 261d2753a6SDavid Daney } 271d2753a6SDavid Daney 28384740dcSRalf Baechle #endif /* __ASM_IRQ_REGS_H */ 29