Commit a5fc5eba authored by David Daney's avatar David Daney Committed by Linus Torvalds

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: default avatarDavid Daney <ddaney@caviumnetworks.com>
Acked-by: default avatar"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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 38938c87
...@@ -22,14 +22,14 @@ do { \ ...@@ -22,14 +22,14 @@ do { \
".popsection" \ ".popsection" \
: : "i" (__FILE__), "i" (__LINE__), \ : : "i" (__FILE__), "i" (__LINE__), \
"i" (sizeof(struct bug_entry))); \ "i" (sizeof(struct bug_entry))); \
for (;;) ; \ unreachable(); \
} while (0) } while (0)
#else #else
#define BUG() \ #define BUG() \
do { \ do { \
asm volatile("ud2"); \ asm volatile("ud2"); \
for (;;) ; \ unreachable(); \
} while (0) } while (0)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment