+5
-2
arch/parisc/Kconfig
+5
-2
arch/parisc/Kconfig
+17
-17
arch/parisc/include/asm/bug.h
+17
-17
arch/parisc/include/asm/bug.h
···
17
17
#define PARISC_BUG_BREAK_ASM "break 0x1f, 0x1fff"
18
18
#define PARISC_BUG_BREAK_INSN 0x03ffe01f /* PARISC_BUG_BREAK_ASM */
19
19
20
-
#if defined(CONFIG_64BIT)
21
-
#define ASM_WORD_INSN ".dword\t"
20
+
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
21
+
# define __BUG_REL(val) ".word " __stringify(val) " - ."
22
22
#else
23
-
#define ASM_WORD_INSN ".word\t"
23
+
# define __BUG_REL(val) ".word " __stringify(val)
24
24
#endif
25
+
25
26
26
27
#ifdef CONFIG_DEBUG_BUGVERBOSE
27
28
#define BUG() \
···
30
29
asm volatile("\n" \
31
30
"1:\t" PARISC_BUG_BREAK_ASM "\n" \
32
31
"\t.pushsection __bug_table,\"a\"\n" \
33
-
"\t.align %4\n" \
34
-
"2:\t" ASM_WORD_INSN "1b, %c0\n" \
32
+
"\t.align 4\n" \
33
+
"2:\t" __BUG_REL(1b) "\n" \
34
+
"\t" __BUG_REL(%c0) "\n" \
35
35
"\t.short %1, %2\n" \
36
-
"\t.blockz %3-2*%4-2*2\n" \
36
+
"\t.blockz %3-2*4-2*2\n" \
37
37
"\t.popsection" \
38
38
: : "i" (__FILE__), "i" (__LINE__), \
39
-
"i" (0), "i" (sizeof(struct bug_entry)), \
40
-
"i" (sizeof(long)) ); \
39
+
"i" (0), "i" (sizeof(struct bug_entry)) ); \
41
40
unreachable(); \
42
41
} while(0)
43
42
···
55
54
asm volatile("\n" \
56
55
"1:\t" PARISC_BUG_BREAK_ASM "\n" \
57
56
"\t.pushsection __bug_table,\"a\"\n" \
58
-
"\t.align %4\n" \
59
-
"2:\t" ASM_WORD_INSN "1b, %c0\n" \
57
+
"\t.align 4\n" \
58
+
"2:\t" __BUG_REL(1b) "\n" \
59
+
"\t" __BUG_REL(%c0) "\n" \
60
60
"\t.short %1, %2\n" \
61
-
"\t.blockz %3-2*%4-2*2\n" \
61
+
"\t.blockz %3-2*4-2*2\n" \
62
62
"\t.popsection" \
63
63
: : "i" (__FILE__), "i" (__LINE__), \
64
64
"i" (BUGFLAG_WARNING|(flags)), \
65
-
"i" (sizeof(struct bug_entry)), \
66
-
"i" (sizeof(long)) ); \
65
+
"i" (sizeof(struct bug_entry)) ); \
67
66
} while(0)
68
67
#else
69
68
#define __WARN_FLAGS(flags) \
···
72
71
"1:\t" PARISC_BUG_BREAK_ASM "\n" \
73
72
"\t.pushsection __bug_table,\"a\"\n" \
74
73
"\t.align %2\n" \
75
-
"2:\t" ASM_WORD_INSN "1b\n" \
74
+
"2:\t" __BUG_REL(1b) "\n" \
76
75
"\t.short %0\n" \
77
-
"\t.blockz %1-%2-2\n" \
76
+
"\t.blockz %1-4-2\n" \
78
77
"\t.popsection" \
79
78
: : "i" (BUGFLAG_WARNING|(flags)), \
80
-
"i" (sizeof(struct bug_entry)), \
81
-
"i" (sizeof(long)) ); \
79
+
"i" (sizeof(struct bug_entry)) ); \
82
80
} while(0)
83
81
#endif
84
82