public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule
@ 2015-11-02  7:44 Amit Kucheria
  2015-11-02  8:03 ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Amit Kucheria @ 2015-11-02  7:44 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Thomas Gleixner, John Stultz, LKML, Russell King,
	moderated list:ARM PORT

On Fri, Oct 30, 2015 at 4:22 AM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> Instead of having the clocksource's Kconfig depending on the arch, let the
> arch to select the timer it needs.

Is this the prescribed way to do things nowadays? It leads to more
options showing up in 'make menuconfig'. Why do I need to see
CLKSRC_PXA if I'm not even compiling for ARCH_PXA (and not interesting
in COMPILE_TEST)?

> The CLKSRC_OF dependency is removed because already selected by the ARCH_PXA,
> and it is added for SA1100.

This bit makes sense.

> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm/Kconfig            | 3 +++
>  drivers/clocksource/Kconfig | 3 +--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 72ad724..aa32286 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -609,6 +609,7 @@ config ARCH_PXA
>         select AUTO_ZRELADDR
>         select COMMON_CLK
>         select CLKDEV_LOOKUP
> +       select CLKSRC_PXA
>         select CLKSRC_MMIO
>         select CLKSRC_OF
>         select GENERIC_CLOCKEVENTS
> @@ -669,6 +670,8 @@ config ARCH_SA1100
>         select ARCH_SPARSEMEM_ENABLE
>         select CLKDEV_LOOKUP
>         select CLKSRC_MMIO
> +       select CLKSRC_PXA
> +       select CLKSRC_OF if OF
>         select CPU_FREQ
>         select CPU_SA1100
>         select GENERIC_CLOCKEVENTS
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 5cd000c..425abbd 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -289,8 +289,7 @@ config CLKSRC_TANGO_XTAL
>         select CLKSRC_OF
>
>  config CLKSRC_PXA
> -       def_bool y if ARCH_PXA || ARCH_SA1100
> -       select CLKSRC_OF if OF
> +       bool

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 1/7] time: Define dummy functions for the generic sched clock
@ 2015-10-29 22:52 Daniel Lezcano
  2015-10-29 22:52 ` [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2015-10-29 22:52 UTC (permalink / raw)
  To: tglx; +Cc: john.stultz, linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-02 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02  7:44 [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Amit Kucheria
2015-11-02  8:03 ` Daniel Lezcano
2015-11-02 10:10   ` Amit Kucheria
  -- strict thread matches above, loose matches on Subject: below --
2015-10-29 22:52 [PATCH 1/7] time: Define dummy functions for the generic sched clock Daniel Lezcano
2015-10-29 22:52 ` [PATCH 5/7] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox