diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 7faaa32fbf4f..39f6177fafac 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -622,6 +622,7 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state) | |||
622 | write_sequnlock_irqrestore(&xtime_lock, flags); | 622 | write_sequnlock_irqrestore(&xtime_lock, flags); |
623 | 623 | ||
624 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); | 624 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); |
625 | clocksource_suspend(); | ||
625 | 626 | ||
626 | return 0; | 627 | return 0; |
627 | } | 628 | } |
@@ -817,7 +818,8 @@ void update_wall_time(void) | |||
817 | shift = min(shift, maxshift); | 818 | shift = min(shift, maxshift); |
818 | while (offset >= timekeeper.cycle_interval) { | 819 | while (offset >= timekeeper.cycle_interval) { |
819 | offset = logarithmic_accumulation(offset, shift); | 820 | offset = logarithmic_accumulation(offset, shift); |
820 | shift--; | 821 | if(offset < timekeeper.cycle_interval<<shift) |
822 | shift--; | ||
821 | } | 823 | } |
822 | 824 | ||
823 | /* correct the clock when NTP error is too big */ | 825 | /* correct the clock when NTP error is too big */ |
@@ -880,6 +882,7 @@ void getboottime(struct timespec *ts) | |||
880 | 882 | ||
881 | set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec); | 883 | set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec); |
882 | } | 884 | } |
885 | EXPORT_SYMBOL_GPL(getboottime); | ||
883 | 886 | ||
884 | /** | 887 | /** |
885 | * monotonic_to_bootbased - Convert the monotonic time to boot based. | 888 | * monotonic_to_bootbased - Convert the monotonic time to boot based. |
@@ -889,6 +892,7 @@ void monotonic_to_bootbased(struct timespec *ts) | |||
889 | { | 892 | { |
890 | *ts = timespec_add_safe(*ts, total_sleep_time); | 893 | *ts = timespec_add_safe(*ts, total_sleep_time); |
891 | } | 894 | } |
895 | EXPORT_SYMBOL_GPL(monotonic_to_bootbased); | ||
892 | 896 | ||
893 | unsigned long get_seconds(void) | 897 | unsigned long get_seconds(void) |
894 | { | 898 | { |