summaryrefslogtreecommitdiff
path: root/include/asm-ppc64/bug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/bug.h')
-rw-r--r--include/asm-ppc64/bug.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-ppc64/bug.h b/include/asm-ppc64/bug.h
index db31dd22233c..169868fa307d 100644
--- a/include/asm-ppc64/bug.h
+++ b/include/asm-ppc64/bug.h
@@ -26,6 +26,8 @@ struct bug_entry *find_bug(unsigned long bugaddr);
*/
#define BUG_WARNING_TRAP 0x1000000
+#ifdef CONFIG_BUG
+
#define BUG() do { \
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
@@ -55,11 +57,12 @@ struct bug_entry *find_bug(unsigned long bugaddr);
"i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)
-#endif
-
#define HAVE_ARCH_BUG
#define HAVE_ARCH_BUG_ON
#define HAVE_ARCH_WARN_ON
+#endif
+#endif
+
#include <asm-generic/bug.h>
#endif