traps.h 735 B

123456789101112131415161718192021222324252627282930
  1. #ifndef _ASMARM_TRAP_H
  2. #define _ASMARM_TRAP_H
  3. #include <linux/list.h>
  4. struct undef_hook {
  5. struct list_head node;
  6. u32 instr_mask;
  7. u32 instr_val;
  8. u32 cpsr_mask;
  9. u32 cpsr_val;
  10. int (*fn)(struct pt_regs *regs, unsigned int instr);
  11. };
  12. void register_undef_hook(struct undef_hook *hook);
  13. void unregister_undef_hook(struct undef_hook *hook);
  14. static inline int in_exception_text(unsigned long ptr)
  15. {
  16. extern char __exception_text_start[];
  17. extern char __exception_text_end[];
  18. return ptr >= (unsigned long)&__exception_text_start &&
  19. ptr < (unsigned long)&__exception_text_end;
  20. }
  21. extern void __init early_trap_init(void);
  22. extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame);
  23. #endif