Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 266d7ad7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer changes from Ingo Molnar:
 "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"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet()
  posix-cpu-timers: Fix nanosleep task_struct leak
  clockevents: Fix generic broadcast for FEAT_C3STOP
  time, Fix setting of hardware clock in NTP code
  hrtimer: Prevent hrtimer_enqueue_reprogram race
  clockevents: Add generic timer broadcast function
  clockevents: Add generic timer broadcast receiver
  timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK
  x86/time/rtc: Don't print extended CMOS year when reading RTC
  x86: Select HAS_PERSISTENT_CLOCK on x86
  timekeeping: Add CONFIG_HAS_PERSISTENT_CLOCK option
  rtc: Skip the suspend/resume handling if persistent clock exist
  timekeeping: Add persistent_clock_exist flag
  posix-timers: Fix clock_adjtime to always return timex data on success
  Round the calculated scale factor in set_cyc2ns_scale()
  NTP: Add a CONFIG_RTC_SYSTOHC configuration
  MAINTAINERS: Update John Stultz's email
  time: create __getnstimeofday for WARNless calls
parents bcbd818c 36dfbbf1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6588,7 +6588,7 @@ F: drivers/dma/dw_dmac_regs.h
F:	drivers/dma/dw_dmac.c

TIMEKEEPING, NTP
M:	John Stultz <johnstul@us.ibm.com>
M:	John Stultz <john.stultz@linaro.org>
M:	Thomas Gleixner <tglx@linutronix.de>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S:	Supported
+1 −1
Original line number Diff line number Diff line
@@ -669,7 +669,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;
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,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
+0 −1
Original line number Diff line number Diff line
@@ -149,7 +149,6 @@ unsigned long mach_get_cmos_time(void)
	if (century) {
		century = bcd2bin(century);
		year += century * 100;
		printk(KERN_INFO "Extended CMOS year: %d\n", century * 100);
	} else
		year += CMOS_YEARS_OFFS;

+2 −1
Original line number Diff line number Diff line
@@ -623,7 +623,8 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
	ns_now = __cycles_2_ns(tsc_now);

	if (cpu_khz) {
		*scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
		*scale = ((NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR) +
				cpu_khz / 2) / cpu_khz;
		*offset = ns_now - mult_frac(tsc_now, *scale,
					     (1UL << CYC2NS_SCALE_FACTOR));
	}
Loading