Commit a58f053b authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras

powerpc: Fix asm EMIT_BUG_ENTRY with !CONFIG_BUG

Instead of not defining it at all, this defines the macro as
being empty, thus avoiding ifdef's in call sites when CONFIG_BUG
is not set.

Also removes an extra whitespace in the existing definition.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 3045b3cb
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/asm-compat.h> #include <asm/asm-compat.h>
/* /*
* Define an illegal instr to trap on the bug. * Define an illegal instr to trap on the bug.
* We don't use 0 because that marks the end of a function * We don't use 0 because that marks the end of a function
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
#ifdef CONFIG_BUG #ifdef CONFIG_BUG
#ifdef __ASSEMBLY__ #ifdef __ASSEMBLY__
#include <asm/asm-offsets.h>
#ifdef CONFIG_DEBUG_BUGVERBOSE #ifdef CONFIG_DEBUG_BUGVERBOSE
.macro EMIT_BUG_ENTRY addr,file,line,flags .macro EMIT_BUG_ENTRY addr,file,line,flags
.section __bug_table,"a" .section __bug_table,"a"
...@@ -26,7 +28,7 @@ ...@@ -26,7 +28,7 @@
.previous .previous
.endm .endm
#else #else
.macro EMIT_BUG_ENTRY addr,file,line,flags .macro EMIT_BUG_ENTRY addr,file,line,flags
.section __bug_table,"a" .section __bug_table,"a"
5001: PPC_LONG \addr 5001: PPC_LONG \addr
.short \flags .short \flags
...@@ -113,6 +115,13 @@ ...@@ -113,6 +115,13 @@
#define HAVE_ARCH_BUG_ON #define HAVE_ARCH_BUG_ON
#define HAVE_ARCH_WARN_ON #define HAVE_ARCH_WARN_ON
#endif /* __ASSEMBLY __ */ #endif /* __ASSEMBLY __ */
#else
#ifdef __ASSEMBLY__
.macro EMIT_BUG_ENTRY addr,file,line,flags
.endm
#else /* !__ASSEMBLY__ */
#define _EMIT_BUG_ENTRY
#endif
#endif /* CONFIG_BUG */ #endif /* CONFIG_BUG */
#include <asm-generic/bug.h> #include <asm-generic/bug.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment