Linux RTC
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hamza Mahfooz" <hamzamahfooz@linux.microsoft.com>,
	linux-rtc@vger.kernel.org
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v2 2/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC
Date: Fri, 23 Oct 2026 21:30:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-183260@kernel.org> (raw)
In-Reply-To: <20261023212218.2568858-2-hamzamahfooz@linux.microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] rtc: efi: ACPI_TAD dependency disables RTC_DRV_EFI in arm64 defconfig
--

commit 43949693bace16600c49e8c7dd525850e1286516
Author: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>

rtc: efi: defer to the ACPI TAD if it can drive the RTC

This commit updates efi_rtc_probe() in drivers/rtc/rtc-efi.c to return
-ENODEV when acpi_has_rtc() is true, and makes RTC_DRV_EFI depend on
!ACPI || ACPI_TAD.

> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 1e863f1d36fd5..26f057f52ce59 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -1262,10 +1262,14 @@ config RTC_DRV_DA9063
>  config RTC_DRV_EFI
>  	tristate "EFI RTC"
>  	depends on EFI && !X86
> +	depends on !ACPI || ACPI_TAD

[Severity: High]
Does adding "depends on !ACPI || ACPI_TAD" here cause CONFIG_RTC_DRV_EFI=y
to be silently dropped in arch/arm64/configs/defconfig (and existing
configurations with CONFIG_ACPI=y and CONFIG_ACPI_TAD=n)?

In drivers/acpi/Kconfig, ACPI_TAD has no default and depends on SYSFS and
PM_SLEEP:

config ACPI_TAD
	tristate "ACPI Time and Alarm (TAD) Device Support"
	depends on SYSFS && PM_SLEEP

In arch/arm64/configs/defconfig, CONFIG_ACPI=y and CONFIG_RTC_DRV_EFI=y are
enabled without setting CONFIG_ACPI_TAD, so this dependency causes Kconfig
to drop CONFIG_RTC_DRV_EFI while leaving CONFIG_ACPI_TAD disabled,
resulting in neither rtc-efi nor acpi-tad being built. It also prevents
enabling CONFIG_RTC_DRV_EFI when CONFIG_ACPI=y and CONFIG_PM_SLEEP=n (or
CONFIG_SYSFS=n).

Since include/linux/acpi.h already provides an inline stub for
acpi_has_rtc() when !IS_REACHABLE(CONFIG_ACPI_TAD):

#if IS_REACHABLE(CONFIG_ACPI_TAD)
bool acpi_has_rtc(void);
#else
static inline bool acpi_has_rtc(void) { return false; }
#endif

should this use "depends on ACPI_TAD || !ACPI_TAD" instead to avoid the
CONFIG_RTC_DRV_EFI=y and CONFIG_ACPI_TAD=m reachability mismatch, or if
ACPI_TAD is meant to be required whenever ACPI is enabled, should ACPI_TAD
and defconfig be updated accordingly?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261023212218.2568858-1-hamzamahfooz@linux.microsoft.com?part=2

  reply	other threads:[~2026-10-23 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 21:22 [PATCH v2 1/2] ACPI: TAD: introduce acpi_has_rtc() Hamza Mahfooz
2026-10-23 21:22 ` [PATCH v2 2/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC Hamza Mahfooz
2026-10-23 21:30   ` sashiko-bot [this message]
2026-10-23 21:32 ` [PATCH v2 1/2] ACPI: TAD: introduce acpi_has_rtc() sashiko-bot

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=sashiko-outbox-183260@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=hamzamahfooz@linux.microsoft.com \
    --cc=linux-rtc@vger.kernel.org \
    --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