bug.h 897 B

1234567891011121314151617181920212223242526272829303132333435
  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);
  17. void die(const char *str, struct pt_regs *regs, unsigned long address);
  18. #define BUG() do { \
  19. pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
  20. dump_stack(); \
  21. } while (0)
  22. #define HAVE_ARCH_BUG
  23. #include <asm-generic/bug.h>
  24. #endif /* !__ASSEMBLY__ */
  25. #endif