blob: 0be19fd1a4126ae42bcbd3dc4cd32a2f4e292748 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
6#ifndef _ASM_ARC_BUG_H
7#define _ASM_ARC_BUG_H
8
9#ifndef __ASSEMBLY__
10
11#include <asm/ptrace.h>
12
13struct task_struct;
14
15void show_regs(struct pt_regs *regs);
16void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs);
17void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
18 unsigned long address);
19void die(const char *str, struct pt_regs *regs, unsigned long address);
20
21#define BUG() do { \
22 pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
23 barrier_before_unreachable(); \
24 __builtin_trap(); \
25} while (0)
26
27#define HAVE_ARCH_BUG
28
29#include <asm-generic/bug.h>
30
31#endif /* !__ASSEMBLY__ */
32
33#endif