Skip to content

Commit 33d8c15

Browse files
romain-izard-prodlezcano
authored andcommitted
Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock"
This reverts commit 7b9f1d1 ("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>
1 parent fa3aa7a commit 33d8c15

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

drivers/clocksource/tcb_clksrc.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/io.h>
1111
#include <linux/platform_device.h>
1212
#include <linux/atmel_tc.h>
13-
#include <linux/sched_clock.h>
1413

1514

1615
/*
@@ -57,14 +56,9 @@ static u64 tc_get_cycles(struct clocksource *cs)
5756
return (upper << 16) | lower;
5857
}
5958

60-
static u32 tc_get_cv32(void)
61-
{
62-
return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
63-
}
64-
6559
static u64 tc_get_cycles32(struct clocksource *cs)
6660
{
67-
return tc_get_cv32();
61+
return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
6862
}
6963

7064
static struct clocksource clksrc = {
@@ -75,11 +69,6 @@ static struct clocksource clksrc = {
7569
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
7670
};
7771

78-
static u64 notrace tc_read_sched_clock(void)
79-
{
80-
return tc_get_cv32();
81-
}
82-
8372
#ifdef CONFIG_GENERIC_CLOCKEVENTS
8473

8574
struct tc_clkevt_device {
@@ -350,9 +339,6 @@ static int __init tcb_clksrc_init(void)
350339
clksrc.read = tc_get_cycles32;
351340
/* setup ony channel 0 */
352341
tcb_setup_single_chan(tc, best_divisor_idx);
353-
354-
/* register sched_clock on chips with single 32 bit counter */
355-
sched_clock_register(tc_read_sched_clock, 32, divided_rate);
356342
} else {
357343
/* tclib will give us three clocks no matter what the
358344
* underlying platform supports.

0 commit comments

Comments
 (0)