Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755886AbcCQHQA (ORCPT ); Thu, 17 Mar 2016 03:16:00 -0400 Received: from atl4mhfb03.myregisteredsite.com ([209.17.115.61]:47196 "EHLO atl4mhfb03.myregisteredsite.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbcCQHPv (ORCPT ); Thu, 17 Mar 2016 03:15:51 -0400 X-TCPREMOTEIP: 88.159.208.100 X-Authenticated-UID: mike@milosoftware.com From: Mike Looijmans To: srinivas.kandagatla@gmail.com, linux-arm-kernel@lists.infradead.org Cc: patrice.chotard@st.com, daniel.lezcano@linaro.org, tglx@linutronix.de, kernel@stlinux.com, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, soren.brinkmann@xilinx.com, wouter.van.gulik@mep-telecom.com, Mike Looijmans Subject: [PATCH] clocksource/arm_global_timer.c: Reduce the rating from 300 to 150 Date: Thu, 17 Mar 2016 08:15:33 +0100 Message-Id: <1458198933-3397-1-git-send-email-mike.looijmans@topic.nl> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 34 The arm_global_timer clock runs on the CPU clock, and does not correct for cpufreq scaling. This makes the clock not very suitable as a clocksource, and basically any clock running on an independent oscilator is preferable. Few clocksources have a rating over 300, so this clock usually gets selected as clock source. On the Zynq-7000 for example, the TTC clock on the chip is preferred to the global timer, because the TTC can at least compensate for cpufreq scaling. That makes the TTC (which rates itself 200) a much better clock source than the ARM global timer. Reduce the rating to 150 to make systems select the ARM global timer as a last resort instead of a first choice. Signed-off-by: Mike Looijmans --- drivers/clocksource/arm_global_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index 9df0d16..bb410eb 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c @@ -209,7 +209,7 @@ static void gt_resume(struct clocksource *cs) static struct clocksource gt_clocksource = { .name = "arm_global_timer", - .rating = 300, + .rating = 150, .read = gt_clocksource_read, .mask = CLOCKSOURCE_MASK(64), .flags = CLOCK_SOURCE_IS_CONTINUOUS, -- 1.9.1