Mailing List Archive

[Xen-merge] [PATCH 02/23] bug subarch headers
--- linux-2.6.12-xen0-arch.orig/include/asm-i386/bug.h
+++ linux-2.6.12-xen0-arch/include/asm-i386/bug.h
@@ -2,25 +2,7 @@
#define _I386_BUG_H

#include <linux/config.h>
-
-/*
- * Tell the user there is some problem.
- * The offending file and line are encoded after the "officially
- * undefined" opcode for parsing in the trap handler.
- */
-
-#ifdef CONFIG_BUG
-#define HAVE_ARCH_BUG
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-#define BUG() \
- __asm__ __volatile__( "ud2\n" \
- "\t.word %c0\n" \
- "\t.long %c1\n" \
- : : "i" (__LINE__), "i" (__FILE__))
-#else
-#define BUG() __asm__ __volatile__("ud2\n")
-#endif
-#endif
-
+#include <mach_bug.h>
#include <asm-generic/bug.h>
+
#endif
--- /dev/null
+++ linux-2.6.12-xen0-arch/include/asm-i386/mach-default/mach_bug.h
@@ -0,0 +1,23 @@
+#ifndef _ASM_MACH_BUG_H
+#define _ASM_MACH_BUG_H
+
+/*
+ * Tell the user there is some problem.
+ * The offending file and line are encoded after the "officially
+ * undefined" opcode for parsing in the trap handler.
+ */
+
+#ifdef CONFIG_BUG
+#define HAVE_ARCH_BUG
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+#define BUG() \
+ __asm__ __volatile__( "ud2\n" \
+ "\t.word %c0\n" \
+ "\t.long %c1\n" \
+ : : "i" (__LINE__), "i" (__FILE__))
+#else
+#define BUG() __asm__ __volatile__("ud2\n")
+#endif
+#endif
+
+#endif
--- linux-2.6.12-xen0/include/asm-i386/mach-xen/mach_bug.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.12-xen0-arch/include/asm-i386/mach-xen/mach_bug.h 2005-08-01 21:01:59.000000000 -0700
@@ -0,0 +1,12 @@
+#ifndef _ASM_MACH_BUG_H
+#define _ASM_MACH_BUG_H
+
+#define BUG() do { \
+ printk("kernel BUG at %s:%d (%s)!\n", \
+ __FILE__, __LINE__, __FUNCTION__); \
+ dump_stack(); \
+ panic("BUG!"); \
+} while (0)
+#define HAVE_ARCH_BUG
+
+#endif

--


_______________________________________________
Xen-merge mailing list
Xen-merge@lists.xensource.com
http://lists.xensource.com/xen-merge