Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_ARC_BUG_H |
| 7 | #define _ASM_ARC_BUG_H |
| 8 | |
| 9 | #ifndef __ASSEMBLY__ |
| 10 | |
| 11 | #include <asm/ptrace.h> |
| 12 | |
| 13 | struct task_struct; |
| 14 | |
| 15 | void show_regs(struct pt_regs *regs); |
| 16 | void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs); |
| 17 | void show_kernel_fault_diag(const char *str, struct pt_regs *regs, |
Vineet Gupta | 38a9ff6 | 2013-06-12 15:13:40 +0530 | [diff] [blame] | 18 | unsigned long address); |
| 19 | void die(const char *str, struct pt_regs *regs, unsigned long address); |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 20 | |
Vineet Gupta | 3872d05 | 2014-09-24 16:36:48 +0530 | [diff] [blame] | 21 | #define BUG() do { \ |
| 22 | pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ |
Arnd Bergmann | 173a3ef | 2018-02-21 14:45:54 -0800 | [diff] [blame] | 23 | barrier_before_unreachable(); \ |
| 24 | __builtin_trap(); \ |
Vineet Gupta | 3be80aa | 2013-01-18 15:12:17 +0530 | [diff] [blame] | 25 | } while (0) |
| 26 | |
| 27 | #define HAVE_ARCH_BUG |
| 28 | |
| 29 | #include <asm-generic/bug.h> |
| 30 | |
| 31 | #endif /* !__ASSEMBLY__ */ |
| 32 | |
| 33 | #endif |