* [PATCH] PV driver compatibility patch
@ 2007-05-15 17:05 Ky Srinivasan
2007-05-15 17:11 ` Ian Campbell
2007-05-24 14:15 ` Keir Fraser
0 siblings, 2 replies; 5+ messages in thread
From: Ky Srinivasan @ 2007-05-15 17:05 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 121 bytes --]
This patch fixes compilation issues on 2.6.16 kernels.
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
[-- Attachment #2: xenbus_compat.patch --]
[-- Type: text/plain, Size: 1439 bytes --]
--- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c 2007-05-14 13:45:04.000000000 -0400
+++ linux-2.6-xen-sparse-new/drivers/xen/xenbus/xenbus_probe.c 2007-05-15 10:55:31.000000000 -0400
@@ -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
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PV driver compatibility patch
2007-05-15 17:05 [PATCH] PV driver compatibility patch Ky Srinivasan
@ 2007-05-15 17:11 ` Ian Campbell
2007-05-15 17:26 ` Ky Srinivasan
2007-05-24 14:15 ` Keir Fraser
1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2007-05-15 17:11 UTC (permalink / raw)
To: Ky Srinivasan; +Cc: 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.
On Tue, 2007-05-15 at 11:05 -0600, Ky Srinivasan wrote:
> This patch fixes compilation issues on 2.6.16 kernels.
>
> Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
>
> ---
> linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c 2007-05-14
> 13:45:04.000000000 -0400
> +++
> linux-2.6-xen-sparse-new/drivers/xen/xenbus/xenbus_probe.c 2007-05-15
> 10:55:31.000000000 -0400
> @@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PV driver compatibility patch
2007-05-15 17:11 ` Ian Campbell
@ 2007-05-15 17:26 ` Ky Srinivasan
0 siblings, 0 replies; 5+ messages in thread
From: Ky Srinivasan @ 2007-05-15 17:26 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
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
>>> On Tue, May 15, 2007 at 1:11 PM, in message
<1179249116.26437.39.camel@localhost.localdomain>, Ian Campbell
<Ian.Campbell@XenSource.com> wrote:
> 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.
>
> On Tue, 2007- 05- 15 at 11:05 - 0600, Ky Srinivasan wrote:
>> This patch fixes compilation issues on 2.6.16 kernels.
>>
>> Signed- off- by: K. Y. Srinivasan <ksrinivasan@novell.com>
>>
>
>
>> ---
>> linux- 2.6- xen- sparse/drivers/xen/xenbus/xenbus_probe.c 2007- 05- 14
>> 13:45:04.000000000 - 0400
>> +++
>> linux- 2.6- xen- sparse- new/drivers/xen/xenbus/xenbus_probe.c 2007- 05- 15
>> 10:55:31.000000000 - 0400
>> @@ - 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PV driver compatibility patch
2007-05-15 17:05 [PATCH] PV driver compatibility patch Ky Srinivasan
2007-05-15 17:11 ` Ian Campbell
@ 2007-05-24 14:15 ` Keir Fraser
2007-05-24 14:35 ` Ky Srinivasan
1 sibling, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2007-05-24 14:15 UTC (permalink / raw)
To: Ky Srinivasan, xen-devel
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
On 15/5/07 18:05, "Ky Srinivasan" <ksrinivasan@novell.com> wrote:
> This patch fixes compilation issues on 2.6.16 kernels.
>
> Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PV driver compatibility patch
2007-05-24 14:15 ` Keir Fraser
@ 2007-05-24 14:35 ` Ky Srinivasan
0 siblings, 0 replies; 5+ messages in thread
From: Ky Srinivasan @ 2007-05-24 14:35 UTC (permalink / raw)
To: xen-devel, Keir Fraser
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
>>> On Thu, May 24, 2007 at 10:15 AM, in message
<C27B5CAE.F749%keir@xensource.com>, Keir Fraser <keir@xensource.com> wrote:
> 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
>
> On 15/5/07 18:05, "Ky Srinivasan" <ksrinivasan@novell.com> wrote:
>
>> This patch fixes compilation issues on 2.6.16 kernels.
>>
>> Signed- off- by: K. Y. Srinivasan <ksrinivasan@novell.com>
>>
>>
>> _______________________________________________
>> Xen- devel mailing list
>> Xen- devel@lists.xensource.com
>> http://lists.xensource.com/xen- devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-24 14:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 17:05 [PATCH] PV driver compatibility patch Ky Srinivasan
2007-05-15 17:11 ` Ian Campbell
2007-05-15 17:26 ` Ky Srinivasan
2007-05-24 14:15 ` Keir Fraser
2007-05-24 14:35 ` Ky Srinivasan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.