bug.h 945 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _ASM_ARC_BUG_H
  9. #define _ASM_ARC_BUG_H
  10. #ifndef __ASSEMBLY__
  11. #include <asm/ptrace.h>
  12. struct task_struct;
  13. void show_regs(struct pt_regs *regs);
  14. void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs);
  15. void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
  16. unsigned long address, unsigned long cause_reg);
  17. void die(const char *str, struct pt_regs *regs, unsigned long address,
  18. unsigned long cause_reg);
  19. #define BUG() do { \
  20. dump_stack(); \
  21. pr_warn("Kernel BUG in %s: %s: %d!\n", \
  22. __FILE__, __func__, __LINE__); \
  23. } while (0)
  24. #define HAVE_ARCH_BUG
  25. #include <asm-generic/bug.h>
  26. #endif /* !__ASSEMBLY__ */
  27. #endif