All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage
@ 2012-01-02 13:23 Linus Walleij
  2012-01-02 16:00 ` Daniel Lezcano
  2012-01-03 10:02 ` Marc Zyngier
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2012-01-02 13:23 UTC (permalink / raw)
  To: linux-arm-kernel

commit 2f0778afac79bd8d226225556858a636931eeabc adding
runtime-selectable sched_clock() forgot to patch this
driver down in drivers/clocksource, this patch fixes
the problem.

Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
---
 drivers/clocksource/clksrc-dbx500-prcmu.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c
index 59feefe..fb6b6d2 100644
--- a/drivers/clocksource/clksrc-dbx500-prcmu.c
+++ b/drivers/clocksource/clksrc-dbx500-prcmu.c
@@ -58,25 +58,15 @@ static struct clocksource clocksource_dbx500_prcmu = {
 };
 
 #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK
-static DEFINE_CLOCK_DATA(cd);
 
-unsigned long long notrace sched_clock(void)
+static u32 notrace dbx500_prcmu_sched_clock_read(void)
 {
-	u32 cyc;
-
 	if (unlikely(!clksrc_dbx500_timer_base))
 		return 0;
 
-	cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu);
-
-	return cyc_to_sched_clock(&cd, cyc, (u32)~0);
+	return clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu);
 }
 
-static void notrace clksrc_dbx500_prcmu_update_sched_clock(void)
-{
-	u32 cyc = clksrc_dbx500_prcmu_read(&clocksource_dbx500_prcmu);
-	update_sched_clock(&cd, cyc, (u32)~0);
-}
 #endif
 
 void __init clksrc_dbx500_prcmu_init(void __iomem *base)
@@ -97,7 +87,7 @@ void __init clksrc_dbx500_prcmu_init(void __iomem *base)
 		       clksrc_dbx500_timer_base + PRCMU_TIMER_REF);
 	}
 #ifdef CONFIG_CLKSRC_DBX500_PRCMU_SCHED_CLOCK
-	init_sched_clock(&cd, clksrc_dbx500_prcmu_update_sched_clock,
+	setup_sched_clock(dbx500_prcmu_sched_clock_read,
 			 32, RATE_32K);
 #endif
 	clocksource_calc_mult_shift(&clocksource_dbx500_prcmu,
-- 
1.7.8

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

* [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage
  2012-01-02 13:23 [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage Linus Walleij
@ 2012-01-02 16:00 ` Daniel Lezcano
  2012-01-03 10:02 ` Marc Zyngier
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2012-01-02 16:00 UTC (permalink / raw)
  To: linux-arm-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/02/2012 02:23 PM, Linus Walleij wrote:
> commit 2f0778afac79bd8d226225556858a636931eeabc adding
> runtime-selectable sched_clock() forgot to patch this
> driver down in drivers/clocksource, this patch fixes
> the problem.
> 
> Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
> ---

Compiled and booted the board successfully.

Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org>

- -- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPAdSmAAoJEAKBbMCpUGYAKAAIAMwJ3MKCS2mCM07mI27Cgchu
p0342JLh/xiCXeuCGYr8Z1WNGGRsj6GWcLPUs8Uhd8m75o6Hl8s2E+ZC3ki45Uum
C5uateI4MAh/gUi68aB8wdpzXQm+vr5SAy4pLaVmNUdS+X9XC8p23E3tmfoO9cWI
Ygk4g1Czzx7HQIANiHNeK0Da2juI6Hv7j5JJ2fm0kw25HEMvg0mQlKoF0U7CiYGe
KBjoUvR5RG+NcfNplGR+VYjv4xsmDfUo/7AjlPfwJ5n0RPVEJ9R5TAyOtBK/3RA7
6hUJ+KizevpWh8TxbS8Qz9jdkRXaji+5fy/L53+rxc8hKgfK1DNaMs2mt2eK6Qg=
=3GNF
-----END PGP SIGNATURE-----

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

* [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage
  2012-01-02 13:23 [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage Linus Walleij
  2012-01-02 16:00 ` Daniel Lezcano
@ 2012-01-03 10:02 ` Marc Zyngier
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2012-01-03 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/01/12 13:23, Linus Walleij wrote:
> commit 2f0778afac79bd8d226225556858a636931eeabc adding
> runtime-selectable sched_clock() forgot to patch this
> driver down in drivers/clocksource, this patch fixes
> the problem.
> 
> Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

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

end of thread, other threads:[~2012-01-03 10:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-02 13:23 [PATCH] clocksource/ux500-prcmu: fix sched_clock breakage Linus Walleij
2012-01-02 16:00 ` Daniel Lezcano
2012-01-03 10:02 ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.