Loading...
1/*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef _ASM_ARC_BUG_H
10#define _ASM_ARC_BUG_H
11
12#ifndef __ASSEMBLY__
13
14#include <asm/ptrace.h>
15
16struct task_struct;
17
18void show_regs(struct pt_regs *regs);
19void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs);
20void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
21 unsigned long address);
22void die(const char *str, struct pt_regs *regs, unsigned long address);
23
24#define BUG() do { \
25 pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
26 dump_stack(); \
27} while (0)
28
29#define HAVE_ARCH_BUG
30
31#include <asm-generic/bug.h>
32
33#endif /* !__ASSEMBLY__ */
34
35#endif
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
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
13struct task_struct;
14
15void show_regs(struct pt_regs *regs);
16void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs,
17 const char *loglvl);
18void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
19 unsigned long address);
20void die(const char *str, struct pt_regs *regs, unsigned long address);
21
22#define BUG() do { \
23 pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
24 barrier_before_unreachable(); \
25 __builtin_trap(); \
26} while (0)
27
28#define HAVE_ARCH_BUG
29
30#include <asm-generic/bug.h>
31
32#endif /* !__ASSEMBLY__ */
33
34#endif