diff options
| author | Johnny.Fan <Johnny.Fan@cixtech.com> | 2026-08-31 22:00:14 +0800 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2026-09-21 21:13:42 +0200 |
| commit | b430d1f6d80c005b486f028910e1ac3c91812710 (patch) | |
| tree | 9b47f3b0813e031534158fe238f583310a96ea3a /tools/perf/scripts/python/parallel-perf.py | |
| parent | 0ee5c5d804d592a8328a425b9274487d393d3a05 (diff) | |
| download | linux-b430d1f6d80c005b486f028910e1ac3c91812710.tar.gz linux-b430d1f6d80c005b486f028910e1ac3c91812710.zip | |
rtc: efi: restore alarm support with runtime capability probe
Restore the EFI RTC alarm functionality (read_alarm/set_alarm and
procfs output) that was removed by commit 18a3510bc87d ("rtc: efi:
Remove wakeup functionality").
The removal was motivated by the observation that many EFI platforms
lack RTC wakeup support while also omitting the RT_PROP table, causing
the wakeup capability to be incorrectly advertised. While that is
true, removing the feature entirely also breaks platforms where the
wakeup runtime service actually works.
On CIX SoCs, the RTC is an I2C device owned by firmware, and in the
ACPI boot configuration the I2C bus it sits on is not exposed to the
OS, so the EFI runtime services are the only way Linux can access
the RTC at all. Both Linux and Windows use this same interface by
design, so the RTC state is consistent across the operating systems
installed on the machine, and Windows relies on the EFI wakeup
services for its own RTC alarm support.
With the alarm support removed from rtc-efi, Linux loses the
equivalent capability entirely on these platforms: rtcwake fails
for both suspend-to-RAM and power-off wakeup, as there is no other
path to program the RTC alarm. This is a real product requirement
that CIX customers have explicitly requested, not a hypothetical
use case.
To avoid exposing a broken alarm on firmware that does not implement
the wakeup runtime services, probe the capability at ->probe() time by
actually calling GetWakeupTime() -- if it fails, clear RTC_FEATURE_ALARM
and the device behaves as before the removal.
Also set RTC_FEATURE_ALARM_WAKEUP_ONLY since EFI wakeup time is a
wakeup-only alarm, not a periodic/update interrupt source.
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
Reviewed-by: Fugang Duan <fugang.duan@cixtech.com>
Signed-off-by: Johnny.Fan <Johnny.Fan@cixtech.com>
Link: https://patch.msgid.link/20260831140014.839222-1-johnny.fan@cixtech.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions
