FAILED: patch "[PATCH] rtc: cmos: Honor explicit use_acpi_alarm parameter value" failed to apply to 6.6-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 6.6-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.6.y
git checkout FETCH_HEAD
git cherry-pick -x 3c7acb209e1d630b734a2ec72bd988f5da2ac55c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 3c7acb209e1d630b734a2ec72bd988f5da2ac55c Mon Sep 17 00:00:00 2001
From: Gregory Price <[email protected]>
Date: Thu, 15 Oct 2026 13:30:29 -0400
Subject: [PATCH] rtc: cmos: Honor explicit use_acpi_alarm parameter value
An explicit rtc_cmos.use_acpi_alarm=0 command-line argument is ignored on systems where use_acpi_alarm_quirks() enables ACPI RTC alarms. The argument appears in /proc/cmdline, but the read-only parameter reports Y.
The boolean parameter defaults to false, so the driver cannot distinguish an omitted argument from an explicit false value. Use a custom setter to record whether parsing occurred and skip automatic selection when it did. Preserve the bool parameter type metadata. Automatic selection remains unchanged when the parameter is omitted.
On the affected system, the explicit false value reports N after this change. The HPET-emulated path completed 100 test runs without a failure while the ACPI RTC event counter remained at zero.
--- drivers/rtc/rtc-cmos.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
drivers/rtc/rtc-cmos.c +25 -1
@@ -57,7 +57,28 @@*/ static bool use_acpi_alarm; -module_param (use_acpi_alarm, bool,0444 ); +static bool use_acpi_alarm_explicit; + +static int set_use_acpi_alarm (const char *val,const struct kernel_param *kp) +{ +int ret; + + ret =param_set_bool (val, kp); +if (!ret) + use_acpi_alarm_explicit = true; + +return ret; +} + +static const struct kernel_param_ops use_acpi_alarm_ops = { + .flags =KERNEL_PARAM_OPS_FL_NOARG , + .set = set_use_acpi_alarm, + .get = param_get_bool, +}; + +param_check_bool (use_acpi_alarm, &use_acpi_alarm); +module_param_cb (use_acpi_alarm, &use_acpi_alarm_ops, &use_acpi_alarm,0444 ); +__MODULE_PARM_TYPE (use_acpi_alarm,"bool" );static inline int cmos_use_acpi_alarm (void ) {
@@ -822,6 +843,9 @@ static void rtc_wake_off(struct device *dev)#ifdef CONFIG_X86 static void use_acpi_alarm_quirks (void ) { +if (use_acpi_alarm_explicit) +return ; +if (acpi_gbl_FADT.flags &ACPI_FADT_FIXED_RTC )return ;
Signature · 1 line
2.53.0