Linux RTC
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alperen Kılıç" <sabri.alperen03@gmail.com>
Cc: linux-rtc@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: class: Do not inject sleep time without a suspend snapshot
Date: Sat, 03 Oct 2026 17:56:21 +0000	[thread overview]
Message-ID: <20261003175621.807371F0089C@smtp.kernel.org> (raw)
In-Reply-To: <20261003163138.14221-1-sabri.alperen03@gmail.com>

> rtc_suspend() returns early when timekeeping_rtc_skipsuspend() is true,
> which is the case on every system with a persistent clock. old_rtc and
> old_system are then never written and stay zero.
> 
> rtc_resume() is skipped under a different condition,
> timekeeping_rtc_skipresume(), which is only true once
> timekeeping_resume() has injected sleep time. timekeeping_resume() does
> that if a nonstop clocksource reports elapsed time or if the persistent
> clock is ahead of timekeeping_suspend_time. If neither holds, it injects
> nothing and rtc_resume() runs. With old_rtc and old_system being zero,
> rtc_resume() computes
> 
> 	sleep_time = new_rtc - new_system
> 
> and injects it when it is not negative. For an RTC kept in UTC this is
> [ ... ]
> 
> Fixes: 0fa88cb4b82b ("time, drivers/rtc: Don't bother with rtc_resume() for the nonstop clocksource")
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2543517
> Cc: stable@vger.kernel.org
> Signed-off-by: Alperen Kılıç <sabri.alperen03@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261003163138.14221-1-sabri.alperen03@gmail.com?part=1


      reply	other threads:[~2026-10-03 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 16:31 [PATCH] rtc: class: Do not inject sleep time without a suspend snapshot Alperen Kılıç
2026-10-03 17:56 ` sashiko-bot [this message]

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=20261003175621.807371F0089C@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-rtc@vger.kernel.org \
    --cc=sabri.alperen03@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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