kdebug.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef _I386_KDEBUG_H
  2. #define _I386_KDEBUG_H 1
  3. /*
  4. * Aug-05 2004 Ported by Prasanna S Panchamukhi <prasanna@in.ibm.com>
  5. * from x86_64 architecture.
  6. */
  7. #include <linux/notifier.h>
  8. struct pt_regs;
  9. struct die_args {
  10. struct pt_regs *regs;
  11. const char *str;
  12. long err;
  13. int trapnr;
  14. int signr;
  15. };
  16. extern int register_die_notifier(struct notifier_block *);
  17. extern int unregister_die_notifier(struct notifier_block *);
  18. extern int register_page_fault_notifier(struct notifier_block *);
  19. extern int unregister_page_fault_notifier(struct notifier_block *);
  20. extern struct atomic_notifier_head i386die_chain;
  21. /* Grossly misnamed. */
  22. enum die_val {
  23. DIE_OOPS = 1,
  24. DIE_INT3,
  25. DIE_DEBUG,
  26. DIE_PANIC,
  27. DIE_NMI,
  28. DIE_DIE,
  29. DIE_NMIWATCHDOG,
  30. DIE_KERNELDEBUG,
  31. DIE_TRAP,
  32. DIE_GPF,
  33. DIE_CALL,
  34. DIE_NMI_IPI,
  35. DIE_NMI_POST,
  36. DIE_PAGE_FAULT,
  37. };
  38. static inline int notify_die(enum die_val val, const char *str,
  39. struct pt_regs *regs, long err, int trap, int sig)
  40. {
  41. struct die_args args = {
  42. .regs = regs,
  43. .str = str,
  44. .err = err,
  45. .trapnr = trap,
  46. .signr = sig
  47. };
  48. return atomic_notifier_call_chain(&i386die_chain, val, &args);
  49. }
  50. #endif