Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671453

Re: [PATCH 00/51] rtc: stop using rtc deprecated functions

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH 00/51] rtc: stop using rtc deprecated functions
Date 2017-06-21 10:00 +0200
Message-ID <tUIIq-3hT-11@gated-at.bofh.it> (permalink)
References <tUz2p-5x0-13@gated-at.bofh.it> <tUzvt-5W2-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi!

> > I agree with that but not the android guys. They seem to mandate an RTC
> > that can store time from 01/01/1970. I don't know much more than that
> > because they never cared to explain why that was actually necessary
> > (apart from a laconic "this will result in a bad user experience")
> > 
> > I think tglx had a plan for offsetting the time at some point so 32-bit
> > platform can pass 2038 properly.
> 
> Yes, but there are still quite some issues to solve there:
> 
>      1) How do you tell the system that it should apply the offset in the
>      	first place, i.e at boot time before NTP or any other mechanism can
>      	correct it?

I'd not do offset. Instead, I'd select a threshold (perhaps year of
release of given kernel?) and

	if (rtc_time < year_of_release_of_kernel)
	   rtc_time += 0x100000000;

Ok, we'll have to move away from "rtc_time == 0 indicates zero", as
seen in some drivers.

>      2) Deal with creative vendors who have their own idea about the 'start
>      	of the epoch'

If someone uses different threshold, well, there will be
confusion. But only for users that have their rtc set to the past,
which is quite unusual.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-20 23:40 +0200
  Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Thomas Gleixner <tglx@linutronix.de> - 2017-06-21 00:10 +0200
    Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-06-21 00:50 +0200
    Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Pavel Machek <pavel@ucw.cz> - 2017-06-21 10:00 +0200
      Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-21 10:40 +0200
        Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-06-21 11:30 +0200
          Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-21 11:50 +0200
        Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Pavel Machek <pavel@ucw.cz> - 2017-06-21 13:40 +0200
          Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-21 14:40 +0200
            Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Pavel Machek <pavel@ucw.cz> - 2017-06-21 20:10 +0200

csiph-web