From patchwork Mon Jul 16 16:50:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: john stultz X-Patchwork-Id: 10014 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8CAB824024 for ; Mon, 16 Jul 2012 16:54:09 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 50EFEA188DB for ; Mon, 16 Jul 2012 16:54:09 +0000 (UTC) Received: by yhpp61 with SMTP id p61so5771601yhp.11 for ; Mon, 16 Jul 2012 09:54:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-content-scanned:x-cbid :x-gm-message-state; bh=oDOy1pmZdFNIzLajBB5KSUiVo1vCmfmuGHnCgieBikY=; b=WLl/KvFlPeMqjfCrKZ4M664DfiDKXfa8yn/y/B5PClEmHn5lK6QhO0mDnQJJ0tRJyf a1Kws7OHhD82XuA3nkv/Bsu5DWUeTQVhhhBOHDeKEevaUuRCo38Ts/3S5SkXmKNcwutQ 70NvlcU1Z0WRNJ3IIh3lhtTXYvm8CpewIpzA3vTWQRryiD2KW/5h+M6C+BRN4YmHfEmR AC8u/FmBdheIVqUdeNUh/GMfH2ll4nOZU7AClDzcuorZPFQWyiOMzjSFHL2udUUpEp3P iqLgFavpk7ckekNvnbc3BumnBhXcgcsCnRG0Zra6pS/tqyAoQAFnGKiDpCqhZPTDSY9J 1DpQ== Received: by 10.50.87.227 with SMTP id bb3mr5660847igb.57.1342457648254; Mon, 16 Jul 2012 09:54:08 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp10585ibb; Mon, 16 Jul 2012 09:54:07 -0700 (PDT) Received: by 10.60.9.193 with SMTP id c1mr16404706oeb.47.1342457646696; Mon, 16 Jul 2012 09:54:06 -0700 (PDT) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com. [32.97.110.150]) by mx.google.com with ESMTPS id s9si15846047oea.24.2012.07.16.09.54.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jul 2012 09:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of johnstul@us.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Authentication-Results: mx.google.com; spf=pass (google.com: domain of johnstul@us.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=johnstul@us.ibm.com Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Jul 2012 10:54:03 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 16 Jul 2012 10:51:31 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 7AA133E40049 for ; Mon, 16 Jul 2012 16:51:25 +0000 (WET) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6GGp97J050972 for ; Mon, 16 Jul 2012 10:51:10 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6GGp4TQ005840 for ; Mon, 16 Jul 2012 10:51:07 -0600 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6GGotT7004426; Mon, 16 Jul 2012 10:50:56 -0600 From: John Stultz To: Linus Torvalds Cc: Thomas Gleixner , LKML , Linux PM list , John Stultz , Ingo Molnar , Peter Zijlstra , Prarit Bhargava , stable@vger.kernel.org Subject: [PATCH] timekeeping: Add missing update call in timekeeping_resume() Date: Mon, 16 Jul 2012 12:50:42 -0400 Message-Id: <1342457442-7255-1-git-send-email-johnstul@us.ibm.com> X-Mailer: git-send-email 1.7.9.5 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12071616-2356-0000-0000-000000667DE9 X-Gm-Message-State: ALoCoQmrYyFmoxY2G8CTL/caPxaLrPuTkgQ5Mo/ZVBR17hUVvf4nfI4V7mOgcX5YR3Ss9UvawFsr From: Thomas Gleixner Linus, Since Thomas is on vacation I wanted to send you his fix to resolve the suspend regression from the leapsecond fixes. thanks -john The leap second rework unearthed another issue of inconsistent data. On timekeeping_resume() the timekeeper data is updated, but nothing calls timekeeping_update(), so now the update code in the timer interrupt sees stale values. This has been the case before those changes, but then the timer interrupt was using stale data as well so this went unnoticed for quite some time. Add the missing update call, so all the data is consistent everywhere. Reported-by: Andreas Schwab Reported-by-and-tested-by: "Rafael J. Wysocki" CC: LKML Cc: Linux PM list Cc: John Stultz Cc: Ingo Molnar Cc: Peter Zijlstra , Cc: Prarit Bhargava Cc: stable@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 269b1fe..3447cfa 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -717,6 +717,7 @@ static void timekeeping_resume(void) timekeeper.clock->cycle_last = timekeeper.clock->read(timekeeper.clock); timekeeper.ntp_error = 0; timekeeping_suspended = 0; + timekeeping_update(false); write_sequnlock_irqrestore(&timekeeper.lock, flags); touch_softlockup_watchdog();