WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-merge

[Xen-merge] [PATCH 02/23] bug subarch headers

To: xen-merge@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-merge] [PATCH 02/23] bug subarch headers
From: Chris Wright <chrisw@xxxxxxxx>
Date: Mon, 08 Aug 2005 00:02:38 -0700
Delivery-date: Mon, 08 Aug 2005 07:07:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-merge-request@lists.xensource.com?subject=help>
List-id: xen-merge <xen-merge.lists.xensource.com>
List-post: <mailto:xen-merge@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=unsubscribe>
References: <20050808070236.231405000@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-merge-bounces@xxxxxxxxxxxxxxxxxxx
--- 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-merge