dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
David Daney 2009-12-04 17:44:51 -08:00 committed by Linus Torvalds
parent 38938c879e
commit a5fc5eba4d
1 changed files with 2 additions and 2 deletions

View File

@ -22,14 +22,14 @@ do { \
".popsection" \
: : "i" (__FILE__), "i" (__LINE__), \
"i" (sizeof(struct bug_entry))); \
for (;;) ; \
unreachable(); \
} while (0)
#else
#define BUG() \
do { \
asm volatile("ud2"); \
for (;;) ; \
unreachable(); \
} while (0)
#endif