diff options
Diffstat (limited to 'arch/sh64/kernel')
-rw-r--r-- | arch/sh64/kernel/time.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index 3b61e06f9d72..9c4a38a8698c 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c | |||
@@ -107,8 +107,6 @@ | |||
107 | 107 | ||
108 | #define TICK_SIZE (tick_nsec / 1000) | 108 | #define TICK_SIZE (tick_nsec / 1000) |
109 | 109 | ||
110 | extern unsigned long wall_jiffies; | ||
111 | |||
112 | static unsigned long tmu_base, rtc_base; | 110 | static unsigned long tmu_base, rtc_base; |
113 | unsigned long cprc_base; | 111 | unsigned long cprc_base; |
114 | 112 | ||
@@ -194,13 +192,6 @@ void do_gettimeofday(struct timeval *tv) | |||
194 | do { | 192 | do { |
195 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 193 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
196 | usec = usecs_since_tick(); | 194 | usec = usecs_since_tick(); |
197 | { | ||
198 | unsigned long lost = jiffies - wall_jiffies; | ||
199 | |||
200 | if (lost) | ||
201 | usec += lost * (1000000 / HZ); | ||
202 | } | ||
203 | |||
204 | sec = xtime.tv_sec; | 195 | sec = xtime.tv_sec; |
205 | usec += xtime.tv_nsec / 1000; | 196 | usec += xtime.tv_nsec / 1000; |
206 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 197 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
@@ -229,8 +220,7 @@ int do_settimeofday(struct timespec *tv) | |||
229 | * wall time. Discover what correction gettimeofday() would have | 220 | * wall time. Discover what correction gettimeofday() would have |
230 | * made, and then undo it! | 221 | * made, and then undo it! |
231 | */ | 222 | */ |
232 | nsec -= 1000 * (usecs_since_tick() + | 223 | nsec -= 1000 * usecs_since_tick(); |
233 | (jiffies - wall_jiffies) * (1000000 / HZ)); | ||
234 | 224 | ||
235 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | 225 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); |
236 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | 226 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); |