Fix warning with 3.6.0 kernel
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 3 Oct 2012 13:11:00 +0000 (09:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 3 Oct 2012 13:11:00 +0000 (09:11 -0400)
No actual runtime impact, but neater anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/kvm.h

index e10455bc8cf8cd496d7d66e931450e52ed37b586..ffdc2a62b3b0ca644452d03ff7f5af23e5e827b0 100644 (file)
@@ -2,12 +2,25 @@
 #define _TRACE_KVM_MAIN_H
 
 #include <linux/tracepoint.h>
+#include <linux/version.h>
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm
 
 #define ERSN(x) { KVM_EXIT_##x, "KVM_EXIT_" #x }
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+
+#define kvm_trace_exit_reason                                          \
+       ERSN(UNKNOWN), ERSN(EXCEPTION), ERSN(IO), ERSN(HYPERCALL),      \
+       ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),      \
+       ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR),    \
+       ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
+       ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI), ERSN(PAPR_HCALL),   \
+       ERSN(S390_UCONTROL)
+
+#else
+
 #define kvm_trace_exit_reason                                          \
        ERSN(UNKNOWN), ERSN(EXCEPTION), ERSN(IO), ERSN(HYPERCALL),      \
        ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN),      \
@@ -15,6 +28,8 @@
        ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\
        ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI)
 
+#endif
+
 TRACE_EVENT(kvm_userspace_exit,
            TP_PROTO(__u32 reason, int errno),
            TP_ARGS(reason, errno),
This page took 0.026929 seconds and 4 git commands to generate.