unwind.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * arch/arm/include/asm/unwind.h
  4. *
  5. * Copyright (C) 2008 ARM Limited
  6. */
  7. #ifndef __ASM_UNWIND_H
  8. #define __ASM_UNWIND_H
  9. #ifndef __ASSEMBLY__
  10. /* Unwind reason code according the the ARM EABI documents */
  11. enum unwind_reason_code {
  12. URC_OK = 0, /* operation completed successfully */
  13. URC_CONTINUE_UNWIND = 8,
  14. URC_FAILURE = 9 /* unspecified failure of some kind */
  15. };
  16. struct unwind_idx {
  17. unsigned long addr_offset;
  18. unsigned long insn;
  19. };
  20. struct unwind_table {
  21. struct list_head list;
  22. struct list_head mod_list;
  23. const struct unwind_idx *start;
  24. const struct unwind_idx *origin;
  25. const struct unwind_idx *stop;
  26. unsigned long begin_addr;
  27. unsigned long end_addr;
  28. };
  29. extern struct unwind_table *unwind_table_add(unsigned long start,
  30. unsigned long size,
  31. unsigned long text_addr,
  32. unsigned long text_size);
  33. extern void unwind_table_del(struct unwind_table *tab);
  34. extern void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk,
  35. const char *loglvl);
  36. #endif /* !__ASSEMBLY__ */
  37. #ifdef CONFIG_ARM_UNWIND
  38. #define UNWIND(code...) code
  39. #else
  40. #define UNWIND(code...)
  41. #endif
  42. #endif /* __ASM_UNWIND_H */