aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-04-27 06:55:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-27 11:04:49 -0400
commit9a523d427dc5908a79ce3ff742e9606e852802d6 (patch)
tree15326ea197fa2632f4e5d7a7011d993ac10a2e15 /arch/frv
parente37469f68a15feb40ee9f6325d1e1793f90afe39 (diff)
FRV: Stop gcc from generating uninitialised variable warnings after BUG()
Stop gcc from generating uninitialised variable warnings after BUG(). The problem is that FRV's call into its gdbstub appears to return (if the function is marked noreturn, then the compiler is under no obligation to pass it a return address, and so GDB won't know where the bug happened). To get around this, we make the do...while wrapper in _debug_bug_trap() an endless loop from which there's no escape. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/include/asm/bug.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/frv/include/asm/bug.h b/arch/frv/include/asm/bug.h
index 6b1b44d71028..2e054508a2f6 100644
--- a/arch/frv/include/asm/bug.h
+++ b/arch/frv/include/asm/bug.h
@@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line);
30do { \ 30do { \
31 __debug_bug_trap(signr); \ 31 __debug_bug_trap(signr); \
32 asm volatile("nop"); \ 32 asm volatile("nop"); \
33} while(0) 33} while(1)
34 34
35#define HAVE_ARCH_BUG 35#define HAVE_ARCH_BUG
36#define BUG() \ 36#define BUG() \
@@ -46,7 +46,8 @@ do { \
46#define HAVE_ARCH_KGDB_BAD_PAGE 46#define HAVE_ARCH_KGDB_BAD_PAGE
47#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0) 47#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
48#endif 48#endif
49#endif 49
50#endif /* CONFIG_BUG */
50 51
51#include <asm-generic/bug.h> 52#include <asm-generic/bug.h>
52 53