From: Avi Kivity <[email protected]>

Signed-off-by: Avi Kivity <[email protected]>

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index 1e511dc..53d03ea 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -840,3 +840,30 @@ static inline struct file *eventfd_fget(int fd)
 #define kvm_srcu_batches_completed srcu_batches_completed
 
 #endif
+
+/* tracepoints changed in 2.6.30 */
+
+#include <linux/tracepoint.h>
+
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,29)
+
+#define TP_PROTO(args...)      args
+#define TP_ARGS(args...)       args
+#define PARAMS(args...) args
+#define __TRACE_EVENT(name, proto, args)                               \
+       static inline void _do_trace_##name(struct tracepoint *tp, proto) \
+       { }                                                             \
+       static inline void trace_##name(proto)                          \
+       { }                                                             \
+       static inline int register_trace_##name(void (*probe)(proto))   \
+       {                                                               \
+               return -ENOSYS;                                         \
+       }                                                               \
+       static inline int unregister_trace_##name(void (*probe)(proto)) \
+       {                                                               \
+               return -ENOSYS;                                         \
+       }
+#define TRACE_EVENT(name, proto, args, struct, assign, print)          \
+       __TRACE_EVENT(name, PARAMS(proto), PARAMS(args))
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to