bug.h 819 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  4. */
  5. #ifndef _ASM_ARC_BUG_H
  6. #define _ASM_ARC_BUG_H
  7. #ifndef __ASSEMBLY__
  8. #include <asm/ptrace.h>
  9. struct task_struct;
  10. void show_regs(struct pt_regs *regs);
  11. void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs,
  12. const char *loglvl);
  13. void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
  14. unsigned long address);
  15. void die(const char *str, struct pt_regs *regs, unsigned long address);
  16. #define BUG() do { \
  17. pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
  18. barrier_before_unreachable(); \
  19. __builtin_trap(); \
  20. } while (0)
  21. #define HAVE_ARCH_BUG
  22. #include <asm-generic/bug.h>
  23. #endif /* !__ASSEMBLY__ */
  24. #endif