Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757668AbcK2OgB (ORCPT ); Tue, 29 Nov 2016 09:36:01 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:51336 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756665AbcK2Ofn (ORCPT ); Tue, 29 Nov 2016 09:35:43 -0500 Date: Tue, 29 Nov 2016 15:32:28 +0100 (CET) From: Thomas Gleixner To: Marc Zyngier cc: Alexander Kochetkov , LKML , LAK , kernel@stlinux.com, Daniel Lezcano , Patrice Chotard , Mark Rutland Subject: Re: [PATCH] clocksource/arm_global_timer: reconfigure clockevents after cpufreq change In-Reply-To: <763a77c2-3d19-8d20-88df-27f0b8b80b8b@arm.com> Message-ID: References: <1480421716-30782-1-git-send-email-al.kochet@gmail.com> <1480421716-30782-2-git-send-email-al.kochet@gmail.com> <763a77c2-3d19-8d20-88df-27f0b8b80b8b@arm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 33 On Tue, 29 Nov 2016, Marc Zyngier wrote: > On 29/11/16 13:42, Thomas Gleixner wrote: > > Assumptions w/o real impact are a perfect reason not to apply that > > patch. This want's a proper proof that the global timer really changes and > > this hackery is required, which I seriously doubt. > > Well, let's not underestimate the "creativity" [1] of A5/A9 when it > comes to the timer clocks, and it is a very sad fact that both the > global timer and the local timers are clocked by PERIPHCLK, which is > ticking at a fixed ratio N (N >= 2) of the main CPU clock (CLK): > > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0407f/CIHGECHJ.html > > I'm not sure how feasible it is to change this ratio (the TRM seems to > be very silent on the subject). The CRU documentation of the RK3188 suggests that you can adjust it as it has a seperate divider, but who knows. > So short of being able to reconfigure it on the fly, this will probably > need some surgery similar to what we already do for the TWD (which this > patch mimics). > > Thankfully, we don't see that anymore on moderately recent HW (anything > since A15) and the advent of the arch timer, which is guaranteed to have > a fixed frequency. Can we just disable that global timer on affected SoCs and use something else instead? Thanks, tglx