kdebug.h 817 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __ASM_AVR32_KDEBUG_H
  2. #define __ASM_AVR32_KDEBUG_H
  3. #include <linux/notifier.h>
  4. struct pt_regs;
  5. struct die_args {
  6. struct pt_regs *regs;
  7. int trapnr;
  8. };
  9. int register_die_notifier(struct notifier_block *nb);
  10. int unregister_die_notifier(struct notifier_block *nb);
  11. int register_page_fault_notifier(struct notifier_block *nb);
  12. int unregister_page_fault_notifier(struct notifier_block *nb);
  13. extern struct atomic_notifier_head avr32_die_chain;
  14. /* Grossly misnamed. */
  15. enum die_val {
  16. DIE_FAULT,
  17. DIE_BREAKPOINT,
  18. DIE_SSTEP,
  19. DIE_PAGE_FAULT,
  20. };
  21. static inline int notify_die(enum die_val val, struct pt_regs *regs,
  22. int trap, int sig)
  23. {
  24. struct die_args args = {
  25. .regs = regs,
  26. .trapnr = trap,
  27. };
  28. return atomic_notifier_call_chain(&avr32_die_chain, val, &args);
  29. }
  30. #endif /* __ASM_AVR32_KDEBUG_H */