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
Showing the changes to kernel (3 of 10 files). Show all
Unified · Split
| @@ -266,7 +266,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) · 265 unmodified lines | ||
| 266 | 266 | /* |
| 267 | 267 | * Divide a ktime value by a nanosecond value |
| 268 | 268 | */ |
| 269 | −u64 ktime_divns(const ktime_t kt, s64 div) | |
| 269 | +u64 __ktime_divns(const ktime_t kt, s64 div) | |
| 270 | 270 | { |
| 271 | 271 | u64 dclc; |
| 272 | 272 | int sft = 0; |
| @@ -282,7 +282,7 @@ u64 ktime_divns(const ktime_t kt, s64 div) · 9 unmodified lines | ||
| 282 | 282 | |
| 283 | 283 | return dclc; |
| 284 | 284 | } |
| 285 | −EXPORT_SYMBOL_GPL(ktime_divns); | |
| 285 | +EXPORT_SYMBOL_GPL(__ktime_divns); | |
| 286 | 286 | #endif /* BITS_PER_LONG >= 64 */ |
| 287 | 287 | |
| 288 | 288 | /* |
| @@ -488,13 +488,13 @@ static void sync_cmos_clock(struct work_struct *work) · 487 unmodified lines | ||
| 488 | 488 | |
| 489 | 489 | getnstimeofday64(&now); |
| 490 | 490 | 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; | |
| 492 | 492 | |
| 493 | 493 | fail = -ENODEV; |
| 494 | 494 | if (persistent_clock_is_local) |
| 495 | 495 | adjust.tv_sec -= (sys_tz.tz_minuteswest * 60); |
| 496 | 496 | #ifdef CONFIG_GENERIC_CMOS_UPDATE |
| 497 | − fail = update_persistent_clock(adjust); | |
| 497 | + fail = update_persistent_clock(timespec64_to_timespec(adjust)); | |
| 498 | 498 | #endif |
| 499 | 499 | #ifdef CONFIG_RTC_SYSTOHC |
| 500 | 500 | if (fail == -ENODEV) |
| @@ -1659,24 +1659,24 @@ out: · 1658 unmodified lines | ||
| 1659 | 1659 | } |
| 1660 | 1660 | |
| 1661 | 1661 | /** |
| 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 | |
| 1664 | 1664 | * |
| 1665 | − * Returns the wall-time of boot in a timespec. | |
| 1665 | + * Returns the wall-time of boot in a timespec64. | |
| 1666 | 1666 | * |
| 1667 | 1667 | * This is based on the wall_to_monotonic offset and the total suspend |
| 1668 | 1668 | * time. Calls to settimeofday will affect the value returned (which |
| 1669 | 1669 | * basically means that however wrong your real time clock is at boot time, |
| 1670 | 1670 | * you get the right time here). |
| 1671 | 1671 | */ |
| 1672 | −void getboottime(struct timespec *ts) | |
| 1672 | +void getboottime64(struct timespec64 *ts) | |
| 1673 | 1673 | { |
| 1674 | 1674 | struct timekeeper *tk = &tk_core.timekeeper; |
| 1675 | 1675 | ktime_t t = ktime_sub(tk->offs_real, tk->offs_boot); |
| 1676 | 1676 | |
| 1677 | − *ts = ktime_to_timespec(t); | |
| 1677 | + *ts = ktime_to_timespec64(t); | |
| 1678 | 1678 | } |
| 1679 | −EXPORT_SYMBOL_GPL(getboottime); | |
| 1679 | +EXPORT_SYMBOL_GPL(getboottime64); | |
| 1680 | 1680 | |
| 1681 | 1681 | unsigned long get_seconds(void) |
| 1682 | 1682 | { |