kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: compat: define marker_synchronize_unregister on older kernels
@ 2009-01-06 19:50 Eduardo Habkost
  2009-01-07  9:58 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Habkost @ 2009-01-06 19:50 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, Eduardo Habkost

marker_synchronize_unregister() is available only on 2.6.28. However,
its definition is very simple, so we can define it if it is missing.

This fixes compilation of kvm_trace.c against older kernels.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 kernel/external-module-compat-comm.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index f2343f6..5cb70b0 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -699,3 +699,8 @@ static inline void cpumask_clear_cpu(int cpu, cpumask_var_t mask)
 
 #endif
 
+
+/* Macro introduced only on newer kernels: */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+#define marker_synchronize_unregister() synchronize_sched()
+#endif
-- 
1.5.6.rc3.11.g5f54d


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: compat: define marker_synchronize_unregister on older kernels
  2009-01-06 19:50 [PATCH] kvm: compat: define marker_synchronize_unregister on older kernels Eduardo Habkost
@ 2009-01-07  9:58 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-01-07  9:58 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: kvm

Eduardo Habkost wrote:
> marker_synchronize_unregister() is available only on 2.6.28. However,
> its definition is very simple, so we can define it if it is missing.
>
> This fixes compilation of kvm_trace.c against older kernels.
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-07  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-06 19:50 [PATCH] kvm: compat: define marker_synchronize_unregister on older kernels Eduardo Habkost
2009-01-07  9:58 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).