[RFC PATCH 1/3] efi-rtc: Remove wakeup functionality
Ard Biesheuvel
ardb at kernel.org
Sun Jul 13 23:19:52 PDT 2025
On Mon, 14 Jul 2025 at 16:13, Demi Marie Obenour <demiobenour at gmail.com> wrote:
>
> On 7/14/25 02:08, Ard Biesheuvel wrote:
> > From: Ard Biesheuvel <ardb at kernel.org>
> >
> > The EFI rtc driver is used by non-x86 architectures only, and exposes
> > the get/set wakeup time functionality provided by the underlying
> > platform. This is usually broken on most platforms, and not widely used
> > to begin with [if at all], so let's just remove it.
> systemd uses the underlying functionality: a timer can wake the system up.
> I have no idea if that is implemented in terms of this function, though.
To be clear, you are referring to wake from poweroff at some date/time
in the future, right?
This change does not remove this functionality from the RTC subsystem,
it just ceases to expose it on non-x86 EFI platforms that claim to
support it.
For reference (which I should have included in the cover letter) [0],
there are arm64 server systems which always return an error when
calling this API, and most non-server arm64 systems do not implement
it to begin with.
The patch in question implements one of the workarounds that was
considered, which is to invoke GetWakeupTime() when registering the
RTC, and disable the wakeup functionality if that fails. However, that
call by itself could easily regress other platforms, where
GetWakeupTime() was simply never called before, and where calling it
may tickle other bugs.
Hence this RFC: if nobody uses this API on non-x86 EFI platforms, then
I'd rather not support it to begin with.
[0] https://lore.kernel.org/all/20250710084151.55003-1-feng.tang@linux.alibaba.com/T/#u
More information about the linux-riscv
mailing list