aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv/bug.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-frv/bug.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-frv/bug.h')
-rw-r--r--include/asm-frv/bug.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h
new file mode 100644
index 000000000000..011860b28818
--- /dev/null
+++ b/include/asm-frv/bug.h
@@ -0,0 +1,51 @@
1/* bug.h: FRV bug trapping
2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11#ifndef _ASM_BUG_H
12#define _ASM_BUG_H
13
14#include <linux/config.h>
15
16/*
17 * Tell the user there is some problem.
18 */
19extern asmlinkage void __debug_bug_trap(int signr);
20
21#ifdef CONFIG_NO_KERNEL_MSG
22#define _debug_bug_printk()
23#else
24extern void __debug_bug_printk(const char *file, unsigned line);
25#define _debug_bug_printk() __debug_bug_printk(__FILE__, __LINE__)
26#endif
27
28#define _debug_bug_trap(signr) \
29do { \
30 __debug_bug_trap(signr); \
31 asm volatile("nop"); \
32} while(0)
33
34#define HAVE_ARCH_BUG
35#define BUG() \
36do { \
37 _debug_bug_printk(); \
38 _debug_bug_trap(6 /*SIGABRT*/); \
39} while (0)
40
41#ifdef CONFIG_GDBSTUB
42#define HAVE_ARCH_KGDB_RAISE
43#define kgdb_raise(signr) do { _debug_bug_trap(signr); } while(0)
44
45#define HAVE_ARCH_KGDB_BAD_PAGE
46#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
47#endif
48
49#include <asm-generic/bug.h>
50
51#endif