From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757205AbcK2NpR (ORCPT ); Tue, 29 Nov 2016 08:45:17 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:51132 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755456AbcK2NpI (ORCPT ); Tue, 29 Nov 2016 08:45:08 -0500 Date: Tue, 29 Nov 2016 14:42:11 +0100 (CET) From: Thomas Gleixner To: Alexander Kochetkov cc: LKML , LAK , kernel@stlinux.com, Daniel Lezcano , Patrice Chotard , Marc Zyngier , Mark Rutland Subject: Re: [PATCH] clocksource/arm_global_timer: reconfigure clockevents after cpufreq change In-Reply-To: <1480421716-30782-2-git-send-email-al.kochet@gmail.com> Message-ID: References: <1480421716-30782-1-git-send-email-al.kochet@gmail.com> <1480421716-30782-2-git-send-email-al.kochet@gmail.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 On Tue, 29 Nov 2016, Alexander Kochetkov wrote: > After a cpufreq transition, update the clockevent's frequency > by fetching the new clock rate from the clock framework and > reprogram the next clock event. The frequency change would not only affect the clockevent device, it also would affect the clocksource. So the patch is incomplete, but see below. > The clock supplying the arm-global-timer on the rk3188 is coming > from the the cpu clock itself and thus changes its rate everytime > cpufreq adjusts the cpu frequency. That's broken and the clk framework should keep the CORE_PERI clock at a constant rate by reprogramming the divider of the CPU clock. > Found by code review, real impact not known. Assume what actual > HZ value will be different from expected on platforms using > arm-global-timer as clockevent. 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. Thanks, tglx