Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  */
0005 
0006 #ifndef _ASM_ARC_BUG_H
0007 #define _ASM_ARC_BUG_H
0008 
0009 #ifndef __ASSEMBLY__
0010 
0011 #include <asm/ptrace.h>
0012 
0013 struct task_struct;
0014 
0015 void show_regs(struct pt_regs *regs);
0016 void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs,
0017              const char *loglvl);
0018 void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
0019                 unsigned long address);
0020 void die(const char *str, struct pt_regs *regs, unsigned long address);
0021 
0022 #define BUG()   do {                                \
0023     pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
0024     barrier_before_unreachable();                       \
0025     __builtin_trap();                           \
0026 } while (0)
0027 
0028 #define HAVE_ARCH_BUG
0029 
0030 #include <asm-generic/bug.h>
0031 
0032 #endif  /* !__ASSEMBLY__ */
0033 
0034 #endif