aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/bug.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-07-30 01:55:32 -0400
committerLen Brown <len.brown@intel.com>2005-07-30 01:55:32 -0400
commitadbedd34244e2b054557002817f979a9b004a405 (patch)
tree78e4a524e84f8b3e23ae8b49ac689048584e4668 /include/asm-x86_64/bug.h
parent/home/lenb/src/to-linus branch 'acpi-2.6.12' (diff)
parent[PATCH] agp: restore APBASE after setting APSIZE (diff)
downloadlinux-dev-adbedd34244e2b054557002817f979a9b004a405.tar.xz
linux-dev-adbedd34244e2b054557002817f979a9b004a405.zip
merge 2.6.13-rc4 with ACPI's to-linus tree
Diffstat (limited to 'include/asm-x86_64/bug.h')
-rw-r--r--include/asm-x86_64/bug.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h
index 3d2a666a5dd5..eed785667289 100644
--- a/include/asm-x86_64/bug.h
+++ b/include/asm-x86_64/bug.h
@@ -8,17 +8,24 @@
* this frame.
*/
struct bug_frame {
- unsigned char ud2[2];
+ unsigned char ud2[2];
+ unsigned char mov;
/* should use 32bit offset instead, but the assembler doesn't
like it */
char *filename;
+ unsigned char ret;
unsigned short line;
} __attribute__((packed));
#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
-#define BUG() \
- asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \
+/* We turn the bug frame into valid instructions to not confuse
+ the disassembler. Thanks to Jan Beulich & Suresh Siddha
+ for nice instruction selection.
+ The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
+#define BUG() \
+ asm volatile( \
+ "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \
"i"(__LINE__), "i" (__stringify(__FILE__)))
void out_of_line_bug(void);
#else