From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Date: Wed, 21 Jun 2017 00:00:30 +0200 (CEST) Message-ID: References: <20170620213507.urobmtg34vzubrdq@piout.net> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <20170620213507.urobmtg34vzubrdq-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Alexandre Belloni Cc: Russell King - ARM Linux , Benjamin Gaignard , Baruch Siach , "patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org" , Linus Walleij , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Thierry Reding , Pavel Machek , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , Jonathan Hunter , Chen-Yu Tsai , Ingo Molnar , Sylvain Lemieux , Sebastian Hesselbarth , Len Brown , "linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org" , Jason Cooper , "rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org" l List-Id: linux-tegra@vger.kernel.org On Tue, 20 Jun 2017, Alexandre Belloni wrote: > On 20/06/2017 at 22:15:36 +0100, Russell King - ARM Linux wrote: > > On Tue, Jun 20, 2017 at 05:07:46PM +0200, Benjamin Gaignard wrote: > > > 2017-06-20 15:48 GMT+02:00 Alexandre Belloni > > > : > > > >> Yes, that's argument against changing rtc _drivers_ for hardware that > > > >> can not do better than 32bit. For generic code (such as 44/51 sysfs, > > > >> 51/51 suspend test), the change still makes sense. > > > > > > What I had in mind when writing those patches was to remove the limitations > > > coming from those functions usage, even more since they been marked has > > > deprecated. > > > > I'd say that they should not be marked as deprecated. They're entirely > > appropriate for use with hardware that only supports a 32-bit > > representation of time. > > > > It's entirely reasonable to fix the ones that use other representations > > that exceed that, but for those which do not, we need to keep using the > > 32-bit versions. Doing so actually gives us _more_ flexibility in the > > future. > > > > 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. > > > > 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? 2) Deal with creative vendors who have their own idea about the 'start of the epoch' 3) Add the information of wraparound time to the rtc device which needs to be filled in for each device. That way the rtc_*** accessor functions can deal with them whether they wrap in 2038 or 2100 or whatever. #3 is the simplest problem of them :) > My opinion is that as long as userspace is not ready to handle those > dates, it doesn't really matter because it is quite unlikely that > anything will be able to continue running anyway. That's a different story. Making the kernel y2038 ready in general is a good thing. Whether userspace will be ready by then or not is completely irrelevant. Thanks, tglx -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbdFTWBP (ORCPT ); Tue, 20 Jun 2017 18:01:15 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46320 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752519AbdFTWBN (ORCPT ); Tue, 20 Jun 2017 18:01:13 -0400 Date: Wed, 21 Jun 2017 00:00:30 +0200 (CEST) From: Thomas Gleixner To: Alexandre Belloni cc: Russell King - ARM Linux , Benjamin Gaignard , Baruch Siach , "patches@opensource.wolfsonmicro.com" , Linus Walleij , "linux-tegra@vger.kernel.org" , Thierry Reding , Pavel Machek , "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 In-Reply-To: <20170620213507.urobmtg34vzubrdq@piout.net> Message-ID: References: <20170620213507.urobmtg34vzubrdq@piout.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Jun 2017, Alexandre Belloni wrote: > On 20/06/2017 at 22:15:36 +0100, Russell King - ARM Linux wrote: > > On Tue, Jun 20, 2017 at 05:07:46PM +0200, Benjamin Gaignard wrote: > > > 2017-06-20 15:48 GMT+02:00 Alexandre Belloni > > > : > > > >> Yes, that's argument against changing rtc _drivers_ for hardware that > > > >> can not do better than 32bit. For generic code (such as 44/51 sysfs, > > > >> 51/51 suspend test), the change still makes sense. > > > > > > What I had in mind when writing those patches was to remove the limitations > > > coming from those functions usage, even more since they been marked has > > > deprecated. > > > > I'd say that they should not be marked as deprecated. They're entirely > > appropriate for use with hardware that only supports a 32-bit > > representation of time. > > > > It's entirely reasonable to fix the ones that use other representations > > that exceed that, but for those which do not, we need to keep using the > > 32-bit versions. Doing so actually gives us _more_ flexibility in the > > future. > > > > 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. > > > > 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? 2) Deal with creative vendors who have their own idea about the 'start of the epoch' 3) Add the information of wraparound time to the rtc device which needs to be filled in for each device. That way the rtc_*** accessor functions can deal with them whether they wrap in 2038 or 2100 or whatever. #3 is the simplest problem of them :) > My opinion is that as long as userspace is not ready to handle those > dates, it doesn't really matter because it is quite unlikely that > anything will be able to continue running anyway. That's a different story. Making the kernel y2038 ready in general is a good thing. Whether userspace will be ready by then or not is completely irrelevant. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from Galois.linutronix.de (Galois.linutronix.de. [2a01:7a0:2:106d:700::1]) by gmr-mx.google.com with ESMTPS id o27si3418933wmi.4.2017.06.20.15.00.56 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 20 Jun 2017 15:00:56 -0700 (PDT) Date: Wed, 21 Jun 2017 00:00:30 +0200 (CEST) From: Thomas Gleixner To: Alexandre Belloni cc: Russell King - ARM Linux , Benjamin Gaignard , Baruch Siach , "patches@opensource.wolfsonmicro.com" , Linus Walleij , "linux-tegra@vger.kernel.org" , Thierry Reding , Pavel Machek , "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: [rtc-linux] Re: [PATCH 00/51] rtc: stop using rtc deprecated functions In-Reply-To: <20170620213507.urobmtg34vzubrdq@piout.net> Message-ID: References: <20170620213507.urobmtg34vzubrdq@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On Tue, 20 Jun 2017, Alexandre Belloni wrote: > On 20/06/2017 at 22:15:36 +0100, Russell King - ARM Linux wrote: > > On Tue, Jun 20, 2017 at 05:07:46PM +0200, Benjamin Gaignard wrote: > > > 2017-06-20 15:48 GMT+02:00 Alexandre Belloni > > > : > > > >> Yes, that's argument against changing rtc _drivers_ for hardware that > > > >> can not do better than 32bit. For generic code (such as 44/51 sysfs, > > > >> 51/51 suspend test), the change still makes sense. > > > > > > What I had in mind when writing those patches was to remove the limitations > > > coming from those functions usage, even more since they been marked has > > > deprecated. > > > > I'd say that they should not be marked as deprecated. They're entirely > > appropriate for use with hardware that only supports a 32-bit > > representation of time. > > > > It's entirely reasonable to fix the ones that use other representations > > that exceed that, but for those which do not, we need to keep using the > > 32-bit versions. Doing so actually gives us _more_ flexibility in the > > future. > > > > 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. > > > > 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? 2) Deal with creative vendors who have their own idea about the 'start of the epoch' 3) Add the information of wraparound time to the rtc device which needs to be filled in for each device. That way the rtc_*** accessor functions can deal with them whether they wrap in 2038 or 2100 or whatever. #3 is the simplest problem of them :) > My opinion is that as long as userspace is not ready to handle those > dates, it doesn't really matter because it is quite unlikely that > anything will be able to continue running anyway. That's a different story. Making the kernel y2038 ready in general is a good thing. Whether userspace will be ready by then or not is completely irrelevant. Thanks, tglx -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Date: Wed, 21 Jun 2017 00:00:30 +0200 (CEST) Message-ID: References: <20170620213507.urobmtg34vzubrdq@piout.net> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Russell King - ARM Linux , Benjamin Gaignard , Baruch Siach , "patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org" , Linus Walleij , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Thierry Reding , Pavel Machek , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , Jonathan Hunter , Chen-Yu Tsai , Ingo Molnar , Sylvain Lemieux , Sebastian Hesselbarth , Len Brown , "linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org" , Jason Cooper , "rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org" , "l To: Alexandre Belloni Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <20170620213507.urobmtg34vzubrdq-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , List-Id: netdev.vger.kernel.org On Tue, 20 Jun 2017, Alexandre Belloni wrote: > On 20/06/2017 at 22:15:36 +0100, Russell King - ARM Linux wrote: > > On Tue, Jun 20, 2017 at 05:07:46PM +0200, Benjamin Gaignard wrote: > > > 2017-06-20 15:48 GMT+02:00 Alexandre Belloni > > > : > > > >> Yes, that's argument against changing rtc _drivers_ for hardware that > > > >> can not do better than 32bit. For generic code (such as 44/51 sysfs, > > > >> 51/51 suspend test), the change still makes sense. > > > > > > What I had in mind when writing those patches was to remove the limitations > > > coming from those functions usage, even more since they been marked has > > > deprecated. > > > > I'd say that they should not be marked as deprecated. They're entirely > > appropriate for use with hardware that only supports a 32-bit > > representation of time. > > > > It's entirely reasonable to fix the ones that use other representations > > that exceed that, but for those which do not, we need to keep using the > > 32-bit versions. Doing so actually gives us _more_ flexibility in the > > future. > > > > 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. > > > > 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? 2) Deal with creative vendors who have their own idea about the 'start of the epoch' 3) Add the information of wraparound time to the rtc device which needs to be filled in for each device. That way the rtc_*** accessor functions can deal with them whether they wrap in 2038 or 2100 or whatever. #3 is the simplest problem of them :) > My opinion is that as long as userspace is not ready to handle those > dates, it doesn't really matter because it is quite unlikely that > anything will be able to continue running anyway. That's a different story. Making the kernel y2038 ready in general is a good thing. Whether userspace will be ready by then or not is completely irrelevant. Thanks, tglx -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: tglx@linutronix.de (Thomas Gleixner) Date: Wed, 21 Jun 2017 00:00:30 +0200 (CEST) Subject: [PATCH 00/51] rtc: stop using rtc deprecated functions In-Reply-To: <20170620213507.urobmtg34vzubrdq@piout.net> References: <20170620213507.urobmtg34vzubrdq@piout.net> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, 20 Jun 2017, Alexandre Belloni wrote: > On 20/06/2017 at 22:15:36 +0100, Russell King - ARM Linux wrote: > > On Tue, Jun 20, 2017 at 05:07:46PM +0200, Benjamin Gaignard wrote: > > > 2017-06-20 15:48 GMT+02:00 Alexandre Belloni > > > : > > > >> Yes, that's argument against changing rtc _drivers_ for hardware that > > > >> can not do better than 32bit. For generic code (such as 44/51 sysfs, > > > >> 51/51 suspend test), the change still makes sense. > > > > > > What I had in mind when writing those patches was to remove the limitations > > > coming from those functions usage, even more since they been marked has > > > deprecated. > > > > I'd say that they should not be marked as deprecated. They're entirely > > appropriate for use with hardware that only supports a 32-bit > > representation of time. > > > > It's entirely reasonable to fix the ones that use other representations > > that exceed that, but for those which do not, we need to keep using the > > 32-bit versions. Doing so actually gives us _more_ flexibility in the > > future. > > > > 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. > > > > 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? 2) Deal with creative vendors who have their own idea about the 'start of the epoch' 3) Add the information of wraparound time to the rtc device which needs to be filled in for each device. That way the rtc_*** accessor functions can deal with them whether they wrap in 2038 or 2100 or whatever. #3 is the simplest problem of them :) > My opinion is that as long as userspace is not ready to handle those > dates, it doesn't really matter because it is quite unlikely that > anything will be able to continue running anyway. That's a different story. Making the kernel y2038 ready in general is a good thing. Whether userspace will be ready by then or not is completely irrelevant. Thanks, tglx