diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-10-01 02:28:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:27 -0400 |
commit | 8ef386092d7c2891bd7acefb2a87f878f7e9a0d6 (patch) | |
tree | b149f0c63f9b9bb3f43e82097f1ae5972662288f /arch/arm/kernel/time.c | |
parent | 70bc42f90a3f4721c89dbe865e6c95da8565b41c (diff) |
[PATCH] kill wall_jiffies
With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
So we can kill wall_jiffies completely.
This is just a cleanup and logically should not change any real behavior
except for one thing: RTC updating code in (old) ppc and xtensa use a
condition "jiffies - wall_jiffies == 1". This condition is never met so I
suppose it is just a bug. I just remove that condition only instead of
kill the whole "if" block.
[heiko.carstens@de.ibm.com: s390 build fix and cleanup]
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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); |