From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stultz Subject: Re: [RFE PATCH 1/2] x86, rtc, ntp, Do full rtc synchronization with ntp Date: Fri, 22 Feb 2013 12:42:59 -0800 Message-ID: <5127D853.6030703@linaro.org> References: <1360861375-24131-1-git-send-email-prarit@redhat.com> <1360861375-24131-2-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360861375-24131-2-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Prarit Bhargava Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Matt Fleming , David Vrabel , Andrew Morton , Andi Kleen , linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-efi@vger.kernel.org On 02/14/2013 09:02 AM, Prarit Bhargava wrote: > Every 11 minutes ntp attempts to update the x86 rtc with the current > system time. Currently, the x86 code only updates the rtc if the system > time is within +/-15 minutes of the current value of the rtc. Other > architectures do a full synchronization and there is no reason that x86 > should be software limited to a 30 minute window. > > This patch changes the behavior of the kernel to do a full synchronization > (year, month, day, hour, minute, and second) of the rtc when ntp requests > a synchronization between the system time and the rtc. > > I've used the RTC library functions in this patchset as they do all the > required bounds checking. > > Signed-off-by: Prarit Bhargava > Cc: Thomas Gleixner > Cc: John Stultz > Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org > Cc: Matt Fleming > Cc: David Vrabel > Cc: Andrew Morton > Cc: Andi Kleen > Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org This looks reasonable to me. Though I want to make sure we get this thoroughly tested by the various distros so we don't surprise anyone, since it has to potential to cause problems where folks are dualbooting windows (using a localtime RTC) and do not have their OS setup to trigger warp_clock to adjust for the localtime rtc (instead getting a time correction later via NTP). I'll queue it and see about getting it merged to -tip & -next. Then we'll have to decide if 3.10 or 3.11 is the right time frame to land it. thanks -john