Skip to content

Commit 7e8c292

Browse files
committed
bugs/riscv: Pass in 'cond_str' to __BUG_FLAGS()
Pass in the condition string from __WARN_FLAGS() to __BUG_FLAGS(), but don't use it yet. Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> # Rebased ancestor commits Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: linux-arch@vger.kernel.org Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20250515124644.2958810-12-mingo@kernel.org
1 parent 6584ff2 commit 7e8c292

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • arch/riscv/include/asm

arch/riscv/include/asm/bug.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ typedef u32 bug_insn_t;
5050
#endif
5151

5252
#ifdef CONFIG_GENERIC_BUG
53-
#define __BUG_FLAGS(flags) \
53+
#define __BUG_FLAGS(cond_str, flags) \
5454
do { \
5555
__asm__ __volatile__ ( \
5656
"1:\n\t" \
@@ -66,17 +66,17 @@ do { \
6666
"i" (sizeof(struct bug_entry))); \
6767
} while (0)
6868
#else /* CONFIG_GENERIC_BUG */
69-
#define __BUG_FLAGS(flags) do { \
69+
#define __BUG_FLAGS(cond_str, flags) do { \
7070
__asm__ __volatile__ ("ebreak\n"); \
7171
} while (0)
7272
#endif /* CONFIG_GENERIC_BUG */
7373

7474
#define BUG() do { \
75-
__BUG_FLAGS(0); \
75+
__BUG_FLAGS("", 0); \
7676
unreachable(); \
7777
} while (0)
7878

79-
#define __WARN_FLAGS(cond_str, flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
79+
#define __WARN_FLAGS(cond_str, flags) __BUG_FLAGS(cond_str, BUGFLAG_WARNING|(flags))
8080

8181
#define HAVE_ARCH_BUG
8282

0 commit comments

Comments
 (0)