This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: New kernel interface for sys_tz and timewarp?
- From: Arnd Bergmann <arnd at arndb dot de>
- To: "H. Peter Anvin" <hpa at zytor dot com>
- Cc: David Laight <David dot Laight at aculab dot com>, "Theodore Y. Ts'o" <tytso at mit dot edu>, Linus Torvalds <torvalds at linux-foundation dot org>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, Thomas Gleixner <tglx at linutronix dot de>, John Stultz <john dot stultz at linaro dot org>, Alexandre Belloni <alexandre dot belloni at bootlin dot com>, Stephen Boyd <sboyd at kernel dot org>, Florian Weimer <fweimer at redhat dot com>, Palmer Dabbelt <palmer at dabbelt dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Karel Zak <kzak at redhat dot com>, Lennart Poettering <lennart at poettering dot net>, OGAWA Hirofumi <hirofumi at mail dot parknet dot co dot jp>
- Date: Thu, 15 Aug 2019 15:22:45 +0200
- Subject: Re: New kernel interface for sys_tz and timewarp?
- References: <CAK8P3a0VxM1BkjY1D2FfHi6L-ho_NH3v3+gBu45EfpjLF5NU5w@mail.gmail.com> <CAHk-=wiO2CWONDBud4nxoPgUJN1JEewFWhHa5wAqY8G5rrTXRQ@mail.gmail.com> <20190814000622.GB20365@mit.edu> <342565604d704b6ebaf2e9ec28d3e109@AcuMS.aculab.com> <0089C4CC-DD85-48A1-869B-A9D71852BEC7@zytor.com>
On Wed, Aug 14, 2019 at 6:48 PM <hpa@zytor.com> wrote:
>
> I believe Windows 10 changed the default RTC to UTC, although perhaps
> only if running under UEFI.
I looked at the efi rtc driver now, and found two things:
- The EFI get_time() call passes down timezone information, so we know what
UTC is, and can just ignore the timezone. This is good.
- The RTC_DRV_EFI depends on !X86 as of commit 7efe665903d0 ("rtc:
Disable EFI rtc for x86"). This unfortunately means we always fall back to
either the rtc-cmos driver or the x86 specific read_persistent_clock64()
implementation even when the EFI RTC is reliable.
If 64-bit Windows relies on a working EFI RTC implementation, we could
decide to leave the driver enabled on 64-bit and only disable it for
32-bit EFI. That way, future distros would no longer have to worry about
the localtime hack, at least the ones that have dropped support for
32-bit x86 kernels.
Arnd