From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH][RFC v5] timekeeping: Ignore the bogus sleep time if pm_trace is enabled Date: Fri, 2 Sep 2016 21:26:51 +0200 (CEST) Message-ID: References: <1472402439-1146-1-git-send-email-yu.c.chen@intel.com> <4130556.MNmyvLDyHH@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <4130556.MNmyvLDyHH@vostro.rjw.lan> Sender: stable-owner@vger.kernel.org To: "Rafael J. Wysocki" Cc: Chen Yu , x86@kernel.org, John Stultz , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org, Xunlei Pang , "3.17+" , Zhang Rui , linux-pm@vger.kernel.org List-Id: linux-pm@vger.kernel.org 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