From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752119AbbCZJ1t (ORCPT ); Thu, 26 Mar 2015 05:27:49 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:35434 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312AbbCZJ1S (ORCPT ); Thu, 26 Mar 2015 05:27:18 -0400 From: Daniel Lezcano 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 Message-Id: <1427362029-6511-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427362029-6511-1-git-send-email-daniel.lezcano@linaro.org> References: <5513D019.3050503@free.fr> <1427362029-6511-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard 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 Signed-off-by: Daniel Lezcano Tested-by: Hans de Goede --- 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 #include #include -#include #include #include #include @@ -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