summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/bug.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-11-19 13:22:42 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-12-03 00:02:29 +0000
commite9c38ceba8d96304c75ca99f7e49060af3a7e063 (patch)
tree312dedc9100aad77d99840c3ddb984956e5f083f /arch/arm/include/asm/bug.h
parenta4124e7296000242243996e1ae2601cfadf276a5 (diff)
downloadop-kernel-dev-e9c38ceba8d96304c75ca99f7e49060af3a7e063.zip
op-kernel-dev-e9c38ceba8d96304c75ca99f7e49060af3a7e063.tar.gz
ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG
Following (a long time after) a4b5d580e078 ("bug: Make BUG() always stop the machine"), this adapts the ARM architecture to no longer rely on the sub-optimal BUG() definition that has a silent endless loop but instead use the same trapping instruction that we have for the full BUG() support. This avoids hundreds of warnings like arch/arm/include/asm/xen/page.h: In function 'arbitrary_virt_to_machine': arch/arm/include/asm/xen/page.h:85:1: warning: no return statement in function returning non-void [-Wreturn-type] and also makes the code size slightly smaller. The behavior changes from silently stopping the kernel to an oops, and follows what x86 does these days. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/bug.h')
-rw-r--r--arch/arm/include/asm/bug.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h
index e7335a9..4e6e88a 100644
--- a/arch/arm/include/asm/bug.h
+++ b/arch/arm/include/asm/bug.h
@@ -5,8 +5,6 @@
#include <linux/types.h>
#include <asm/opcodes.h>
-#ifdef CONFIG_BUG
-
/*
* Use a suitable undefined instruction to use for ARM/Thumb2 bug handling.
* We need to be careful not to conflict with those used by other modules and
@@ -47,7 +45,7 @@ do { \
unreachable(); \
} while (0)
-#else /* not CONFIG_DEBUG_BUGVERBOSE */
+#else
#define __BUG(__file, __line, __value) \
do { \
@@ -57,7 +55,6 @@ do { \
#endif /* CONFIG_DEBUG_BUGVERBOSE */
#define HAVE_ARCH_BUG
-#endif /* CONFIG_BUG */
#include <asm-generic/bug.h>
OpenPOWER on IntegriCloud