[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALAqxLWRrbavqjcX+n1EqFhi9Mf8e_qFkyBZBynmDOTPwkFszA@mail.gmail.com>
Date: Tue, 17 Jul 2018 13:10:04 -0700
From: John Stultz <john.stultz@...aro.org>
To: Mukesh Ojha <mojha@...eaurora.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
lkml <linux-kernel@...r.kernel.org>, gkohli@...eaurora.org,
cpandya@...eaurora.org, neeraju@...eaurora.org
Subject: Re: [PATCH v5] time: Fix extra sleeptime injection when suspend fails
On Mon, Jul 16, 2018 at 11:31 PM, Mukesh Ojha <mojha@...eaurora.org> wrote:
> Currently, there exists a corner case assuming when there is
> only one clocksource e.g RTC, and system failed to go to
> suspend mode. While resume rtc_resume() injects the sleeptime
> as timekeeping_rtc_skipresume() returned 'false' (default value
> of sleeptime_injected) due to which we can see mismatch in
> timestamps.
>
> This issue can also come in a system where more than one
> clocksource are present and very first suspend fails.
>
> Success case:
> ------------
> {sleeptime_injected=false}
> rtc_suspend() => timekeeping_suspend() => timekeeping_resume() =>
>
> (sleeptime injected)
> rtc_resume()
>
> Failure case:
> ------------
> {failure in sleep path} {sleeptime_injected=false}
> rtc_suspend() => rtc_resume()
>
> {sleeptime injected again which was not required as the suspend failed}
>
> Fix this by handling the boolean logic properly.
>
> Originally-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Mukesh Ojha <mojha@...eaurora.org>
> ---
> Changes in V5:
> * Took extra variable `inject_sleeptime` to take care of injecting sleeptime
> inside timekeeping_resume().
> * Inverted the return logic inside timekeeping_skipresume() instead of doing
> it in rtc_resume().
> * Updated commit description.
Thanks again, I'lll get this queued up for testing.
thanks
-john
Powered by blists - more mailing lists