mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Naman Jain" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Naman Jain <namjain@linux.microsoft.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	Thomas Gleixner <tglx@kernel.org>, Roman Kisel <vdso@mailbox.org>,
	Hardik Garg <hargar@linux.microsoft.com>,
	Dexuan Cui <decui@microsoft.com>,
	stable@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/init: Initialize wall clock in get_rtc_noop()
Date: Tue, 03 Nov 2026 05:57:04 -0000	[thread overview]
Message-ID: <179368542482.1009794.8515933785273652302.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260831082528.1623843-1-namjain@linux.microsoft.com>

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     7d5af1f256fdecff6a7986bbc9146b69cb355bb5
Gitweb:        https://git.kernel.org/tip/7d5af1f256fdecff6a7986bbc9146b69cb355bb5
Author:        Naman Jain <namjain@linux.microsoft.com>
AuthorDate:    Mon, 31 Aug 2026 08:25:28 
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 02 Nov 2026 21:38:37 -08:00

x86/init: Initialize wall clock in get_rtc_noop()

get_rtc_noop() is used when an RTC is unavailable, but leaves its output
argument untouched. When CONFIG_INIT_STACK_ALL_ZERO is not enabled,
timekeeping_init() may therefore receive a nonzero invalid persistent
clock value and warn:

  "Persistent clock returned invalid value"

Initialize the output to zero, the documented representation of an
unsupported persistent clock.

Fixes: c311ed6183f4 ("x86/init: Allow DT configured systems to disable RTC at boot time")
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Roman Kisel <vdso@mailbox.org>
Reviewed-by: Hardik Garg <hargar@linux.microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260831082528.1623843-1-namjain@linux.microsoft.com
---
 arch/x86/kernel/x86_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 252c582..3b9b418 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -37,7 +37,7 @@ static void iommu_shutdown_noop(void) { }
 bool __init bool_x86_init_noop(void) { return false; }
 void x86_op_int_noop(int cpu) { }
 int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
-void get_rtc_noop(struct timespec64 *now) { }
+void get_rtc_noop(struct timespec64 *now) { *now = (struct timespec64){0}; }
 
 static __initconst const struct of_device_id of_cmos_match[] = {
 	{ .compatible = "motorola,mc146818" },

      parent reply	other threads:[~2026-11-03  5:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  8:25 [PATCH] " Naman Jain
2026-09-09 18:42 ` Dexuan Cui
2026-09-11  4:23 ` Hardik Garg
2026-09-12  3:35 ` Roman Kisel
2026-09-14 11:31   ` Naman Jain
2026-09-19  4:11     ` vdso
2026-10-12  5:24 ` Naman Jain
2026-10-15 21:38 ` Thomas Gleixner
2026-11-03  4:42 ` Naman Jain
2026-11-03  5:57 ` tip-bot2 for Naman Jain [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=179368542482.1009794.8515933785273652302.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=decui@microsoft.com \
    --cc=hargar@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=vdso@mailbox.org \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®