irq_regs.h 636 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Per-cpu current frame pointer - the location of the last exception frame on
  3. * the stack, stored in the per-cpu area.
  4. *
  5. * Jeremy Fitzhardinge <jeremy@goop.org>
  6. */
  7. #ifndef _ASM_X86_IRQ_REGS_H
  8. #define _ASM_X86_IRQ_REGS_H
  9. #include <asm/percpu.h>
  10. #define ARCH_HAS_OWN_IRQ_REGS
  11. DECLARE_PER_CPU(struct pt_regs *, irq_regs);
  12. static inline struct pt_regs *get_irq_regs(void)
  13. {
  14. return percpu_read(irq_regs);
  15. }
  16. static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
  17. {
  18. struct pt_regs *old_regs;
  19. old_regs = get_irq_regs();
  20. percpu_write(irq_regs, new_regs);
  21. return old_regs;
  22. }
  23. #endif /* _ASM_X86_IRQ_REGS_32_H */