linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: mingo@kernel.org, tglx@linutronix.de
Cc: maxime.ripard@free-electrons.com, richard@nod.at,
	linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] clocksource: sun5i: Fix cpufreq interaction with sched_clock
Date: Thu, 26 Mar 2015 10:27:09 +0100	[thread overview]
Message-ID: <1427362029-6511-4-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1427362029-6511-1-git-send-email-daniel.lezcano@linaro.org>

From: Maxime Ripard <maxime.ripard@free-electrons.com>

The sched_clock we use on some system is this timer, and since we
started using cpufreq, the cpu clock (that is one of the timer's clock
indirect parent) now changes, along with the actual sched_clock rate.
We can safely remove the sched_clock on those systems, since we have
other reliable sched_clock in the system.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/clocksource/timer-sun5i.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index 5dcbf90..58597fb 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -17,7 +17,6 @@
 #include <linux/irq.h>
 #include <linux/irqreturn.h>
 #include <linux/reset.h>
-#include <linux/sched_clock.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -137,11 +136,6 @@ static struct irqaction sun5i_timer_irq = {
 	.dev_id = &sun5i_clockevent,
 };
 
-static u64 sun5i_timer_sched_read(void)
-{
-	return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
-}
-
 static void __init sun5i_timer_init(struct device_node *node)
 {
 	struct reset_control *rstc;
@@ -172,7 +166,6 @@ static void __init sun5i_timer_init(struct device_node *node)
 	writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
 	       timer_base + TIMER_CTL_REG(1));
 
-	sched_clock_register(sun5i_timer_sched_read, 32, rate);
 	clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
 			      rate, 340, 32, clocksource_mmio_readl_down);
 
-- 
1.9.1


  parent reply	other threads:[~2015-03-26  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5513D019.3050503@free.fr>
2015-03-26  9:27 ` [PATCH 1/4] clocksource: sh_cmt: Fix !HAS_IOMEM build Daniel Lezcano
2015-03-26  9:27   ` [PATCH 2/4] clocksource: sh_mtu2: " Daniel Lezcano
2015-03-26  9:27   ` [PATCH 3/4] clocksource: sh_tmu: " Daniel Lezcano
2015-03-26  9:27   ` Daniel Lezcano [this message]
2015-03-26 13:46     ` [tip:timers/urgent] clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock() tip-bot for Maxime Ripard
2015-03-26 13:46   ` [tip:timers/urgent] clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors tip-bot for Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427362029-6511-4-git-send-email-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mingo@kernel.org \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).