* [PATCH] efi: rtc-efi: mark UIE as unsupported
@ 2015-01-13 12:28 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2015-01-13 12:28 UTC (permalink / raw)
To: matt.fleming-ral2JQCrhuEAvxtiuMwx3w,
msalter-H+wXaHxf7aLQT0dZR+AlfA, linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
leif.lindholm-QSEj5FYQhm4dnm+yROfE0A,
roy.franz-QSEj5FYQhm4dnm+yROfE0A
Cc: 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/rtc/rtc-efi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index b37b0c80bd5a..cb989cd00b14 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] efi: rtc-efi: mark UIE as unsupported
@ 2015-01-13 12:28 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2015-01-13 12:28 UTC (permalink / raw)
To: linux-arm-kernel
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 <ard.biesheuvel@linaro.org>
---
drivers/rtc/rtc-efi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index b37b0c80bd5a..cb989cd00b14 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1421152133-28506-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] efi: rtc-efi: mark UIE as unsupported
2015-01-13 12:28 ` Ard Biesheuvel
@ 2015-01-20 15:46 ` Matt Fleming
-1 siblings, 0 replies; 4+ messages in thread
From: Matt Fleming @ 2015-01-20 15:46 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w,
msalter-H+wXaHxf7aLQT0dZR+AlfA, linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
leif.lindholm-QSEj5FYQhm4dnm+yROfE0A,
roy.franz-QSEj5FYQhm4dnm+yROfE0A
On Tue, 13 Jan, at 12:28:53PM, Ard Biesheuvel wrote:
> 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 <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> drivers/rtc/rtc-efi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
> index b37b0c80bd5a..cb989cd00b14 100644
> --- a/drivers/rtc/rtc-efi.c
> +++ b/drivers/rtc/rtc-efi.c
> @@ -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.
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] efi: rtc-efi: mark UIE as unsupported
@ 2015-01-20 15:46 ` Matt Fleming
0 siblings, 0 replies; 4+ messages in thread
From: Matt Fleming @ 2015-01-20 15:46 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 13 Jan, at 12:28:53PM, Ard Biesheuvel wrote:
> 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 <ard.biesheuvel@linaro.org>
> ---
> drivers/rtc/rtc-efi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
> index b37b0c80bd5a..cb989cd00b14 100644
> --- a/drivers/rtc/rtc-efi.c
> +++ b/drivers/rtc/rtc-efi.c
> @@ -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.
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-20 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 12:28 [PATCH] efi: rtc-efi: mark UIE as unsupported Ard Biesheuvel
2015-01-13 12:28 ` Ard Biesheuvel
[not found] ` <1421152133-28506-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-01-20 15:46 ` Matt Fleming
2015-01-20 15:46 ` Matt Fleming
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.