You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
613 B
30 lines
613 B
18 years ago
|
/*
|
||
|
* Per-cpu current frame pointer - the location of the last exception frame on
|
||
18 years ago
|
* the stack, stored in the per-cpu area.
|
||
18 years ago
|
*
|
||
|
* Jeremy Fitzhardinge <jeremy@goop.org>
|
||
|
*/
|
||
|
#ifndef _ASM_I386_IRQ_REGS_H
|
||
|
#define _ASM_I386_IRQ_REGS_H
|
||
|
|
||
18 years ago
|
#include <asm/percpu.h>
|
||
|
|
||
|
DECLARE_PER_CPU(struct pt_regs *, irq_regs);
|
||
18 years ago
|
|
||
|
static inline struct pt_regs *get_irq_regs(void)
|
||
|
{
|
||
18 years ago
|
return x86_read_percpu(irq_regs);
|
||
18 years ago
|
}
|
||
|
|
||
|
static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
|
||
|
{
|
||
|
struct pt_regs *old_regs;
|
||
|
|
||
18 years ago
|
old_regs = get_irq_regs();
|
||
|
x86_write_percpu(irq_regs, new_regs);
|
||
18 years ago
|
|
||
|
return old_regs;
|
||
|
}
|
||
|
|
||
|
#endif /* _ASM_I386_IRQ_REGS_H */
|