aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/time.h1
-rw-r--r--kernel/time/timekeeping.c14
-rw-r--r--kernel/timer.c13
3 files changed, 13 insertions, 15 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 1e6d3b59238d..86a9c487fdd8 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -166,7 +166,6 @@ extern void monotonic_to_bootbased(struct timespec *ts);
166extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 166extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
167extern int timekeeping_valid_for_hres(void); 167extern int timekeeping_valid_for_hres(void);
168extern u64 timekeeping_max_deferment(void); 168extern u64 timekeeping_max_deferment(void);
169extern void update_wall_time(void);
170extern void timekeeping_leap_insert(int leapsecond); 169extern void timekeeping_leap_insert(int leapsecond);
171 170
172struct tms; 171struct tms;
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 */
782void update_wall_time(void) 782static 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 */
955void do_timer(unsigned long ticks)
956{
957 jiffies_64 += ticks;
958 update_wall_time();
959 calc_global_load(ticks);
960}
diff --git a/kernel/timer.c b/kernel/timer.c
index 43ca9936f2d0..87f656cc2a55 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1293,19 +1293,6 @@ void run_local_timers(void)
1293 raise_softirq(TIMER_SOFTIRQ); 1293 raise_softirq(TIMER_SOFTIRQ);
1294} 1294}
1295 1295
1296/*
1297 * The 64-bit jiffies value is not atomic - you MUST NOT read it
1298 * without sampling the sequence number in xtime_lock.
1299 * jiffies is defined in the linker script...
1300 */
1301
1302void do_timer(unsigned long ticks)
1303{
1304 jiffies_64 += ticks;
1305 update_wall_time();
1306 calc_global_load(ticks);
1307}
1308
1309#ifdef __ARCH_WANT_SYS_ALARM 1296#ifdef __ARCH_WANT_SYS_ALARM
1310 1297
1311/* 1298/*