Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbdFUJ1P convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 05:27:15 -0400 Received: from smtp-out6.electric.net ([192.162.217.192]:50059 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbdFUJ1M (ORCPT ); Wed, 21 Jun 2017 05:27:12 -0400 From: David Laight To: "'Russell King - ARM Linux'" , Benjamin Gaignard CC: Alexandre Belloni , Baruch Siach , "patches@opensource.wolfsonmicro.com" , Linus Walleij , "linux-tegra@vger.kernel.org" , Thierry Reding , Pavel Machek , Thomas Gleixner , "x86@kernel.org" , Jonathan Hunter , Chen-Yu Tsai , Ingo Molnar , Sylvain Lemieux , Sebastian Hesselbarth , Len Brown , "linaro-kernel@lists.linaro.org" , "Jason Cooper" , "rtc-linux@googlegroups.com" , "linux-pm@vger.kernel.org" , Hans Ulli Kroll , "adi-buildroot-devel@lists.sourceforge.net" , Vladimir Zapolskiy , John Stultz , Gregory Clement , Michael Chan , "linux-arm-kernel@lists.infradead.org" , Alessandro Zummo , Barry Song , Support Opensource , "netdev@vger.kernel.org" , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Steve Twiss , Maxime Ripard Subject: RE: [PATCH 00/51] rtc: stop using rtc deprecated functions Thread-Topic: [PATCH 00/51] rtc: stop using rtc deprecated functions Thread-Index: AQHS6gp+nFWdbC8p6Uix0tds0keIg6IvCueQ Date: Wed, 21 Jun 2017 09:26:51 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD00278C0@AcuExch.aculab.com> References: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> <20170620100348.zh4ygvjjgnhxvmvl@piout.net> <20170620121011.GA13221@amd> <20170620122400.sm7qqvwyj6cuzarw@piout.net> <20170620132620.GA16881@amd> <6ED8E3B22081A4459DAC7699F3695FB7018CD96FCD@SW-EX-MBX02.diasemi.com> <20170620134458.GA10104@amd> <20170620134827.ubvzhh25klaotupv@piout.net> <20170620211536.GM4902@n2100.armlinux.org.uk> In-Reply-To: <20170620211536.GM4902@n2100.armlinux.org.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 22 From: Russell King - ARM Linux > Sent: 20 June 2017 22:16 .. > Consider that at the moment, we define the 32-bit RTC representation to > start at a well known epoch. We _could_ decide that when it wraps to > 0x80000000 seconds, we'll define the lower 0x40000000 seconds to mean > dates in the future - and keep rolling that forward each time we cross > another 0x40000000 seconds. Unless someone invents a real time machine, > we shouldn't need to set a modern RTC back to 1970. True, just treating the value as unsigned gives another 67 years. If a 32bit RTC is programmed with the low 32bits of the 64bit 'seconds since 1970' the kernel should have no real difficulty sorting out the high bits from other available information. Problems with things like the x86 bios setting the rtc to stupid values are another matter. ISTR the rtc chip has a bit for 'summertime' that is never set, on a multi-os system you can get multiple summer time changes. David