[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] pv-on-hvm: Fix panic-handler code to work on wider range of kernels.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.