efi: rtc-efi: mark UIE as unsupported
Subsystems (2)
PATCH 1/1 efi: rtc-efi: mark UIE as unsupported
Tools like hwclock attempt to enable the RTC update interrupt (UIE) to maximize the accuracy of the reported time value. The EFI rtc does not have interrupt capability so this is a pointless exercise to begin with, but the generic RTC framework ends up issuing a SetWakeupTime() Runtime Services call before drawing that conclusion on its own.
Instead, we can mark UIE as unsupported at driver probe time. The net result is the same, but without the spurious SetWakeupTime() call.
--- drivers/rtc/rtc-efi.c | 1 + 1 file changed, 1 insertion(+)
drivers/rtc/rtc-efi.c +1 -0
@@ -218,6 +218,7 @@ static int __init efi_rtc_probe(struct platform_device *dev)if (IS_ERR (rtc))return PTR_ERR (rtc); + rtc->uie_unsupported =1 ;platform_set_drvdata (dev, rtc);return 0 ;
Signature · 1 line
1.8.3.2
PATCH 1/1 efi: rtc-efi: mark UIE as unsupported
Quoted 19 lines · Ard Biesheuvel
Tools like hwclock attempt to enable the RTC update interrupt (UIE) to maximize the accuracy of the reported time value. The EFI rtc does not have interrupt capability so this is a pointless exercise to begin with, but the generic RTC framework ends up issuing a
SetWakeupTime()Runtime Services call before drawing that conclusion on its own.Instead, we can mark UIE as unsupported at driver probe time. The net result is the same, but without the spurious
SetWakeupTime()call.Signed-off-by Ard Biesheuvel <[email protected]>--- drivers/rtc/rtc-efi.c | 1 + 1 file changed, 1 insertion(+)drivers/rtc/rtc-efi.c +0
-0
drivers/rtc/rtc-efi.c static int __init efi_rtc_probe(struct platform_device *dev) · line 224
Quoted 7 lines
drivers/rtc/rtc-efi.c +1
-0@@ -218,6 +218,7 @@ static int __init efi_rtc_probe(struct platform_device *dev)if (IS_ERR (rtc))return PTR_ERR (rtc); + rtc->uie_unsupported =1 ;platform_set_drvdata (dev, rtc);return 0 ;
Looks fine to me. Picked up in the EFI tree for v3.20. Thanks Ard.
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center