~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to arch/arm/include/asm/bug.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define _ASMARM_BUG_H
3
3
 
4
4
#include <linux/linkage.h>
 
5
#include <linux/types.h>
 
6
#include <asm/opcodes.h>
5
7
 
6
8
#ifdef CONFIG_BUG
7
9
 
12
14
 */
13
15
#ifdef CONFIG_THUMB2_KERNEL
14
16
#define BUG_INSTR_VALUE 0xde02
15
 
#define BUG_INSTR_TYPE ".hword "
 
17
#define BUG_INSTR(__value) __inst_thumb16(__value)
16
18
#else
17
19
#define BUG_INSTR_VALUE 0xe7f001f2
18
 
#define BUG_INSTR_TYPE ".word "
 
20
#define BUG_INSTR(__value) __inst_arm(__value)
19
21
#endif
20
22
 
21
23
 
33
35
 
34
36
#define __BUG(__file, __line, __value)                          \
35
37
do {                                                            \
36
 
        asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n"        \
 
38
        asm volatile("1:\t" BUG_INSTR(__value) "\n"  \
37
39
                ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \
38
40
                "2:\t.asciz " #__file "\n"                      \
39
41
                ".popsection\n"                                 \
48
50
 
49
51
#define __BUG(__file, __line, __value)                          \
50
52
do {                                                            \
51
 
        asm volatile(BUG_INSTR_TYPE #__value);                  \
 
53
        asm volatile(BUG_INSTR(__value) "\n");                  \
52
54
        unreachable();                                          \
53
55
} while (0)
54
56
#endif  /* CONFIG_DEBUG_BUGVERBOSE */