aboutsummaryrefslogtreecommitdiff
path: root/arch/ppc
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-09-30 23:28:31 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:27 -0700
commit8ef386092d7c2891bd7acefb2a87f878f7e9a0d6 (patch)
treeb149f0c63f9b9bb3f43e82097f1ae5972662288f /arch/ppc
parent70bc42f90a3f4721c89dbe865e6c95da8565b41c (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/ppc')
-rw-r--r--arch/ppc/kernel/time.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index 1e1f3155476..187388625a7 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -80,8 +80,6 @@ unsigned tb_to_us;
unsigned tb_last_stamp;
unsigned long tb_to_ns_scale;
-extern unsigned long wall_jiffies;
-
/* used for timezone offset */
static long timezone_offset;
@@ -173,8 +171,7 @@ void timer_interrupt(struct pt_regs * regs)
*/
if ( ppc_md.set_rtc_time && ntp_synced() &&
xtime.tv_sec - last_rtc_update >= 659 &&
- abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
- jiffies - wall_jiffies == 1) {
+ abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ) {
if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
last_rtc_update = xtime.tv_sec+1;
else
@@ -200,7 +197,7 @@ void do_gettimeofday(struct timeval *tv)
{
unsigned long flags;
unsigned long seq;
- unsigned delta, lost_ticks, usec, sec;
+ unsigned delta, usec, sec;
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
@@ -214,10 +211,9 @@ void do_gettimeofday(struct timeval *tv)
if (!smp_tb_synchronized)
delta = 0;
#endif /* CONFIG_SMP */
- lost_ticks = jiffies - wall_jiffies;
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
- usec += mulhwu(tb_to_us, tb_ticks_per_jiffy * lost_ticks + delta);
+ usec += mulhwu(tb_to_us, delta);
while (usec >= 1000000) {
sec++;
usec -= 1000000;
@@ -258,7 +254,6 @@ int do_settimeofday(struct timespec *tv)
* still reasonable when gettimeofday resolution is 1 jiffy.
*/
tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id()));
- tb_delta += (jiffies - wall_jiffies) * tb_ticks_per_jiffy;
new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta);