linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
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 <mike.looijmans@topic.nl>
Subject: [PATCH] clocksource/arm_global_timer.c: Reduce the rating from 300 to 150
Date: Thu, 17 Mar 2016 08:15:33 +0100	[thread overview]
Message-ID: <1458198933-3397-1-git-send-email-mike.looijmans@topic.nl> (raw)

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 <mike.looijmans@topic.nl>
---
 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

             reply	other threads:[~2016-03-17  7:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  7:15 Mike Looijmans [this message]
2016-03-17 17:06 ` [PATCH] clocksource/arm_global_timer.c: Reduce the rating from 300 to 150 Grygorii Strashko
2016-03-18  7:12   ` Mike Looijmans
2016-03-19 12:40     ` Afzal Mohammed

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=1458198933-3397-1-git-send-email-mike.looijmans@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=daniel.lezcano@linaro.org \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=patrice.chotard@st.com \
    --cc=soren.brinkmann@xilinx.com \
    --cc=srinivas.kandagatla@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=wouter.van.gulik@mep-telecom.com \
    /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).