History

Merge tag 'fortglx-3.20-time' of https://git.linaro.org/people/john.stultz/linux into timers/core

Pull time updates from John Stultz for 3.20: * ktime division optimization * Expose a few more y2038-safe timekeeping interfaces * RTC core changes to address y2038

Thomas Gleixner committed 11 years ago

Commit fe31fca2 parents 9bc7491 9a4a44510 files · +63 −46Browse files

Showing the changes to kernel/time (3 of 10 files). Show all

Unified · Split

3 files
  1. kernel/time/hrtimer.c +2 −2
  2. kernel/time/ntp.c +2 −2
  3. kernel/time/timekeeping.c +6 −6
kernel/time/hrtimer.c+2−2
@@ -266,7 +266,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) · 265 unmodified lines
266266 /*
267267 * Divide a ktime value by a nanosecond value
268268 */
269−u64 ktime_divns(const ktime_t kt, s64 div)
269+u64 __ktime_divns(const ktime_t kt, s64 div)
270270 {
271271 u64 dclc;
272272 int sft = 0;
@@ -282,7 +282,7 @@ u64 ktime_divns(const ktime_t kt, s64 div) · 9 unmodified lines
282282
283283 return dclc;
284284 }
285−EXPORT_SYMBOL_GPL(ktime_divns);
285+EXPORT_SYMBOL_GPL(__ktime_divns);
286286 #endif /* BITS_PER_LONG >= 64 */
287287
288288 /*
kernel/time/ntp.c+2−2
@@ -488,13 +488,13 @@ static void sync_cmos_clock(struct work_struct *work) · 487 unmodified lines
488488
489489 getnstimeofday64(&now);
490490 if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec * 5) {
491− struct timespec adjust = timespec64_to_timespec(now);
491+ struct timespec64 adjust = now;
492492
493493 fail = -ENODEV;
494494 if (persistent_clock_is_local)
495495 adjust.tv_sec -= (sys_tz.tz_minuteswest * 60);
496496 #ifdef CONFIG_GENERIC_CMOS_UPDATE
497− fail = update_persistent_clock(adjust);
497+ fail = update_persistent_clock(timespec64_to_timespec(adjust));
498498 #endif
499499 #ifdef CONFIG_RTC_SYSTOHC
500500 if (fail == -ENODEV)
kernel/time/timekeeping.c+6−6
@@ -1659,24 +1659,24 @@ out: · 1658 unmodified lines
16591659 }
16601660
16611661 /**
1662− * getboottime - Return the real time of system boot.
1663− * @ts: pointer to the timespec to be set
1662+ * getboottime64 - Return the real time of system boot.
1663+ * @ts: pointer to the timespec64 to be set
16641664 *
1665− * Returns the wall-time of boot in a timespec.
1665+ * Returns the wall-time of boot in a timespec64.
16661666 *
16671667 * This is based on the wall_to_monotonic offset and the total suspend
16681668 * time. Calls to settimeofday will affect the value returned (which
16691669 * basically means that however wrong your real time clock is at boot time,
16701670 * you get the right time here).
16711671 */
1672−void getboottime(struct timespec *ts)
1672+void getboottime64(struct timespec64 *ts)
16731673 {
16741674 struct timekeeper *tk = &tk_core.timekeeper;
16751675 ktime_t t = ktime_sub(tk->offs_real, tk->offs_boot);
16761676
1677− *ts = ktime_to_timespec(t);
1677+ *ts = ktime_to_timespec64(t);
16781678 }
1679−EXPORT_SYMBOL_GPL(getboottime);
1679+EXPORT_SYMBOL_GPL(getboottime64);
16801680
16811681 unsigned long get_seconds(void)
16821682 {