From: Arnd Bergmann Date: Thu, 19 Nov 2015 12:22:42 +0000 (+0100) Subject: ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG X-Git-Tag: v4.5-rc1~142^2~1^2~20 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e9c38ceba8d9;p=karo-tx-linux.git 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 Signed-off-by: Russell King --- diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index e7335a92144e..4e6e88a6b2f4 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h @@ -5,8 +5,6 @@ #include #include -#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