diff options
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r-- | arch/arm/kernel/time.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index f7d5165796ef..b030320b17c7 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -37,8 +37,6 @@ | |||
37 | */ | 37 | */ |
38 | struct sys_timer *system_timer; | 38 | struct sys_timer *system_timer; |
39 | 39 | ||
40 | extern unsigned long wall_jiffies; | ||
41 | |||
42 | /* this needs a better home */ | 40 | /* this needs a better home */ |
43 | DEFINE_SPINLOCK(rtc_lock); | 41 | DEFINE_SPINLOCK(rtc_lock); |
44 | 42 | ||
@@ -237,16 +235,11 @@ void do_gettimeofday(struct timeval *tv) | |||
237 | { | 235 | { |
238 | unsigned long flags; | 236 | unsigned long flags; |
239 | unsigned long seq; | 237 | unsigned long seq; |
240 | unsigned long usec, sec, lost; | 238 | unsigned long usec, sec; |
241 | 239 | ||
242 | do { | 240 | do { |
243 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 241 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
244 | usec = system_timer->offset(); | 242 | usec = system_timer->offset(); |
245 | |||
246 | lost = jiffies - wall_jiffies; | ||
247 | if (lost) | ||
248 | usec += lost * USECS_PER_JIFFY; | ||
249 | |||
250 | sec = xtime.tv_sec; | 243 | sec = xtime.tv_sec; |
251 | usec += xtime.tv_nsec / 1000; | 244 | usec += xtime.tv_nsec / 1000; |
252 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 245 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
@@ -279,7 +272,6 @@ int do_settimeofday(struct timespec *tv) | |||
279 | * done, and then undo it! | 272 | * done, and then undo it! |
280 | */ | 273 | */ |
281 | nsec -= system_timer->offset() * NSEC_PER_USEC; | 274 | nsec -= system_timer->offset() * NSEC_PER_USEC; |
282 | nsec -= (jiffies - wall_jiffies) * TICK_NSEC; | ||
283 | 275 | ||
284 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | 276 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); |
285 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | 277 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); |