public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] clocksource: Fix for 4.11
@ 2017-03-16 16:42 Daniel Lezcano
  2017-03-16 16:44 ` [PATCH] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2017-03-16 16:42 UTC (permalink / raw)
  To: tglx, mingo; +Cc: linux-kernel


Hi Thomas, Ingo,

this pull request provides one fix for 4.11:

 - Revert the tcb as sched_clock. The initialization routine for the tcb clock
   is too late and leads to a warning. In order to use the tcb as a sched_clock
   the init sequence must be fixed before. Revert the patch until this is done
   (Romain Izard)

The following changes since commit fa3aa7a54fe6d3abf128f13cd4bbd40eaa48fed2:

  jiffies: Revert bogus conversion of NSEC_PER_SEC to TICK_NSEC (2017-03-07 11:03:28 +0100)

are available in the git repository at:

  https://git.linaro.org/people/daniel.lezcano/linux.git clockevents/4.11-fixes

for you to fetch changes up to 33d8c15559df4f0bce25d7e16ebb5879e249f2e7:

  Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" (2017-03-11 22:03:34 +0100)

----------------------------------------------------------------
Romain Izard (1):
      Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

 drivers/clocksource/tcb_clksrc.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)


-- 

 <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

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

* [PATCH] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"
  2017-03-16 16:42 [GIT PULL] clocksource: Fix for 4.11 Daniel Lezcano
@ 2017-03-16 16:44 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2017-03-16 16:44 UTC (permalink / raw)
  To: tglx, mingo
  Cc: linux-kernel, Romain Izard, Nicolas Ferre,
	moderated list:ATMEL Timer Counter (TC) AND CLOCKSOURCE DRIVERS

From: Romain Izard <romain.izard.pro@gmail.com>

This reverts commit 7b9f1d16e6d1 ("clocksource/drivers/tcb_clksrc: Use
32 bit tcb as sched_clock"). In the current state, the kernel warns
against a late registration of the new sched_clock, the printk clock
resets after only a few minutes, and it seems that scheduling can be
affected as well.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/tcb_clksrc.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 745844e..d4ca996 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -10,7 +10,6 @@
 #include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/atmel_tc.h>
-#include <linux/sched_clock.h>
 
 
 /*
@@ -57,14 +56,9 @@ static u64 tc_get_cycles(struct clocksource *cs)
 	return (upper << 16) | lower;
 }
 
-static u32 tc_get_cv32(void)
-{
-	return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
-}
-
 static u64 tc_get_cycles32(struct clocksource *cs)
 {
-	return tc_get_cv32();
+	return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
 }
 
 static struct clocksource clksrc = {
@@ -75,11 +69,6 @@ static struct clocksource clksrc = {
 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-static u64 notrace tc_read_sched_clock(void)
-{
-	return tc_get_cv32();
-}
-
 #ifdef CONFIG_GENERIC_CLOCKEVENTS
 
 struct tc_clkevt_device {
@@ -350,9 +339,6 @@ static int __init tcb_clksrc_init(void)
 		clksrc.read = tc_get_cycles32;
 		/* setup ony channel 0 */
 		tcb_setup_single_chan(tc, best_divisor_idx);
-
-		/* register sched_clock on chips with single 32 bit counter */
-		sched_clock_register(tc_read_sched_clock, 32, divided_rate);
 	} else {
 		/* tclib will give us three clocks no matter what the
 		 * underlying platform supports.
-- 
2.7.4

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

end of thread, other threads:[~2017-03-16 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 16:42 [GIT PULL] clocksource: Fix for 4.11 Daniel Lezcano
2017-03-16 16:44 ` [PATCH] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" Daniel Lezcano

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