irq_regs.h 540 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * Copyright (C) 2006 Ralf Baechle ([email protected])
  5. */
  6. #ifndef __ASM_IRQ_REGS_H
  7. #define __ASM_IRQ_REGS_H
  8. #define ARCH_HAS_OWN_IRQ_REGS
  9. #include <linux/thread_info.h>
  10. static inline struct pt_regs *get_irq_regs(void)
  11. {
  12. return current_thread_info()->regs;
  13. }
  14. static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
  15. {
  16. struct pt_regs *old_regs;
  17. old_regs = get_irq_regs();
  18. current_thread_info()->regs = new_regs;
  19. return old_regs;
  20. }
  21. #endif /* __ASM_IRQ_REGS_H */