13be80aaeSVineet Gupta /* 23be80aaeSVineet Gupta * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 33be80aaeSVineet Gupta * 43be80aaeSVineet Gupta * This program is free software; you can redistribute it and/or modify 53be80aaeSVineet Gupta * it under the terms of the GNU General Public License version 2 as 63be80aaeSVineet Gupta * published by the Free Software Foundation. 73be80aaeSVineet Gupta */ 83be80aaeSVineet Gupta 93be80aaeSVineet Gupta #ifndef _ASM_ARC_BUG_H 103be80aaeSVineet Gupta #define _ASM_ARC_BUG_H 113be80aaeSVineet Gupta 123be80aaeSVineet Gupta #ifndef __ASSEMBLY__ 133be80aaeSVineet Gupta 143be80aaeSVineet Gupta #include <asm/ptrace.h> 153be80aaeSVineet Gupta 163be80aaeSVineet Gupta struct task_struct; 173be80aaeSVineet Gupta 183be80aaeSVineet Gupta void show_regs(struct pt_regs *regs); 193be80aaeSVineet Gupta void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs); 203be80aaeSVineet Gupta void show_kernel_fault_diag(const char *str, struct pt_regs *regs, 2138a9ff6dSVineet Gupta unsigned long address); 2238a9ff6dSVineet Gupta void die(const char *str, struct pt_regs *regs, unsigned long address); 233be80aaeSVineet Gupta 243be80aaeSVineet Gupta #define BUG() do { \ 25*3872d052SVineet Gupta pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ 263be80aaeSVineet Gupta dump_stack(); \ 273be80aaeSVineet Gupta } while (0) 283be80aaeSVineet Gupta 293be80aaeSVineet Gupta #define HAVE_ARCH_BUG 303be80aaeSVineet Gupta 313be80aaeSVineet Gupta #include <asm-generic/bug.h> 323be80aaeSVineet Gupta 333be80aaeSVineet Gupta #endif /* !__ASSEMBLY__ */ 343be80aaeSVineet Gupta 353be80aaeSVineet Gupta #endif 36