From patchwork Thu Mar 17 07:15:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 8607511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2F0489F3D1 for ; Thu, 17 Mar 2016 07:18:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 604FB20279 for ; Thu, 17 Mar 2016 07:18:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CB1220268 for ; Thu, 17 Mar 2016 07:18:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1agSAF-0008SC-N3; Thu, 17 Mar 2016 07:16:11 +0000 Received: from atl4mhob22.registeredsite.com ([209.17.115.116]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1agSAC-0008MN-An for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2016 07:16:09 +0000 Received: from mailpod.hostingplatform.com ([10.30.71.204]) by atl4mhob22.registeredsite.com (8.14.4/8.14.4) with ESMTP id u2H7FiHL078011 for ; Thu, 17 Mar 2016 03:15:44 -0400 Received: (qmail 22463 invoked by uid 0); 17 Mar 2016 07:15:44 -0000 X-TCPREMOTEIP: 88.159.208.100 X-Authenticated-UID: mike@milosoftware.com Received: from unknown (HELO mikebuntu.TOPIC.LOCAL) (mike@milosoftware.com@88.159.208.100) by 0 with ESMTPA; 17 Mar 2016 07:15:44 -0000 From: Mike Looijmans To: srinivas.kandagatla@gmail.com, linux-arm-kernel@lists.infradead.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160317_001608_511677_25009985 X-CRM114-Status: UNSURE ( 7.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@stlinux.com, Mike Looijmans , daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, patrice.chotard@st.com, tglx@linutronix.de, wouter.van.gulik@mep-telecom.com, soren.brinkmann@xilinx.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,