Skip to content

Commit 1c59c2b

Browse files
committed
bugs/powerpc: Pass in 'cond_str' to BUG_ENTRY()
Pass in the condition string from __WARN_FLAGS(), WARN_ON() and BUG_ON(), but don't use it yet. Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Naveen N Rao <naveen@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: linux-arch@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20250515124644.2958810-7-mingo@kernel.org
1 parent 48ede5b commit 1c59c2b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • arch/powerpc/include/asm

arch/powerpc/include/asm/bug.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
".previous\n"
5252
#endif
5353

54-
#define BUG_ENTRY(insn, flags, ...) \
54+
#define BUG_ENTRY(cond_str, insn, flags, ...) \
5555
__asm__ __volatile__( \
5656
"1: " insn "\n" \
5757
_EMIT_BUG_ENTRY \
@@ -67,20 +67,20 @@
6767
*/
6868

6969
#define BUG() do { \
70-
BUG_ENTRY("twi 31, 0, 0", 0); \
70+
BUG_ENTRY("", "twi 31, 0, 0", 0); \
7171
unreachable(); \
7272
} while (0)
7373
#define HAVE_ARCH_BUG
7474

75-
#define __WARN_FLAGS(cond_str, flags) BUG_ENTRY("twi 31, 0, 0", BUGFLAG_WARNING | (flags))
75+
#define __WARN_FLAGS(cond_str, flags) BUG_ENTRY(cond_str, "twi 31, 0, 0", BUGFLAG_WARNING | (flags))
7676

7777
#ifdef CONFIG_PPC64
7878
#define BUG_ON(x) do { \
7979
if (__builtin_constant_p(x)) { \
8080
if (x) \
8181
BUG(); \
8282
} else { \
83-
BUG_ENTRY(PPC_TLNEI " %4, 0", 0, "r" ((__force long)(x))); \
83+
BUG_ENTRY(#x, PPC_TLNEI " %4, 0", 0, "r" ((__force long)(x))); \
8484
} \
8585
} while (0)
8686

@@ -90,7 +90,7 @@
9090
if (__ret_warn_on) \
9191
__WARN(); \
9292
} else { \
93-
BUG_ENTRY(PPC_TLNEI " %4, 0", \
93+
BUG_ENTRY(#x, PPC_TLNEI " %4, 0", \
9494
BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), \
9595
"r" (__ret_warn_on)); \
9696
} \

0 commit comments

Comments
 (0)