Skip to content

x86, rtc, ntp, Enable full rtc synchronization

Prarit Bhargava linux-efi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86, rtc, ntp, Do full rtc synchronization with ntparch/x86/kernel/rtc.c arch/x86/platform/efi/efi.c arch/x86/platform/mrst/vrtc.c+52 -823 replies
2/2rtc, add write functionality to sysfsdrivers/rtc/rtc-sysfs.c+84 -28 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFE PATCH 0/2] x86, rtc, ntp, Enable full rtc synchronization

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.

Cc Thomas Gleixner <[email protected]>
Cc John Stultz <[email protected]>
Cc Matt Fleming <[email protected]>
Cc David Vrabel <[email protected]>
Cc Andrew Morton <akpm-de/[email protected]>
Cc Andi Kleen <ak-VuQAYsv1563Yd54FQh9/[email protected]>

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(-)
Signature · 1 line
1.8.1.2