From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751859AbbJELEi (ORCPT ); Mon, 5 Oct 2015 07:04:38 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57827 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbbJELEg (ORCPT ); Mon, 5 Oct 2015 07:04:36 -0400 From: Arnd Bergmann To: Tony Lindgren Cc: Daniel Lezcano , linux-arm-kernel@lists.infradead.org, balbi@ti.com, Alexandre Courbot , Stephen Warren , Linux Kernel Mailing List , 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 13:03:52 +0200 Message-ID: <9068678.D8T0aRhgnK@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151005105554.GV23801@atomide.com> References: <1443559446-26969-1-git-send-email-balbi@ti.com> <560DAFC5.50003@linaro.org> <20151005105554.GV23801@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:KAMa7dvlscgl9ouk5sf+1u3WoXpQ9UCwsjKjvEbPhab6+wfwwLM K/kk0x+snNH2jqBIqsFHTBzZAGUy1PAZBp9m2LkrbDvsFPFhASqtGjO/fxBFTGvNt1cDZMO xvGpe6d45FfbsxmkU1WtEfD5tnGVueKujDG35WXrvwpJtYMO9+diEYREFAANYgdvn7Mvl6+ 8orRjaE27a4xPCgyzAcYA== X-UI-Out-Filterresults: notjunk:1;V01:K0:BHyJ6losKwQ=:PGxSgSTDhB9nXARGHl6+6U W+qOctdofwcLQYjy5bYEn8gTAHtJDGXhyXDsn8mORVQDw+RIxkV8UrtefqStxUZ94XyUv1dgv G+fXeSPBs8Yi0hVdca06sg0gofVkTGPHIRuJ+FMQvqOcAqenjRa0nSqT1K+mkFDqBEvACUdDt AG3WTgEp0hfO1YaKWQJXqgvuPGB/ZNNfX1b/MumuQh1f1pBEiUQQU+J7OxD4kOsjwmz3woc3V TlSq748dusp5eInNmLSFwC6vjkcYnQavm3DXSBKCLTE7H2AoBpfmO+G2Z6Sdq0x8bdqT6TuH+ ZIv21c3ifvRVtUY81z+WneF1GvZak+llTZxJcvPehw4s2huFlK2KWxpZUGrb63y6ngXsC6raC IcbqVBhDa2MkKeB2CWKFcmWI/dRCk7E46Ftx+5Lb2CjajEuADDGKBa+QKx9FzI2odZQaJmUuz 4ABJepS3ul5YjROHGgYiEjBH+JY1qAN+n163MXAagVLYbIY7BMdLJ7MZcctaFmwfvze8QhDnS yK61wQIXEzOzh9uesZ0MYEaObHYBHZ2VMcLBhouChK+t75I9bADzQXawfNM/KPP2y+wgRbx7p 9omPH0Nm1O4zfEhshoJYG1uTmh8m/SqQ6pzshTs0/6MwEuw08cKhKX5aoyUBU7uPQyVL4ppzN f7gwGMXhAX2aCFMX3Ms2uqcU8vCB5Hybhss36bBuXi4lMzxClXDXsA1UAwuwFbuMdwBBRT0xp Z9fWT2U12NWZ7Ef+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? How expensive is the function? Arnd