Re: [PATCH v4] time: Fix extra sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/17/2018 2:31 AM, John Stultz wrote: On Mon, Jul 16, 2018 at 1:40 PM, Mukesh Ojha 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_

Re: [PATCH v4] time: Fix extra sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
On 7/17/2018 2:20 AM, Thomas Gleixner wrote: On Tue, 17 Jul 2018, Mukesh Ojha wrote: @@ -102,7 +102,7 @@ static int rtc_resume(struct device *dev) struct timespec64 sleep_time; int err; - if (timekeeping_rtc_skipresume()) + if (!timekeeping_rtc_skipresume())

Re: [PATCH v4] time: Fix extra sleeptime injection when suspend fails

2018-07-16 Thread John Stultz
On Mon, Jul 16, 2018 at 1:40 PM, Mukesh Ojha 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

Re: [PATCH v4] time: Fix extra sleeptime injection when suspend fails

2018-07-16 Thread Thomas Gleixner
On Tue, 17 Jul 2018, Mukesh Ojha wrote: > @@ -102,7 +102,7 @@ static int rtc_resume(struct device *dev) > struct timespec64 sleep_time; > int err; > > - if (timekeeping_rtc_skipresume()) > + if (!timekeeping_rtc_skipresume()) > return 0; That does not make

[PATCH v4] time: Fix extra sleeptime injection when suspend fails

2018-07-16 Thread Mukesh Ojha
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