aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bug.h
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2009-12-04 20:44:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-05 12:10:12 -0500
commita5fc5eba4dfcc284e6adcd7fdcd5b43182230d2b (patch)
tree2771bcf886ea10c88759445c0c4599bfca20b5e8 /arch/x86/include/asm/bug.h
parent38938c879eb0c39edf85d5164aa0cffe2874304c (diff)
x86: Convert BUG() to use unreachable()
Use the new unreachable() macro instead of for(;;);. When allyesconfig is built with a GCC-4.5 snapshot on i686 the size of the text segment is reduced by 3987 bytes (from 6827019 to 6823032). Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@redhat.com> CC: x86@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/bug.h')
-rw-r--r--arch/x86/include/asm/bug.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index d9cf1cd156d2..f654d1bb17fb 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -22,14 +22,14 @@ do { \
22 ".popsection" \ 22 ".popsection" \
23 : : "i" (__FILE__), "i" (__LINE__), \ 23 : : "i" (__FILE__), "i" (__LINE__), \
24 "i" (sizeof(struct bug_entry))); \ 24 "i" (sizeof(struct bug_entry))); \
25 for (;;) ; \ 25 unreachable(); \
26} while (0) 26} while (0)
27 27
28#else 28#else
29#define BUG() \ 29#define BUG() \
30do { \ 30do { \
31 asm volatile("ud2"); \ 31 asm volatile("ud2"); \
32 for (;;) ; \ 32 unreachable(); \
33} while (0) 33} while (0)
34#endif 34#endif
35 35