Linux RTC
 help / color / mirror / Atom feed
* [PATCH v4 0/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC
@ 2026-10-27 22:05 Hamza Mahfooz
  2026-10-27 22:05 ` [PATCH v4 1/2] ACPI: TAD: introduce acpi_has_rtc() Hamza Mahfooz
  2026-10-27 22:05 ` [PATCH v4 2/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC Hamza Mahfooz
  0 siblings, 2 replies; 5+ messages in thread
From: Hamza Mahfooz @ 2026-10-27 22:05 UTC (permalink / raw)
  To: linux-acpi, linux-rtc
  Cc: Rafael J. Wysocki, Len Brown, Alexandre Belloni, Ard Biesheuvel,
	Hamza Mahfooz

On Microsoft C2141 and C4143 systems, the EFI GetTime() runtime service
faults when called by rtc-efi, which causes all EFI runtime services to
be disabled, even though the RTC can be driven via the ACPI Time and
Alarm Device (TAD) instead, which acpi-tad registers an RTC class device
for since commit 8a1e7f4b1764 ("ACPI: TAD: Add RTC class device
interface").

As suggested by Ard, add acpi_has_rtc() to the TAD driver (patch 1),
and make rtc-efi decline to probe if it returns true (patch 2).

v2:
- Rename acpi_tad_rtc_available() to acpi_has_rtc(), move it to within
  acpi-tad (which allows us to simplify it quite a bit) and declare it
  in linux/acpi.h. (Ard)
- Add acpi_disabled check. (Ard)
- Make rtc-efi decline to probe instead of not registering the device in
  efisubsys_init(). (Ard)
- Make RTC_DRV_EFI depend on !ACPI || ACPI_TAD. (Ard)
v3:
- Make RTC_DRV_EFI depend on ACPI_TAD || !ACPI_TAD. (Sashiko)
v4:
- Move acpi-tad code to existing CONFIG_RTC_CLASS #ifdef. (Rafael)
- Add IS_ENABLED(CONFIG_RTC_CLASS) case to linux/acpi.h.

Hamza Mahfooz (2):
  ACPI: TAD: introduce acpi_has_rtc()
  rtc: efi: defer to the ACPI TAD if it can drive the RTC

 drivers/acpi/acpi_tad.c | 48 ++++++++++++++++++++++++++++++++++++-----
 drivers/rtc/Kconfig     |  5 +++++
 drivers/rtc/rtc-efi.c   |  4 ++++
 include/linux/acpi.h    |  6 ++++++
 4 files changed, 58 insertions(+), 5 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-27 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 22:05 [PATCH v4 0/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC Hamza Mahfooz
2026-10-27 22:05 ` [PATCH v4 1/2] ACPI: TAD: introduce acpi_has_rtc() Hamza Mahfooz
2026-10-27 22:16   ` sashiko-bot
2026-10-27 22:05 ` [PATCH v4 2/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC Hamza Mahfooz
2026-10-27 22:10   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox