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


Groups > linux.kernel > #1596208 > unrolled thread

[PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

Started byRomain Izard <romain.izard.pro@gmail.com>
First post2017-03-09 18:00 +0100
Last post2017-03-11 22:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" Romain Izard <romain.izard.pro@gmail.com> - 2017-03-09 18:00 +0100
    Re: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit  tcb as sched_clock" Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-03-11 22:40 +0100

#1596208 — [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

FromRomain Izard <romain.izard.pro@gmail.com>
Date2017-03-09 18:00 +0100
Subject[PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"
Message-ID<tj9zY-7Tv-7@gated-at.bofh.it>
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>
---
 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 745844ee973e..d4ca9962a759 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.9.3

[toc] | [next] | [standalone]


#1598491 — Re: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2017-03-11 22:40 +0100
SubjectRe: [PATCH v1] Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"
Message-ID<tjWU2-cq-21@gated-at.bofh.it>
In reply to#1596208
On Thu, Mar 09, 2017 at 05:58:38PM +0100, Romain Izard wrote:
> 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>
> ---

Applied, thanks.

  -- Daniel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web