Re: [PATCH][RFC v5] timekeeping: Ignore the bogus sleep time if pm_trace is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Aug 2016, Rafael J. Wysocki wrote:
> On Monday, August 29, 2016 12:40:39 AM Chen Yu wrote:
> > +
> > +	/*
> > +	 * 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()

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]