@@ -8,6 +8,15 @@
#ifdef CONFIG_DEBUG_BUGVERBOSE
+#ifdef CONFIG_KUNIT_SUPPRESS_BACKTRACE
+# define HAVE_BUG_FUNCTION
+# define __BUG_FUNC_PTR " .long %0-.\n"
+# define __BUG_FUNC __func__
+#else
+# define __BUG_FUNC_PTR
+# define __BUG_FUNC NULL
+#endif /* CONFIG_KUNIT_SUPPRESS_BACKTRACE */
+
#define __EMIT_BUG(x) do { \
asm_inline volatile( \
"0: mc 0,0\n" \
@@ -17,10 +26,12 @@
".section __bug_table,\"aw\"\n" \
"2: .long 0b-.\n" \
" .long 1b-.\n" \
- " .short %0,%1\n" \
- " .org 2b+%2\n" \
+ __BUG_FUNC_PTR \
+ " .short %1,%2\n" \
+ " .org 2b+%3\n" \
".previous\n" \
- : : "i" (__LINE__), \
+ : : "i" (__BUG_FUNC), \
+ "i" (__LINE__), \
"i" (x), \
"i" (sizeof(struct bug_entry))); \
} while (0)