Fix: 4.1-rc1 Linux build and regmap instrumentation
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 20:44:11 +0000 (16:44 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 20:44:57 +0000 (16:44 -0400)
regmap header has been privatized.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Makefile
probes/lttng-probe-regmap.c

index 4d38199e37c1208ac79b23addd49fce2c54755a1..b2dd3af4378383b27ddbd9bd6f1d9a4c9f98f44b 100644 (file)
@@ -192,10 +192,15 @@ obj-m +=  $(shell \
                echo "lttng-probe-rcu.o" ; fi;)
 
 ifneq ($(CONFIG_REGMAP),)
+regmap_dep = $(srctree)/drivers/base/regmap/trace.h $(srctree)/include/trace/events/regmap.h
+ifneq ($(wildcard $(regmap_dep)),)
 obj-m +=  $(shell \
        if [ $(VERSION) -ge 4 \
                -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \
                echo "lttng-probe-regmap.o" ; fi;)
+else
+$(warning Either of files { $(regmap_dep) } not found. Probe "regmap" is disabled. Use full kernel source tree to enable it.)
+endif
 endif
 
 ifneq ($(CONFIG_PM_RUNTIME),)
index 8850b55abe6629f70ab9023a547b8379e4331ad7..c51924a0f2c414db783864f3113af6dfd12c1a35 100644 (file)
 
 #include <linux/module.h>
 #include <linux/device.h>
+#include "../lttng-kernel-version.h"
 #include "../lttng-tracer.h"
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
  * trace event macros match the kernel we run on.
  */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#include <../../drivers/base/regmap/trace.h>
+
+#undef TRACE_INCLUDE_PATH
+#undef TRACE_INCLUDE_FILE
+
+#else  /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
 #include <trace/events/regmap.h>
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
 
 /*
  * Create LTTng tracepoint probes.
This page took 0.028993 seconds and 4 git commands to generate.