From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 22:15:36 +0100 Message-ID: <20170620211536.GM4902@n2100.armlinux.org.uk> 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> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Content-Disposition: inline In-Reply-To: Sender: Russell King - ARM Linux List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Benjamin Gaignard Cc: Alexandre Belloni , Baruch Siach , "patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org" , Linus Walleij , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Thierry Reding , Pavel Machek , Thomas Gleixner , "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" , "linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Hans List-Id: linux-tegra@vger.kernel.org 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. If we convert the 32-bit counter RTC drivers to use 64-bit conversions, then we're completely stuffed, because the lower 32-bits will always be relative to the epoch, and we can't change that without breaking the 64-bit users. So, keep the 32-bit conversion functions, do not deprecate them, and think about the future possibilities. I really think this "get rid of 32-bit time representations" is a much to narrow focus on the wrong problem. You can't ever fix 32-bit time representations by just adding additional zeros into the MSB bits. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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 S1752711AbdFTVQT (ORCPT ); Tue, 20 Jun 2017 17:16:19 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:36962 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752585AbdFTVQN (ORCPT ); Tue, 20 Jun 2017 17:16:13 -0400 Date: Tue, 20 Jun 2017 22:15:36 +0100 From: Russell King - ARM Linux To: 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 Message-ID: <20170620211536.GM4902@n2100.armlinux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. If we convert the 32-bit counter RTC drivers to use 64-bit conversions, then we're completely stuffed, because the lower 32-bits will always be relative to the epoch, and we can't change that without breaking the 64-bit users. So, keep the 32-bit conversion functions, do not deprecate them, and think about the future possibilities. I really think this "get rid of 32-bit time representations" is a much to narrow focus on the wrong problem. You can't ever fix 32-bit time representations by just adding additional zeros into the MSB bits. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk. [2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by gmr-mx.google.com with ESMTPS id i19si4236714wme.2.2017.06.20.14.16.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 20 Jun 2017 14:16:28 -0700 (PDT) Date: Tue, 20 Jun 2017 22:15:36 +0100 From: Russell King - ARM Linux To: 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: [rtc-linux] Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Message-ID: <20170620211536.GM4902@n2100.armlinux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" In-Reply-To: Sender: Russell King - ARM Linux Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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. If we convert the 32-bit counter RTC drivers to use 64-bit conversions, then we're completely stuffed, because the lower 32-bits will always be relative to the epoch, and we can't change that without breaking the 64-bit users. So, keep the 32-bit conversion functions, do not deprecate them, and think about the future possibilities. I really think this "get rid of 32-bit time representations" is a much to narrow focus on the wrong problem. You can't ever fix 32-bit time representations by just adding additional zeros into the MSB bits. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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: Russell King - ARM Linux Subject: Re: [PATCH 00/51] rtc: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 22:15:36 +0100 Message-ID: <20170620211536.GM4902@n2100.armlinux.org.uk> 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> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Alexandre Belloni , Baruch Siach , "patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org" , Linus Walleij , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Thierry Reding , Pavel Machek , Thomas Gleixner , "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" , "linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Hans Ulli To: Benjamin Gaignard Return-path: Content-Disposition: inline In-Reply-To: Sender: Russell King - ARM Linux List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , List-Id: netdev.vger.kernel.org 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. If we convert the 32-bit counter RTC drivers to use 64-bit conversions, then we're completely stuffed, because the lower 32-bits will always be relative to the epoch, and we can't change that without breaking the 64-bit users. So, keep the 32-bit conversion functions, do not deprecate them, and think about the future possibilities. I really think this "get rid of 32-bit time representations" is a much to narrow focus on the wrong problem. You can't ever fix 32-bit time representations by just adding additional zeros into the MSB bits. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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: linux@armlinux.org.uk (Russell King - ARM Linux) Date: Tue, 20 Jun 2017 22:15:36 +0100 Subject: [PATCH 00/51] rtc: stop using rtc deprecated functions In-Reply-To: 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> Message-ID: <20170620211536.GM4902@n2100.armlinux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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. If we convert the 32-bit counter RTC drivers to use 64-bit conversions, then we're completely stuffed, because the lower 32-bits will always be relative to the epoch, and we can't change that without breaking the 64-bit users. So, keep the 32-bit conversion functions, do not deprecate them, and think about the future possibilities. I really think this "get rid of 32-bit time representations" is a much to narrow focus on the wrong problem. You can't ever fix 32-bit time representations by just adding additional zeros into the MSB bits. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.