diff options
Diffstat (limited to 'arch/m68knommu/kernel/time.c')
-rw-r--r-- | arch/m68knommu/kernel/time.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index db1e1ce0a349..c5667bdddd5e 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
@@ -26,8 +26,6 @@ | |||
26 | 26 | ||
27 | #define TICK_SIZE (tick_nsec / 1000) | 27 | #define TICK_SIZE (tick_nsec / 1000) |
28 | 28 | ||
29 | extern unsigned long wall_jiffies; | ||
30 | |||
31 | 29 | ||
32 | static inline int set_rtc_mmss(unsigned long nowtime) | 30 | static inline int set_rtc_mmss(unsigned long nowtime) |
33 | { | 31 | { |
@@ -124,15 +122,12 @@ void time_init(void) | |||
124 | void do_gettimeofday(struct timeval *tv) | 122 | void do_gettimeofday(struct timeval *tv) |
125 | { | 123 | { |
126 | unsigned long flags; | 124 | unsigned long flags; |
127 | unsigned long lost, seq; | 125 | unsigned long seq; |
128 | unsigned long usec, sec; | 126 | unsigned long usec, sec; |
129 | 127 | ||
130 | do { | 128 | do { |
131 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 129 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
132 | usec = mach_gettimeoffset ? mach_gettimeoffset() : 0; | 130 | usec = mach_gettimeoffset ? mach_gettimeoffset() : 0; |
133 | lost = jiffies - wall_jiffies; | ||
134 | if (lost) | ||
135 | usec += lost * (1000000 / HZ); | ||
136 | sec = xtime.tv_sec; | 131 | sec = xtime.tv_sec; |
137 | usec += (xtime.tv_nsec / 1000); | 132 | usec += (xtime.tv_nsec / 1000); |
138 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 133 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |