Skip to content

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

Hamza Mahfooz linux-acpi linux-rtc 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v32 patches 2 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches2 repliesSuperseded

v2 from the cover letter

- 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)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ACPI: TAD: introduce acpi_has_rtc()drivers/acpi/acpi_tad.c include/linux/acpi.h+49 -50 replies
2/2rtc: efi: defer to the ACPI TAD if it can drive the RTCdrivers/rtc/Kconfig drivers/rtc/rtc-efi.c+9 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchArd Biesheuvel
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] rtc: efi: defer to the ACPI TAD if it can drive the RTC

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(-)
Signature · 1 line
2.56.0