public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>, linux-rtc@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v1 1/2] rtc: cmos: Enable ACPI alarm if advertised in ACPI FADT
Date: Fri, 20 Mar 2026 14:26:03 -0500	[thread overview]
Message-ID: <229724b9-e128-4c8e-8d7a-36926afb76d2@kernel.org> (raw)
In-Reply-To: <9618535.CDJkKcVGEf@rafael.j.wysocki>



On 3/14/2026 7:11 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> If the ACPI_FADT_FIXED_RTC flag is unset, the platform is declaring that
> it supports the ACPI RTC fixed event which should be used instead of a
> dedicated CMOS RTC IRQ.  However, the driver only enables it when
> is_hpet_enabled() returns true, which is questionable because there is
> no clear connection between enabled HPET and signaling wakeup via the
> ACPI RTC fixed event (for instance, the latter can be expected to work
> on systems that don't include a functional HPET).
> 
> Moreover, since use_hpet_alarm() returns false if use_acpi_alarm is set,
> the ACPI RTC fixed event is effectively used instead of the HPET alarm
> if the latter is functional, but there is no particular reason why it
> could not be used otherwise.
> 
> Accordingly, on x86 systems with ACPI, set use_acpi_alarm if
> ACPI_FADT_FIXED_RTC is unset without looking at whether or not HPET is
> enabled.
> 
> Also, do the ACPI FADT check in use_acpi_alarm_quirks() before the DMI
> BIOS year checks which are more expensive and it's better to skip them
> if ACPI_FADT_FIXED_RTC is set.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

This makes sense to me.

Sorry for my delay, I kept on meaning to check a few machines and then 
more things came up and it fell lower.

I did check 3 generations of AMD machines and I don't expect any 
problems from this change.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

> ---
>   drivers/rtc/rtc-cmos.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -817,6 +817,9 @@ static void rtc_wake_off(struct device *
>   #ifdef CONFIG_X86
>   static void use_acpi_alarm_quirks(void)
>   {
> +	if (acpi_gbl_FADT.flags & ACPI_FADT_FIXED_RTC)
> +		return;
> +
>   	switch (boot_cpu_data.x86_vendor) {
>   	case X86_VENDOR_INTEL:
>   		if (dmi_get_bios_year() < 2015)
> @@ -830,8 +833,6 @@ static void use_acpi_alarm_quirks(void)
>   	default:
>   		return;
>   	}
> -	if (!is_hpet_enabled())
> -		return;
>   
>   	use_acpi_alarm = true;
>   }
> 
> 
> 


  parent reply	other threads:[~2026-03-20 19:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14 12:09 [PATCH v1 0/2] rtc: cmos: Do not require IRQ if ACPI alarm is used Rafael J. Wysocki
2026-03-14 12:11 ` [PATCH v1 1/2] rtc: cmos: Enable ACPI alarm if advertised in ACPI FADT Rafael J. Wysocki
2026-03-20 18:00   ` Alexandre Belloni
2026-03-20 19:26   ` Mario Limonciello (AMD) (kernel.org) [this message]
2026-03-14 12:12 ` [PATCH v1 2/2] rtc: cmos: Do not require IRQ if ACPI alarm is used Rafael J. Wysocki
2026-03-20 18:00   ` Alexandre Belloni
2026-03-20 19:27     ` Mario Limonciello (AMD) (kernel.org)
2026-03-20 15:56 ` [PATCH v1 0/2] " Rafael J. Wysocki

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=229724b9-e128-4c8e-8d7a-36926afb76d2@kernel.org \
    --to=superm1@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=rafael@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