mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, hpa@zytor.com,
	mingo@kernel.org, bp@alien8.de, jslaby@suse.cz,
	john.stultz@linaro.org, tglx@linutronix.de
Subject: [tip:timers/core] timekeeping: Update tk->cycle_last in resume
Date: Mon, 22 Apr 2013 11:32:11 -0700	[thread overview]
Message-ID: <tip-77c675ba18836802f6b73d2d773481d06ebc0f04@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1304211648150.21884@ionos>

Commit-ID:  77c675ba18836802f6b73d2d773481d06ebc0f04
Gitweb:     http://git.kernel.org/tip/77c675ba18836802f6b73d2d773481d06ebc0f04
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 22 Apr 2013 09:37:04 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 22 Apr 2013 20:17:51 +0200

timekeeping: Update tk->cycle_last in resume

commit 7ec98e15aa (timekeeping: Delay update of clock->cycle_last)
forgot to update tk->cycle_last in the resume path. This results in a
stale value versus clock->cycle_last and prevents resume in the worst
case.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1304211648150.21884@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/timekeeping.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 675f720..98cd470 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -951,7 +951,7 @@ static void timekeeping_resume(void)
 		__timekeeping_inject_sleeptime(tk, &ts_delta);
 
 	/* Re-base the last cycle value */
-	clock->cycle_last = cycle_now;
+	tk->cycle_last = clock->cycle_last = cycle_now;
 	tk->ntp_error = 0;
 	timekeeping_suspended = 0;
 	timekeeping_update(tk, false, true);

  parent reply	other threads:[~2013-04-22 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 15:46 Resume does not work after timekeeping change Jiri Slaby
2013-04-20 18:41 ` Borislav Petkov
2013-04-21 14:48 ` Thomas Gleixner
2013-04-21 16:39   ` Borislav Petkov
2013-04-22 17:01   ` John Stultz
2013-04-22 18:32   ` tip-bot for Thomas Gleixner [this message]
2013-04-22 16:05 ` John Stultz
2013-04-22 16:40   ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-77c675ba18836802f6b73d2d773481d06ebc0f04@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome