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