0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _ASM_GENERIC_IRQ_REGS_H
0009 #define _ASM_GENERIC_IRQ_REGS_H
0010
0011 #include <linux/percpu.h>
0012
0013
0014
0015
0016
0017 DECLARE_PER_CPU(struct pt_regs *, __irq_regs);
0018
0019 static inline struct pt_regs *get_irq_regs(void)
0020 {
0021 return __this_cpu_read(__irq_regs);
0022 }
0023
0024 static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
0025 {
0026 struct pt_regs *old_regs;
0027
0028 old_regs = __this_cpu_read(__irq_regs);
0029 __this_cpu_write(__irq_regs, new_regs);
0030 return old_regs;
0031 }
0032
0033 #endif