diff options
author | Prarit Bhargava <prarit@redhat.com> | 2013-02-14 12:02:54 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-03-15 19:50:26 -0400 |
commit | 3195ef59cb42cda3aeeb24a7fd2ba1b900c4a3cc (patch) | |
tree | e439d7cd1a3242ccff03521657699f9e9497bf13 /arch/x86/Kconfig | |
parent | 7859e404ae73fe4f38b8cfc1af19ea82f153084e (diff) |
x86: Do full rtc synchronization with ntp
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. This
was done originally to avoid setting the RTC if the RTC was in localtime
mode (common with Windows dualbooting). Other architectures do a full
synchronization and now that we have better infrastructure to detect
when the RTC is in localtime, 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.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: x86@kernel.org
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: linux-efi@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
[jstultz: Tweak commit message, fold in build fix found by fengguang
Also add select RTC_LIB to X86, per new dependency, as found by prarit]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch/x86/Kconfig')
-rw-r--r-- | arch/x86/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a4f24f5b1218..26bd79261532 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -120,6 +120,7 @@ config X86 | |||
120 | select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION | 120 | select OLD_SIGSUSPEND3 if X86_32 || IA32_EMULATION |
121 | select OLD_SIGACTION if X86_32 | 121 | select OLD_SIGACTION if X86_32 |
122 | select COMPAT_OLD_SIGACTION if IA32_EMULATION | 122 | select COMPAT_OLD_SIGACTION if IA32_EMULATION |
123 | select RTC_LIB | ||
123 | 124 | ||
124 | config INSTRUCTION_DECODER | 125 | config INSTRUCTION_DECODER |
125 | def_bool y | 126 | def_bool y |