1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 23be80aaeSVineet Gupta /* 33be80aaeSVineet Gupta * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 43be80aaeSVineet Gupta */ 53be80aaeSVineet Gupta 63be80aaeSVineet Gupta #ifndef _ASM_ARC_BUG_H 73be80aaeSVineet Gupta #define _ASM_ARC_BUG_H 83be80aaeSVineet Gupta 93be80aaeSVineet Gupta #ifndef __ASSEMBLY__ 103be80aaeSVineet Gupta 113be80aaeSVineet Gupta #include <asm/ptrace.h> 123be80aaeSVineet Gupta 133be80aaeSVineet Gupta struct task_struct; 143be80aaeSVineet Gupta 153be80aaeSVineet Gupta void show_regs(struct pt_regs *regs); 16*8ca4d199SDmitry Safonov void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs, 17*8ca4d199SDmitry Safonov const char *loglvl); 183be80aaeSVineet Gupta void show_kernel_fault_diag(const char *str, struct pt_regs *regs, 1938a9ff6dSVineet Gupta unsigned long address); 2038a9ff6dSVineet Gupta void die(const char *str, struct pt_regs *regs, unsigned long address); 213be80aaeSVineet Gupta 223be80aaeSVineet Gupta #define BUG() do { \ 233872d052SVineet Gupta pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ 24173a3efdSArnd Bergmann barrier_before_unreachable(); \ 25173a3efdSArnd Bergmann __builtin_trap(); \ 263be80aaeSVineet Gupta } while (0) 273be80aaeSVineet Gupta 283be80aaeSVineet Gupta #define HAVE_ARCH_BUG 293be80aaeSVineet Gupta 303be80aaeSVineet Gupta #include <asm-generic/bug.h> 313be80aaeSVineet Gupta 323be80aaeSVineet Gupta #endif /* !__ASSEMBLY__ */ 333be80aaeSVineet Gupta 343be80aaeSVineet Gupta #endif 35