FAILED: patch "[PATCH] x86/init: Initialize wall clock in get_rtc_noop()" failed to apply to 6.1-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 7d5af1f256fdecff6a7986bbc9146b69cb355bb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 7d5af1f256fdecff6a7986bbc9146b69cb355bb5 Mon Sep 17 00:00:00 2001
From: Naman Jain <[email protected]>
Date: Mon, 31 Aug 2026 08:25:28 +0000
Subject: [PATCH] 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.
--- arch/x86/kernel/x86_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/x86_init.c +1 -1
@@ -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" },
Signature · 1 line
2.53.0
PATCH 1/1 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.
--- arch/x86/kernel/x86_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/x86_init.c +1 -1
@@ -35,7 +35,7 @@ static void iommu_shutdown_noop(void) { }bool __init bool_x86_init_noop (void ) {return false; }void x86_op_int_noop (int cpu) { }static int set_rtc_noop (const struct timespec64 *now) {return -EINVAL ; } -static void get_rtc_noop (struct timespec64 *now) { } +static void get_rtc_noop (struct timespec64 *now) { *now = (struct timespec64 ){0 }; }static __initconst const struct of_device_id of_cmos_match[] = { { .compatible ="motorola,mc146818" },
Signature · 1 line
2.43.0
Re: [PATCH 6.1.y] x86/init: Initialize wall clock in get_rtc_noop()
Quoted 4 lines · Naman Jain
[PATCH 6.1.y] 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. WhenCONFIG_INIT_STACK_ALL_ZEROis not enabled,timekeeping_init()may therefore receive a nonzero invalid persistent
Queued for 6.1, 5.15 and 5.10, thanks.
Signature · 2 lines
Thanks, Sasha