irq_regs.h 538 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  4. */
  5. #ifndef __ASM_IRQ_REGS_H
  6. #define __ASM_IRQ_REGS_H
  7. #define ARCH_HAS_OWN_IRQ_REGS
  8. #include <linux/thread_info.h>
  9. static inline struct pt_regs *get_irq_regs(void)
  10. {
  11. return current_thread_info()->regs;
  12. }
  13. static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
  14. {
  15. struct pt_regs *old_regs;
  16. old_regs = get_irq_regs();
  17. current_thread_info()->regs = new_regs;
  18. return old_regs;
  19. }
  20. #endif /* __ASM_IRQ_REGS_H */