[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251209121701.1856271-4-hca@linux.ibm.com>
Date: Tue, 9 Dec 2025 13:16:55 +0100
From: Heiko Carstens <hca@...ux.ibm.com>
To: Alexander Gordeev <agordeev@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Mark Rutland <mark.rutland@....com>, Arnd Bergmann <arnd@...db.de>,
Jens Remus <jremus@...ux.ibm.com>,
Stefan Schulze Frielinghaus <stefansf@...ux.ibm.com>,
Juergen Christ <jchrist@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: [PATCH 3/9] s390/bug: Use BUG_FORMAT for DEBUG_BUGVERBOSE_DETAILED
This is just the s390 variant of commit 4f1b701f24be ("x86/bug: Use
BUG_FORMAT for DEBUG_BUGVERBOSE_DETAILED").
Signed-off-by: Heiko Carstens <hca@...ux.ibm.com>
---
arch/s390/include/asm/bug.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h
index 61496143a382..5a635158cbad 100644
--- a/arch/s390/include/asm/bug.h
+++ b/arch/s390/include/asm/bug.h
@@ -7,11 +7,18 @@
#ifdef CONFIG_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
-#define __BUG_ENTRY_VERBOSE(file, line) \
+#define __BUG_ENTRY_VERBOSE(format, file, line) \
+ " .long " format " - . # bug_entry::format\n" \
" .long " file " - . # bug_entry::file\n" \
" .short " line " # bug_entry::line\n"
#else
-#define __BUG_ENTRY_VERBOSE(file, line)
+#define __BUG_ENTRY_VERBOSE(format, file, line)
+#endif
+
+#ifdef CONFIG_DEBUG_BUGVERBOSE_DETAILED
+#define WARN_CONDITION_STR(cond_str) cond_str
+#else
+#define WARN_CONDITION_STR(cond_str) ""
#endif
#define __BUG_ASM(cond_str, flags) \
@@ -20,12 +27,13 @@ do { \
"0: mc 0,0\n" \
" .section __bug_table,\"aw\"\n" \
"1: .long 0b - . # bug_entry::bug_addr\n" \
- __BUG_ENTRY_VERBOSE("%[file]", "%[line]") \
+ __BUG_ENTRY_VERBOSE("%[frmt]", "%[file]", "%[line]") \
" .short %[flgs] # bug_entry::flags\n" \
" .org 1b+%[size]\n" \
" .previous" \
: \
- : [file] "i" (WARN_CONDITION_STR(cond_str) __FILE__), \
+ : [frmt] "i" (WARN_CONDITION_STR(cond_str)), \
+ [file] "i" (__FILE__), \
[line] "i" (__LINE__), \
[flgs] "i" (flags), \
[size] "i" (sizeof(struct bug_entry))); \
@@ -43,6 +51,7 @@ do { \
} while (0)
#define HAVE_ARCH_BUG
+#define HAVE_ARCH_BUG_FORMAT
#endif /* CONFIG_BUG */
--
2.51.0
Powered by blists - more mailing lists