From patchwork Thu Oct 27 17:28:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 9400017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CDDB06059D for ; Thu, 27 Oct 2016 17:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCB8A2A2CF for ; Thu, 27 Oct 2016 17:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B10452A2FB; Thu, 27 Oct 2016 17:29:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 644332A2D2 for ; Thu, 27 Oct 2016 17:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936563AbcJ0R3I (ORCPT ); Thu, 27 Oct 2016 13:29:08 -0400 Received: from mga09.intel.com ([134.134.136.24]:51304 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935238AbcJ0R3G (ORCPT ); Thu, 27 Oct 2016 13:29:06 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 27 Oct 2016 10:29:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,553,1473145200"; d="scan'208";a="778660758" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by FMSMGA003.fm.intel.com with SMTP; 27 Oct 2016 10:28:53 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 27 Oct 2016 20:28:53 +0300 Date: Thu, 27 Oct 2016 20:28:53 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Feng Tang Cc: feng.tang@intel.com, "Rafael J. Wysocki" , "Rafael J. Wysocki" , Steven Rostedt , Sebastian Andrzej Siewior , Thomas Gleixner , linux-arch@vger.kernel.org, Rik van Riel , "Srivatsa S. Bhat" , Peter Zijlstra , Arjan van de Ven , Rusty Russell , Oleg Nesterov , Tejun Heo , Andrew Morton , Paul McKenney , Linus Torvalds , Paul Turner , Linux Kernel Mailing List , "Zhang, Rui" , Len Brown , Linux PM , Linux ACPI Subject: Re: S3 resume regression [1cf4f629d9d2 ("cpu/hotplug: Move online calls to hotplugged cpu")] Message-ID: <20161027172852.GE4617@intel.com> References: <20160511133406.GC4329@intel.com> <20160516193910.GL4329@intel.com> <573BA5E2.5040506@intel.com> <20160518072424.GU4329@intel.com> <20160526183207.GX4329@intel.com> <20160531072650.GP4329@intel.com> <20160713145425.GB4329@intel.com> <20160809172057.GZ4329@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160809172057.GZ4329@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Aug 09, 2016 at 08:20:57PM +0300, Ville Syrjälä wrote: > On Thu, Jul 14, 2016 at 04:29:42PM +0800, Feng Tang wrote: > > if you only want it to work, you can try an old patch > > https://bugzilla.kernel.org/attachment.cgi?id=76071 from a similar bug > > https://bugzilla.kernel.org/show_bug.cgi?id=41932 > > > > Alistair Buxton confirmed it work for 3.18 at least > > https://bugzilla.kernel.org/show_bug.cgi?id=107151#c16 > > That patch is a bit too ripe by now. Would need a fresh squeezed one. Since no one else bothered to refresh the patch I did it myself: Unfortunately it doesn't do anything for me. The fortunate thing is that acpi-idle has magically been fixed in the meantime, so I can at least go back to using that one and have working S3. diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index f6aae7977824..d73d094a8972 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -657,8 +657,16 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev) * - There are pending events on sleeping CPUs which were not * in the event mask */ - if (next_event.tv64 != KTIME_MAX) + if (next_event.tv64 != KTIME_MAX) { + s64 delta = next_event.tv64 - now.tv64; + + if (delta >= 10000000000) { + printk(KERN_CRIT "%s(): The delta is big: %lld\n", __func__, delta); + next_event.tv64 = now.tv64 + 3000000000; + } + tick_broadcast_set_event(dev, next_cpu, next_event); + } raw_spin_unlock(&tick_broadcast_lock);