linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFE PATCH 0/2] x86, rtc, ntp, Enable full rtc synchronization
@ 2013-02-14 17:02 Prarit Bhargava
  2013-02-14 17:02 ` [RFE PATCH 1/2] x86, rtc, ntp, Do full rtc synchronization with ntp Prarit Bhargava
       [not found] ` <1360861375-24131-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Prarit Bhargava @ 2013-02-14 17:02 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Prarit Bhargava, Thomas Gleixner, John Stultz,
	x86-DgEjT+Ai2ygdnm+yROfE0A, Matt Fleming, David Vrabel,
	Andrew Morton, Andi Kleen, linux-efi-u79uwXL29TY76Z2rM5mHXA

This patchset enables a full rtc synchronization via ntp on x86.  The current
codebase (plus http://marc.info/?l=linux-kernel&m=136036689219340&w=2, which is
queued for tip), will attempt to synchronize the rtc to the system time every
11 minutes if ntp is running.

The problem in the current code is that the synchronization will only occur
if the system time is within +/-15 minutes of the current rtc time.  ie)
we only do a "partial" synchronization of the rtc.  Other architectures do
full synchronizations and the partial sync appears to be a software limitation.

This patchset introduces a full synchronization of the rtc, and allows the
writing of the rtc date and time via sysfs (read for date and time is already
implemented).

I tested this patch by using the write capability introduced in 2/2 to
write in older and newer dates into the rtc, and then rebooting with ntpdate,
and/or ntpdate enabled and verifying the correct setting of the hwclock (and
system time) via calls to date and hwclock (all on 64-bit x86)

I have not tested the mrst/vrtc.c code, however, code inspection indicates
that the only change required is the year offset of 1972.  I booted 32-bit
Fedora 18 on an UEFI system and confirmed that the system time and hwclock
were now correct at boot.

Signed-off-by: Prarit Bhargava <prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: David Vrabel <david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
Cc: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Andi Kleen <ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Prarit Bhargava (2):
  x86, rtc, ntp, Do full rtc synchronization with ntp
  rtc, add write functionality to sysfs

 arch/x86/kernel/rtc.c         | 69 ++++++----------------------------
 arch/x86/platform/efi/efi.c   | 24 ++++++++----
 arch/x86/platform/mrst/vrtc.c | 41 ++++++++++++---------
 drivers/rtc/rtc-sysfs.c       | 86 ++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 136 insertions(+), 84 deletions(-)

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-02-28 18:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 17:02 [RFE PATCH 0/2] x86, rtc, ntp, Enable full rtc synchronization Prarit Bhargava
2013-02-14 17:02 ` [RFE PATCH 1/2] x86, rtc, ntp, Do full rtc synchronization with ntp Prarit Bhargava
     [not found]   ` <1360861375-24131-2-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-22 20:42     ` John Stultz
     [not found]       ` <5127D853.6030703-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-24 17:12         ` Prarit Bhargava
     [not found]           ` <512A4A19.2090800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-25 15:04             ` Alessandro Zummo
     [not found] ` <1360861375-24131-1-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-14 17:02   ` [RFE PATCH 2/2] rtc, add write functionality to sysfs Prarit Bhargava
     [not found]     ` <1360861375-24131-3-git-send-email-prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-22 20:43       ` John Stultz
     [not found]         ` <5127D884.6020701-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-22 20:55           ` Prarit Bhargava
2013-02-22 21:05             ` John Stultz
     [not found]               ` <5127DDAF.2000403-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-23 23:11                 ` Alessandro Zummo
     [not found]                   ` <B22B05C4-B8D2-44B9-971B-37913DE59EF6-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>
2013-02-24 17:03                     ` Prarit Bhargava
     [not found]                       ` <512A47C5.3010500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-25 14:58                         ` Alessandro Zummo
     [not found]                           ` <20130225155812.0758e093-7UIfgwKH8t5lecnr3/Sf3RLwuzhV/fVh@public.gmane.org>
2013-02-28 14:50                             ` Prarit Bhargava
2013-02-28 18:51                       ` John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).