public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rtc: mv: reset date if after year 2038
Date: Tue, 18 Feb 2014 15:16:56 +0100	[thread overview]
Message-ID: <20140218151656.7056009b@skate> (raw)
In-Reply-To: <20140218140429.GE17984@lunn.ch>

Dear Andrew Lunn,

On Tue, 18 Feb 2014 15:04:29 +0100, Andrew Lunn wrote:

> > +	/*
> > +	 * A date after January 19th, 2038 does not fit on 32 bits and
> > +	 * will confuse the kernel and userspace. Reset to a sane date
> > +	 * (January 1st, 2013) if we're after 2038.
> > +	 */
> 
> Hi Thomas
> 
> Would it be better to reset back to 01/01/1970? When we do reach 32
> bit rollover, and assuming the world continues to exist, it has a
> better chance of being right than 01/01/2013.

I must say I don't really care which "sane date" we use for the RTC,
but I don't understand your argument.

Why would 01/01/1970 be more "right" than any other random date? If
the RTC has a date past 2^32, then we have absolutely no way of
converting this date into something sane that fits under 2^32, so
setting either 01/01/1970, 01/01/2013, or 12/11/2025 is just about the
same. And actually 01/01/2013 has a much higher chance of being closer
to the right date, because the boards I've seen affected by this
problem are the new Armada 375/38x boards, which have been manufactured
starting in 2013.

That being said, I don't care about which date is chosen. Just let me
know if you want me to resend the patch with a reset to 01/01/1970.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2014-02-18 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 13:26 [PATCH] rtc: mv: reset date if after year 2038 Thomas Petazzoni
2014-02-18 13:34 ` Baruch Siach
2014-02-18 14:04 ` Andrew Lunn
2014-02-18 14:15   ` Jason Cooper
2014-02-18 14:16   ` Thomas Petazzoni [this message]
2014-02-18 14:53     ` Andrew Lunn
2014-02-18 14:58 ` Jason Cooper
2014-02-18 19:11 ` Josh Cartwright
2014-02-18 23:14   ` Thomas Petazzoni
2014-02-19 16:50     ` Josh Cartwright
2014-02-21 23:41 ` Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140218151656.7056009b@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox