diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-06-13 15:31:35 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-06-13 15:31:35 +0100 |
commit | 665d7a5c3db5b777168e92ede4c12eb4edb86dbb (patch) | |
tree | 4a8c0601f77fd53895f7ad58e9ea9c819ffcf28c /unmodified_drivers | |
parent | 2754857001634a58e6e9066e8e10ebd0e09ed26b (diff) | |
download | xen-665d7a5c3db5b777168e92ede4c12eb4edb86dbb.tar.gz xen-665d7a5c3db5b777168e92ede4c12eb4edb86dbb.tar.bz2 xen-665d7a5c3db5b777168e92ede4c12eb4edb86dbb.zip |
pv-on-hvm: Fix panic-handler code to work on wider range of kernels.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'unmodified_drivers')
-rw-r--r-- | unmodified_drivers/linux-2.6/platform-pci/panic-handler.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c b/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c index 91bc03549b..7564d0c7d9 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c +++ b/unmodified_drivers/linux-2.6/platform-pci/panic-handler.c @@ -3,6 +3,10 @@ #include <linux/notifier.h> #include <asm/hypervisor.h> +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include <xen/platform-compat.h> +#endif + MODULE_LICENSE("GPL"); #ifdef __ia64__ @@ -26,29 +30,13 @@ xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) /* 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 */ -}; -#else + static struct notifier_block xen_panic_block = { - .notifier_call= xen_panic_event, - .next= NULL, - .priority= 0/* try to go last */ + .notifier_call = xen_panic_event }; -#endif /*LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)*/ -static int __init setup_panic_event(void) +int xen_panic_handler_init(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(); -} |