kdebug.h 896 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _ASM_POWERPC_KDEBUG_H
  2. #define _ASM_POWERPC_KDEBUG_H
  3. #ifdef __KERNEL__
  4. /* nearly identical to x86_64/i386 code */
  5. #include <linux/notifier.h>
  6. struct pt_regs;
  7. struct die_args {
  8. struct pt_regs *regs;
  9. const char *str;
  10. long err;
  11. int trapnr;
  12. int signr;
  13. };
  14. extern int register_die_notifier(struct notifier_block *);
  15. extern int unregister_die_notifier(struct notifier_block *);
  16. extern struct atomic_notifier_head powerpc_die_chain;
  17. /* Grossly misnamed. */
  18. enum die_val {
  19. DIE_OOPS = 1,
  20. DIE_IABR_MATCH,
  21. DIE_DABR_MATCH,
  22. DIE_BPT,
  23. DIE_SSTEP,
  24. DIE_PAGE_FAULT,
  25. };
  26. static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig)
  27. {
  28. struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig };
  29. return atomic_notifier_call_chain(&powerpc_die_chain, val, &args);
  30. }
  31. #endif /* __KERNEL__ */
  32. #endif /* _ASM_POWERPC_KDEBUG_H */