time: Define dummy functions for the generic sched clock
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 29 Oct 2015 17:33:47 +0000 (18:33 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 15 Dec 2015 08:41:09 +0000 (09:41 +0100)
When we try to compile a clocksource driver with the COMPILE_TEST option,
we can't select the GENERIC_SCHED_CLOCK because the sched_clock() symbol
will be duplicated with the one defined for the x86.

In order to fix that, we don't select the GENERIC_SCHED_CLOCK in the
driver Kconfig's file but we define some empty functions for the different
symbols in order to prevent the unresolved ones.

This patch fixes the COMPILE_TEST option for the compile test coverage for
the clocksource drivers. Without this patch, we can't add the COMPILE_TEST
option for the clocksource drivers using the GENERIC_SCHED_CLOCK.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
include/linux/sched_clock.h

index efa931c5cef145e354fd290cf0794bccb7446247..411b52e424e1b2178b961bbec2081c3a0e58affd 100644 (file)
 
 #ifdef CONFIG_GENERIC_SCHED_CLOCK
 extern void sched_clock_postinit(void);
-#else
-static inline void sched_clock_postinit(void) { }
-#endif
 
 extern void sched_clock_register(u64 (*read)(void), int bits,
                                 unsigned long rate);
+#else
+static inline void sched_clock_postinit(void) { }
+
+static inline void sched_clock_register(u64 (*read)(void), int bits,
+                                       unsigned long rate)
+{
+       ;
+}
+#endif
 
 #endif
This page took 0.026473 seconds and 5 git commands to generate.