2006-12-07 08:14:03 +07:00
|
|
|
/*
|
|
|
|
* Per-cpu current frame pointer - the location of the last exception frame on
|
2007-05-03 00:27:16 +07:00
|
|
|
* the stack, stored in the per-cpu area.
|
2006-12-07 08:14:03 +07:00
|
|
|
*
|
|
|
|
* Jeremy Fitzhardinge <jeremy@goop.org>
|
|
|
|
*/
|
2008-10-23 12:26:29 +07:00
|
|
|
#ifndef _ASM_X86_IRQ_REGS_32_H
|
|
|
|
#define _ASM_X86_IRQ_REGS_32_H
|
2006-12-07 08:14:03 +07:00
|
|
|
|
2007-05-03 00:27:16 +07:00
|
|
|
#include <asm/percpu.h>
|
|
|
|
|
|
|
|
DECLARE_PER_CPU(struct pt_regs *, irq_regs);
|
2006-12-07 08:14:03 +07:00
|
|
|
|
|
|
|
static inline struct pt_regs *get_irq_regs(void)
|
|
|
|
{
|
2007-05-03 00:27:16 +07:00
|
|
|
return x86_read_percpu(irq_regs);
|
2006-12-07 08:14:03 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
|
|
|
|
{
|
|
|
|
struct pt_regs *old_regs;
|
|
|
|
|
2007-05-03 00:27:16 +07:00
|
|
|
old_regs = get_irq_regs();
|
|
|
|
x86_write_percpu(irq_regs, new_regs);
|
2006-12-07 08:14:03 +07:00
|
|
|
|
|
|
|
return old_regs;
|
|
|
|
}
|
|
|
|
|
2008-10-23 12:26:29 +07:00
|
|
|
#endif /* _ASM_X86_IRQ_REGS_32_H */
|