From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbbJEMUA (ORCPT ); Mon, 5 Oct 2015 08:20:00 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:60894 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbbJEMT5 (ORCPT ); Mon, 5 Oct 2015 08:19:57 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Tony Lindgren , Alexandre Courbot , Stephen Warren , Daniel Lezcano , Linux Kernel Mailing List , balbi@ti.com, Thierry Reding , linux-tegra@vger.kernel.org, tglx@linutronix.de, Linux OMAP Mailing List Subject: Re: [RFC/PATCH 00/11] arm: omap: counter32k rework Date: Mon, 05 Oct 2015 14:19:35 +0200 Message-ID: <5000312.QFy0tdfCNA@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151005111341.GY23801@atomide.com> References: <1443559446-26969-1-git-send-email-balbi@ti.com> <9068678.D8T0aRhgnK@wuerfel> <20151005111341.GY23801@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:EGuT4jh7kRYtI2VH7XB6ZLl+5eYlTCjMbTGMsQr+noc71JXYn5H gcqGWfUgrb5yp5YowMuTNtILQi+6N8mwXFWqZCwSp0Lmti9SAZbPPs35Dzt/YyL8s3aOS1o IcL34FQTeaN2Uf25WqhCiTozDk1iclnOBL52fwnf1ExmG8ZffGe6658fyfAMsSm0lS2DuWq iV7MJaH7CIBsoQMUthuhQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Fhn3VIxV1pM=:5Vc6oa19AvBArQSi9cCpD8 O9Q5xJ50jfhXdGqjZsQM4Xq3+fVml/AalxiHxulqxMr5XYxzTMAciXTCxLFgX9rIErWlRshrp JXWHsZIoCuSStSG57z1rQM8+VKZS8jDzsPofzHJgU/zlkPTnOs7YrcOcWgadMKPKXlSfXCM/Y rvidCrnwmkcD26mds94pB5XFUAav6V5DwbuZg50FReQMiuAHOEgtV1x73h6R3o1FIVP944S/L OQ3YFvVda4PDZ2Nfe3koLytqz/miVswMlPDHVmS87Pl5mjRfAHC4FeC0KsvgLbK90RKexsHEs kwIhbA1RSBOJFIMOuV687SWRmE8EwBH7/M21gT73tT6Mxa44AVXqNNQE9r/OBs+dNfHPVHLcz UhjRPoJ4CFVMdPSu3UmCLcnHWpuoU4b39S6LQyinFw8jpXxjaBdDBzNoe0e3N4jPwbarnrOq7 wYE0OXrcW7dmtVDUPQjzilwlu/+eXONDIIA4EjO/TlNyq9X7GiBczzA+gNbil9Yqo6Q9Y4wtp qkNvRUNDq0R7lf3qgFzRgKjU7zrm/esjn4BOr/hkPb7s/r2Eqi7Ng993cRrpD29Ulh1BcunPv QHRRYaDOCYdOHqEB2/Kp/cLpHspyuP7S422k4pwv8OEV1Hmde8cCY0lqMd6vck0Avxy8bpdP9 z1dy5Rex/JzXYThljazB2Ocgm9RPC6aXdMlt/8e8dIwy0nguonLd5Fof9QBl8w1XxM5tH6Sf8 CFJ7VCgsNUGHR71Q Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 05 October 2015 04:13:41 Tony Lindgren wrote: > * Arnd Bergmann [151005 04:08]: > > On Monday 05 October 2015 03:55:55 Tony Lindgren wrote: > > > * Daniel Lezcano [151001 15:16]: > > > > On 09/30/2015 04:49 PM, Arnd Bergmann wrote: > > > > >On Wednesday 30 September 2015 16:42:21 Arnd Bergmann wrote: > > > > >> > > > > >>TEGRA folks: the tegra_read_persistent_clock() implementation apparently > > > > >>predates the Tegra RTC driver and I wonder if they actually do the > > > > >>right thing in combination. Could it be that the wall time forwards > > > > >>twice as fast as it should during resume when the RTC driver is loaded? > > > > >>Could it be that we can simply remove tegra_read_persistent_clock() > > > > >>and the register_persistent_clock() infrastructure? > > > > >> > > > > > > > > > >I found the 'sleeptime_injected' variable now, which takes care of > > > > >forwarding the clock by the correct amount. > > > > > > > > > >I also found the CLOCK_SOURCE_SUSPEND_NONSTOP flag next to it, which > > > > >should let us use the counter32k driver to provide the correct > > > > >time during suspend without the omap_read_persistent_clock() function. > > > > >We should be able to just delete that code. > > > > > > > > > >If we decide to also delete the tegra_read_persistent_clock() > > > > >function, we can remove the registration too. > > > > > > > > > > > > +1 > > > > > > We could maybe have read_persistent_clock() just check for the > > > CLOCK_SOURCE_SUSPEND_NONSTOP flag? > > > > timekeeping_resume() already ignores the persistent clock values if > > the clocksource has this set. Do you mean we should additionally > > not call the read_persistent_clock() function at all to safe a > > few cycles reading that value? > > Hmm no I mean if we have CLOCK_SOURCE_SUSPEND_NONSTOP we can > automatically make read_persistent_clock() use that if nothing > else got registered. Ok, so we don't need to change anything here then. > > How expensive is the function? > > Usually the persistent clock is on some interconnect, so it is > way slower compared to a local timer. It doubt it makes a > difference in timekeeping_resume() though Right. Arnd