PV driver compatibility patch
PATCH 1/1 PV driver compatibility patch
This patch fixes compilation issues on 2.6.16 kernels.
drivers/xen/xenbus/xenbus_probe.c +16 -1
@@ -67,8 +67,11 @@static unsigned long xen_store_mfn;extern struct mutex xenwatch_mutex; - +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +static struct notifier_block *xenstore_chain; +#else static ATOMIC_NOTIFIER_HEAD (xenstore_chain); +#endif static void wait_for_devices (struct xenbus_driver *xendrv);
@@ -796,7 +799,11 @@if (xenstored_ready >0 ) ret = nb->notifier_call (nb,0 ,NULL ); else +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +notifier_chain_register (&xenstore_chain, nb); +#else atomic_notifier_chain_register (&xenstore_chain, nb); +#endif return ret; }
@@ -804,7 +811,11 @@void unregister_xenstore_notifier (struct notifier_block *nb) { +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +notifier_chain_unregister (&xenstore_chain, nb); +#else atomic_notifier_chain_unregister (&xenstore_chain, nb); +#endif }EXPORT_SYMBOL_GPL (unregister_xenstore_notifier);
@@ -819,7 +830,11 @@xenbus_backend_probe_and_watch ();/* Notify others that xenstore is up */ +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +notifier_call_chain (&xenstore_chain,0 ,NULL ); +#else atomic_notifier_call_chain (&xenstore_chain,0 ,NULL ); +#endif }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Isn't there already enough compat shim in unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h for this stuff?
xenbus_probe.c already has the required #include, what is the error you saw?
Ian.
Quoted 22 lines · Ky Srinivasan
This patch fixes compilation issues on 2.6.16 kernels.
Signed-off-by K. Y. Srinivasan <[email protected]>---
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c2007-05-14
13:45:04.000000000 -0400
+++linux-2.6-xen-sparse-new/drivers/xen/xenbus/xenbus_probe.c2007-05-15 10:55:31.000000000 -0400drivers/xen/xenbus/xenbus_probe.c +4
-1@@ -67,8 +67,11 @@static unsigned long xen_store_mfn;extern struct mutex xenwatch_mutex; - +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +static struct notifier_block *xenstore_chain; +#else static ATOMIC_NOTIFIER_HEAD (xenstore_chain); +#endif
Ian,
Ignore my earlier email. The sles10 sp1 code is based on older code and does not have the stuff you have in compat shim. I ran into this problem when trying to build a PV driver targeted against RHEL5 and ran into this problem.
Regards,
K. Y
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Tue, May 15, 2007 at 1:11 PM, in message
<[email protected]>, Ian Campbell
Quoted 32 lines · <[email protected]> wrote:
Isn't there already enough compat shim in unmodified_drivers/linux- 2.6/compat-
include/xen/platform-compat.hfor this stuff?
xenbus_probe.calready has the required #include, what is the error you saw?Ian.
Quoted 22 lines · Ky Srinivasan
This patch fixes compilation issues on 2.6.16 kernels.
Signed- off- by: K. Y. Srinivasan <[email protected]>
---
linux- 2.6- xen-sparse/drivers/xen/xenbus/xenbus_probe.c2007- 05- 14
13:45:04.000000000 - 0400
+++
linux- 2.6- xen- sparse-new/drivers/xen/xenbus/xenbus_probe.c2007- 05- 15 10:55:31.000000000 - 0400
@@ - 67,8 +67,11 @@
static unsigned longxen_store_mfn;extern struct mutex
xenwatch_mutex;drivers/xen/xenbus/xenbus_probe.c +4
-1- +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,17 ) +static struct notifier_block *xenstore_chain; +#else static ATOMIC_NOTIFIER_HEAD (xenstore_chain); +#endif
This should be addressed by macro magic in compat-include/xen/platform-compat.h. I wonder why your build of the PV drivers is not picking this up?
Or is your problem in building drivers for the SLES10 PV kernel? In that case I'm afraid you'll have to maintain the patch out of tree.
-- Keir
Quoted 9 lines · Ky Srinivasan
This patch fixes compilation issues on 2.6.16 kernels.
Signed-off-by K. Y. Srinivasan <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
This issue was already resolved - sorry for the confusion. The patch was required for sles10 sp1 which is based off of an older xen code base.
Regards,
K. Y
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Thu, May 24, 2007 at 10:15 AM, in message
Quoted 20 lines · Keir Fraser
This should be addressed by macro magic in
compat-include/xen/platform-compat.h. I wonder why your build of the PV drivers is not picking this up?Or is your problem in building drivers for the SLES10 PV kernel? In that case I'm afraid you'll have to maintain the patch out of tree.
-- Keir
Quoted 9 lines · Ky Srinivasan
This patch fixes compilation issues on 2.6.16 kernels.
Signed- off- by: K. Y. Srinivasan <[email protected]>
_______________________________________________
Xen- devel mailing list
Xen- [email protected]
http://lists.xensource.com/xen- devel