kdebug.h 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_KDEBUG_H
  3. #define _ASM_X86_KDEBUG_H
  4. #include <linux/notifier.h>
  5. struct pt_regs;
  6. /* Grossly misnamed. */
  7. enum die_val {
  8. DIE_OOPS = 1,
  9. DIE_INT3,
  10. DIE_DEBUG,
  11. DIE_PANIC,
  12. DIE_NMI,
  13. DIE_DIE,
  14. DIE_KERNELDEBUG,
  15. DIE_TRAP,
  16. DIE_GPF,
  17. DIE_CALL,
  18. DIE_PAGE_FAULT,
  19. DIE_NMIUNKNOWN,
  20. };
  21. enum show_regs_mode {
  22. SHOW_REGS_SHORT,
  23. /*
  24. * For when userspace crashed, but we don't think it's our fault, and
  25. * therefore don't print kernel registers.
  26. */
  27. SHOW_REGS_USER,
  28. SHOW_REGS_ALL
  29. };
  30. extern void die(const char *, struct pt_regs *,long);
  31. extern int __must_check __die(const char *, struct pt_regs *, long);
  32. extern void show_stack_regs(struct pt_regs *regs);
  33. extern void __show_regs(struct pt_regs *regs, enum show_regs_mode);
  34. extern void show_iret_regs(struct pt_regs *regs);
  35. extern unsigned long oops_begin(void);
  36. extern void oops_end(unsigned long, struct pt_regs *, int signr);
  37. #endif /* _ASM_X86_KDEBUG_H */