From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH] x86/time: Don't use EFI's GetTime call by default Date: Tue, 1 Dec 2015 17:17:51 +0000 Message-ID: <565DD63F.1020100@citrix.com> References: <1448989066-20343-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448989066-20343-1-git-send-email-ross.lagerwall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall , xen-devel@lists.xen.org Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 01/12/15 16:57, Ross Lagerwall wrote: > When EFI is used, don't use EFI's GetTime() to get the time, because it > is broken on many platforms. [...] > --- a/xen/arch/x86/time.c > +++ b/xen/arch/x86/time.c > @@ -679,20 +679,28 @@ static void __get_cmos_time(struct rtc_time *rtc) > rtc->year += 100; > } > > +/* EFI's GetTime() is frequently broken so don't use it by default. */ > +#undef USE_EFI_GET_TIME > + > static unsigned long get_cmos_time(void) > { > - unsigned long res, flags; > +#ifdef USE_EFI_GET_TIME > + unsigned long res; > +#endif You could move this res into the if ( efi_enabled ) below. > + unsigned long flags; > struct rtc_time rtc; > unsigned int seconds = 60; > static bool_t __read_mostly cmos_rtc_probe; > boolean_param("cmos-rtc-probe", cmos_rtc_probe); > > +#ifdef USE_EFI_GET_TIME > if ( efi_enabled ) > { > res = efi_get_time(); > if ( res ) > return res; > } > +#endif David