Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] pv-on-hvm: Fix panic-handler code to work

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] pv-on-hvm: Fix panic-handler code to work on wider range of kernels.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 14:10:45 -0700
Delivery-date: Fri, 13 Jun 2008 14:12:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213367495 -3600
# Node ID a88e195267706f048d13333fbfd6af3e15829fcf
# Parent  d4dcd4d399524db60c52963cda5acc73305f8b42
pv-on-hvm: Fix panic-handler code to work on wider range of kernels.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/platform-pci/panic-handler.c |   28 ++++----------
 1 files changed, 8 insertions(+), 20 deletions(-)

diff -r d4dcd4d39952 -r a88e19526770 
unmodified_drivers/linux-2.6/platform-pci/panic-handler.c
--- a/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c Fri Jun 13 
14:15:00 2008 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c Fri Jun 13 
15:31:35 2008 +0100
@@ -2,6 +2,10 @@
 #include <linux/init.h>
 #include <linux/notifier.h>
 #include <asm/hypervisor.h>
+
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
+#endif
 
 MODULE_LICENSE("GPL");
 
@@ -26,29 +30,13 @@ xen_panic_event(struct notifier_block *t
        /* we're never actually going to get here... */
        return NOTIFY_DONE;
 }
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+
 static struct notifier_block xen_panic_block = {
-       xen_panic_event, NULL, 0 /* try to go last */
+       .notifier_call = xen_panic_event
 };
-#else
-static struct notifier_block xen_panic_block = {
-       .notifier_call= xen_panic_event,
-       .next= NULL,
-       .priority= 0/* try to go last */
-};
-#endif /*LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)*/
-
-static int __init setup_panic_event(void)
-{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-       notifier_chain_register(&panic_notifier_list, &xen_panic_block);
-#else
-       atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
-#endif /*LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)*/
-       return 0;
-}
 
 int xen_panic_handler_init(void)
 {
-       return setup_panic_event();
+       atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
+       return 0;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] pv-on-hvm: Fix panic-handler code to work on wider range of kernels., Xen patchbot-unstable <=