Skip to content

Commit 66e94df

Browse files
committed
bugs/LoongArch: Pass in 'cond_str' to __BUG_ENTRY()
Pass in the condition string from __WARN_FLAGS(), but don't use it yet. Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Josh Poimboeuf <jpoimboe@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20250515124644.2958810-9-mingo@kernel.org
1 parent 1284579 commit 66e94df

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

  • arch/loongarch/include/asm

arch/loongarch/include/asm/bug.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,38 @@
2020
#endif
2121

2222
#ifndef CONFIG_GENERIC_BUG
23-
#define __BUG_ENTRY(flags)
23+
#define __BUG_ENTRY(cond_str, flags)
2424
#else
25-
#define __BUG_ENTRY(flags) \
25+
#define __BUG_ENTRY(cond_str, flags) \
2626
.pushsection __bug_table, "aw"; \
2727
.align 2; \
2828
10000: .long 10001f - .; \
2929
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
30-
.short flags; \
30+
.short flags; \
3131
.popsection; \
3232
10001:
3333
#endif
3434

35-
#define ASM_BUG_FLAGS(flags) \
36-
__BUG_ENTRY(flags) \
35+
#define ASM_BUG_FLAGS(cond_str, flags) \
36+
__BUG_ENTRY(cond_str, flags) \
3737
break BRK_BUG;
3838

39-
#define ASM_BUG() ASM_BUG_FLAGS(0)
39+
#define ASM_BUG() ASM_BUG_FLAGS("", 0)
4040

41-
#define __BUG_FLAGS(flags, extra) \
42-
asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags)) \
43-
extra);
41+
#define __BUG_FLAGS(cond_str, flags, extra) \
42+
asm_inline volatile (__stringify(ASM_BUG_FLAGS(cond_str, flags)) extra);
4443

4544
#define __WARN_FLAGS(cond_str, flags) \
4645
do { \
4746
instrumentation_begin(); \
48-
__BUG_FLAGS(BUGFLAG_WARNING|(flags), ANNOTATE_REACHABLE(10001b));\
47+
__BUG_FLAGS(cond_str, BUGFLAG_WARNING|(flags), ANNOTATE_REACHABLE(10001b));\
4948
instrumentation_end(); \
5049
} while (0)
5150

5251
#define BUG() \
5352
do { \
5453
instrumentation_begin(); \
55-
__BUG_FLAGS(0, ""); \
54+
__BUG_FLAGS("", 0, ""); \
5655
unreachable(); \
5756
} while (0)
5857

0 commit comments

Comments
 (0)