[GIT PULL] timer changes for v3.9
Linus, Please pull the latest timers-core-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-core-for-linus HEAD: 36dfbbf136db0d645bacfd42ce7d9d6928ea532d timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet() Main changes: * ntp: Add CONFIG_RTC_SYSTOHC: a generic RTC driver facility complementing the existing CONFIG_RTC_HCTOSYS, which uses NTP to keep the hardware clock updated. * posix-timers: Fix clock_adjtime to always return timex data on success. This is changing the ABI, but no breakage was expected and found - caution is warranted nevertheless. * platform persistent clock improvements/cleanups. * clockevents: refactor timer broadcast handling to be more generic and less duplicated with matching architecture code. (mostly ARM motivated.) * various fixes and cleanups Thanks, Ingo --> Bernd Faust (1): Round the calculated scale factor in set_cyc2ns_scale() Bjorn Helgaas (1): x86/time/rtc: Don't print extended CMOS year when reading RTC Feng Tang (3): timekeeping: Add persistent_clock_exist flag rtc: Skip the suspend/resume handling if persistent clock exist timekeeping: Add CONFIG_HAS_PERSISTENT_CLOCK option Jason Gunthorpe (1): NTP: Add a CONFIG_RTC_SYSTOHC configuration John Stultz (3): MAINTAINERS: Update John Stultz's email x86: Select HAS_PERSISTENT_CLOCK on x86 timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK Kees Cook (1): time: create __getnstimeofday for WARNless calls Leonid Shatz (1): hrtimer: Prevent hrtimer_enqueue_reprogram race Mark Rutland (3): clockevents: Add generic timer broadcast receiver clockevents: Add generic timer broadcast function clockevents: Fix generic broadcast for FEAT_C3STOP Miroslav Lichvar (1): posix-timers: Fix clock_adjtime to always return timex data on success Prarit Bhargava (1): time, Fix setting of hardware clock in NTP code Satoru Takeuchi (1): timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet() Stanislaw Gruszka (1): posix-cpu-timers: Fix nanosleep task_struct leak MAINTAINERS| 2 +- arch/powerpc/kernel/time.c | 2 +- arch/x86/Kconfig | 1 + arch/x86/kernel/rtc.c | 1 - arch/x86/kernel/tsc.c | 3 ++- arch/x86/vdso/vclock_gettime.c | 2 +- drivers/rtc/Kconfig| 12 ++- drivers/rtc/Makefile | 1 + drivers/rtc/class.c| 7 +++ drivers/rtc/systohc.c | 44 + fs/pstore/ram.c| 10 +++--- include/linux/clockchips.h | 9 + include/linux/rtc.h| 1 + include/linux/time.h | 13 kernel/hrtimer.c | 36 - kernel/posix-cpu-timers.c | 23 +++-- kernel/posix-timers.c | 2 +- kernel/time.c | 8 kernel/time/Kconfig| 9 + kernel/time/ntp.c | 22 - kernel/time/tick-broadcast.c | 38 ++- kernel/time/timekeeping.c | 45 -- 22 files changed, 245 insertions(+), 46 deletions(-) create mode 100644 drivers/rtc/systohc.c diff --git a/MAINTAINERS b/MAINTAINERS index 212c255..f5bda78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6598,7 +6598,7 @@ F:drivers/dma/dw_dmac_regs.h F: drivers/dma/dw_dmac.c TIMEKEEPING, NTP -M: John Stultz +M: John Stultz M: Thomas Gleixner T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core S: Supported diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 127361e..aaba2e0 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -668,7 +668,7 @@ int update_persistent_clock(struct timespec now) struct rtc_time tm; if (!ppc_md.set_rtc_time) - return 0; + return -ENODEV; to_tm(now.tv_sec + 1 + timezone_offset, ); tm.tm_year -= 1900; diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 225543b..97b023f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -106,6 +106,7 @@ config X86 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) select GENERIC_TIME_VSYSCALL if X86_64 select KTIME_SCALAR if X86_32 + select ALWAYS_USE_PERSISTENT_CLOCK select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HAVE_CONTEXT_TRACKING if X86_64 diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 801602b..2e8f3d3 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -149,7 +149,6 @@ unsigned long mach_get_cmos_time(void) if (century)
[GIT PULL] timer changes for v3.9
Linus, Please pull the latest timers-core-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-core-for-linus HEAD: 36dfbbf136db0d645bacfd42ce7d9d6928ea532d timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet() Main changes: * ntp: Add CONFIG_RTC_SYSTOHC: a generic RTC driver facility complementing the existing CONFIG_RTC_HCTOSYS, which uses NTP to keep the hardware clock updated. * posix-timers: Fix clock_adjtime to always return timex data on success. This is changing the ABI, but no breakage was expected and found - caution is warranted nevertheless. * platform persistent clock improvements/cleanups. * clockevents: refactor timer broadcast handling to be more generic and less duplicated with matching architecture code. (mostly ARM motivated.) * various fixes and cleanups Thanks, Ingo -- Bernd Faust (1): Round the calculated scale factor in set_cyc2ns_scale() Bjorn Helgaas (1): x86/time/rtc: Don't print extended CMOS year when reading RTC Feng Tang (3): timekeeping: Add persistent_clock_exist flag rtc: Skip the suspend/resume handling if persistent clock exist timekeeping: Add CONFIG_HAS_PERSISTENT_CLOCK option Jason Gunthorpe (1): NTP: Add a CONFIG_RTC_SYSTOHC configuration John Stultz (3): MAINTAINERS: Update John Stultz's email x86: Select HAS_PERSISTENT_CLOCK on x86 timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK Kees Cook (1): time: create __getnstimeofday for WARNless calls Leonid Shatz (1): hrtimer: Prevent hrtimer_enqueue_reprogram race Mark Rutland (3): clockevents: Add generic timer broadcast receiver clockevents: Add generic timer broadcast function clockevents: Fix generic broadcast for FEAT_C3STOP Miroslav Lichvar (1): posix-timers: Fix clock_adjtime to always return timex data on success Prarit Bhargava (1): time, Fix setting of hardware clock in NTP code Satoru Takeuchi (1): timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet() Stanislaw Gruszka (1): posix-cpu-timers: Fix nanosleep task_struct leak MAINTAINERS| 2 +- arch/powerpc/kernel/time.c | 2 +- arch/x86/Kconfig | 1 + arch/x86/kernel/rtc.c | 1 - arch/x86/kernel/tsc.c | 3 ++- arch/x86/vdso/vclock_gettime.c | 2 +- drivers/rtc/Kconfig| 12 ++- drivers/rtc/Makefile | 1 + drivers/rtc/class.c| 7 +++ drivers/rtc/systohc.c | 44 + fs/pstore/ram.c| 10 +++--- include/linux/clockchips.h | 9 + include/linux/rtc.h| 1 + include/linux/time.h | 13 kernel/hrtimer.c | 36 - kernel/posix-cpu-timers.c | 23 +++-- kernel/posix-timers.c | 2 +- kernel/time.c | 8 kernel/time/Kconfig| 9 + kernel/time/ntp.c | 22 - kernel/time/tick-broadcast.c | 38 ++- kernel/time/timekeeping.c | 45 -- 22 files changed, 245 insertions(+), 46 deletions(-) create mode 100644 drivers/rtc/systohc.c diff --git a/MAINTAINERS b/MAINTAINERS index 212c255..f5bda78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6598,7 +6598,7 @@ F:drivers/dma/dw_dmac_regs.h F: drivers/dma/dw_dmac.c TIMEKEEPING, NTP -M: John Stultz johns...@us.ibm.com +M: John Stultz john.stu...@linaro.org M: Thomas Gleixner t...@linutronix.de T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core S: Supported diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 127361e..aaba2e0 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -668,7 +668,7 @@ int update_persistent_clock(struct timespec now) struct rtc_time tm; if (!ppc_md.set_rtc_time) - return 0; + return -ENODEV; to_tm(now.tv_sec + 1 + timezone_offset, tm); tm.tm_year -= 1900; diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 225543b..97b023f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -106,6 +106,7 @@ config X86 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 X86_LOCAL_APIC) select GENERIC_TIME_VSYSCALL if X86_64 select KTIME_SCALAR if X86_32 + select ALWAYS_USE_PERSISTENT_CLOCK select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HAVE_CONTEXT_TRACKING if X86_64 diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 801602b..2e8f3d3 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -149,7 +149,6 @@