Re: [PATCH][RFC v5] timekeeping: Ignore the bogus sleep time if pm_trace is enabled
From: Chen Yu <yu.c.chen@intel.com>
Date: 2016-09-04 15:29:47
Also in:
linux-pm, lkml
From: Chen Yu <yu.c.chen@intel.com>
Date: 2016-09-04 15:29:47
Also in:
linux-pm, lkml
Hi Thomas, Rafael, On Fri, Sep 02, 2016 at 09:26:51PM +0200, Thomas Gleixner wrote:
On Wed, 31 Aug 2016, Rafael J. Wysocki wrote:quoted
On Monday, August 29, 2016 12:40:39 AM Chen Yu wrote:quoted
+ + /* + * Make rtc-based persistent clock unusable + * if pm_trace is enabled, only take effect + * for timekeeping_suspend/resume. + */ + if (pm_trace_is_enabled() && + x86_platform.get_wallclock == mach_get_cmos_time) { + ts->tv_sec = 0; + ts->tv_nsec = 0; + }I'm not sure about this. Looks hackish.Indeed. Can't you just keep track that pm_trace fiddled with the cmos clock and then discard the value either in the core or in mach_get_cmos_time()
The previous version is more straightforward, since it ignored the bogus rtc in core. Would you please take a glance at it too, thanks: https://patchwork.kernel.org/patch/9287347/ Thanks, Yu