diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index d27c7562902c..c1a178ca0f50 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -779,7 +779,7 @@ static cycle_t logarithmic_accumulation(cycle_t offset, int shift) | |||
779 | * | 779 | * |
780 | * Called from the timer interrupt, must hold a write on xtime_lock. | 780 | * Called from the timer interrupt, must hold a write on xtime_lock. |
781 | */ | 781 | */ |
782 | void update_wall_time(void) | 782 | static void update_wall_time(void) |
783 | { | 783 | { |
784 | struct clocksource *clock; | 784 | struct clocksource *clock; |
785 | cycle_t offset; | 785 | cycle_t offset; |
@@ -946,3 +946,15 @@ struct timespec get_monotonic_coarse(void) | |||
946 | now.tv_nsec + mono.tv_nsec); | 946 | now.tv_nsec + mono.tv_nsec); |
947 | return now; | 947 | return now; |
948 | } | 948 | } |
949 | |||
950 | /* | ||
951 | * The 64-bit jiffies value is not atomic - you MUST NOT read it | ||
952 | * without sampling the sequence number in xtime_lock. | ||
953 | * jiffies is defined in the linker script... | ||
954 | */ | ||
955 | void do_timer(unsigned long ticks) | ||
956 | { | ||
957 | jiffies_64 += ticks; | ||
958 | update_wall_time(); | ||
959 | calc_global_load(ticks); | ||
960 | } | ||