lkml.org 
[lkml]   [2014]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] efi_rtc: probe function error out in case no efi runtime enabled
Hi, Mark

On 09/22/14 at 12:33pm, Mark Salter wrote:
> On Thu, 2014-08-14 at 17:19 +0800, Dave Young wrote:
> > efi rtc depends on efi runtime services, so if efi runtime services are not
> > usable it should error out.
> >
> > Without this patch rtc-efi will panic with 'noefi' boot
>
> Is this still needed after commit da167ad7638759:
>
> rtc: ia64: allow other architectures to use EFI RTC
>
> That should keep efi_rtc_probe from being called if runtime services
> are not available.

If that's the case then this patch should be unnecessary, I have no machine
to test it currently though.

>
> >
> > Signed-off-by: Dave Young <dyoung@redhat.com>
> > ---
> > drivers/rtc/rtc-efi.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
> > index c4c3843..ca2487b 100644
> > --- a/drivers/rtc/rtc-efi.c
> > +++ b/drivers/rtc/rtc-efi.c
> > @@ -191,6 +191,9 @@ static int __init efi_rtc_probe(struct platform_device *dev)
> > {
> > struct rtc_device *rtc;
> >
> > + if (!efi_enabled(EFI_RUNTIME_SERVICES))
> > + return -ENODEV;
> > +
> > rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops,
> > THIS_MODULE);
> > if (IS_ERR(rtc))
>
>


\
 
 \ /
  Last update: 2014-09-23 10:01    [W:0.081 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site