Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1259067

[PATCH 1/7] time: Define dummy functions for the generic sched clock

From Daniel Lezcano <daniel.lezcano@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 1/7] time: Define dummy functions for the generic sched clock
Date 2015-10-30 00:00 +0100
Message-ID <qp4kO-6fZ-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/linux/sched_clock.h b/include/linux/sched_clock.h
index efa931c..b2ec7bb 100644
--- a/include/linux/sched_clock.h
+++ b/include/linux/sched_clock.h
@@ -10,11 +10,17 @@
 
 #ifdef CONFIG_GENERIC_SCHED_CLOCK
 extern void sched_clock_postinit(void);
+
+extern void sched_clock_register(u64 (*read)(void), int bits,
+                                 unsigned long rate);
 #else
 static inline void sched_clock_postinit(void) { }
-#endif
 
-extern void sched_clock_register(u64 (*read)(void), int bits,
-				 unsigned long rate);
+static inline void sched_clock_register(u64 (*read)(void), int bits,
+					 unsigned long rate)
+{
+	;
+}
+#endif
 
 #endif
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
  [PATCH 6/7] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
  [PATCH 2/7] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
  [PATCH 7/7] clocksource/drivers/tango: Add COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
  [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
    Re: [PATCH 3/7] clocksource/drivers/st_lpc: Fix Kconfig dependency Maxime Coquelin <maxime.coquelin@st.com> - 2015-10-30 10:00 +0100
  [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100
  [PATCH 4/7] clocksource/drivers/st_lpc: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-30 00:00 +0100

csiph-web