aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-10-01 02:28:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:27 -0400
commit8ef386092d7c2891bd7acefb2a87f878f7e9a0d6 (patch)
treeb149f0c63f9b9bb3f43e82097f1ae5972662288f /arch/mips
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/mips')
-rw-r--r--arch/mips/kernel/time.c12
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c2
2 files changed, 1 insertions, 13 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 6ab8d975a974..845c7e55505d 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -47,8 +47,6 @@
47/* 47/*
48 * forward reference 48 * forward reference
49 */ 49 */
50extern volatile unsigned long wall_jiffies;
51
52DEFINE_SPINLOCK(rtc_lock); 50DEFINE_SPINLOCK(rtc_lock);
53 51
54/* 52/*
@@ -159,7 +157,6 @@ void (*mips_hpt_init)(unsigned int);
159void do_gettimeofday(struct timeval *tv) 157void do_gettimeofday(struct timeval *tv)
160{ 158{
161 unsigned long seq; 159 unsigned long seq;
162 unsigned long lost;
163 unsigned long usec, sec; 160 unsigned long usec, sec;
164 unsigned long max_ntp_tick; 161 unsigned long max_ntp_tick;
165 162
@@ -168,8 +165,6 @@ void do_gettimeofday(struct timeval *tv)
168 165
169 usec = do_gettimeoffset(); 166 usec = do_gettimeoffset();
170 167
171 lost = jiffies - wall_jiffies;
172
173 /* 168 /*
174 * If time_adjust is negative then NTP is slowing the clock 169 * If time_adjust is negative then NTP is slowing the clock
175 * so make sure not to go into next possible interval. 170 * so make sure not to go into next possible interval.
@@ -178,11 +173,7 @@ void do_gettimeofday(struct timeval *tv)
178 if (unlikely(time_adjust < 0)) { 173 if (unlikely(time_adjust < 0)) {
179 max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; 174 max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
180 usec = min(usec, max_ntp_tick); 175 usec = min(usec, max_ntp_tick);
181 176 }
182 if (lost)
183 usec += lost * max_ntp_tick;
184 } else if (unlikely(lost))
185 usec += lost * (USEC_PER_SEC / HZ);
186 177
187 sec = xtime.tv_sec; 178 sec = xtime.tv_sec;
188 usec += (xtime.tv_nsec / 1000); 179 usec += (xtime.tv_nsec / 1000);
@@ -217,7 +208,6 @@ int do_settimeofday(struct timespec *tv)
217 * made, and then undo it! 208 * made, and then undo it!
218 */ 209 */
219 nsec -= do_gettimeoffset() * NSEC_PER_USEC; 210 nsec -= do_gettimeoffset() * NSEC_PER_USEC;
220 nsec -= (jiffies - wall_jiffies) * tick_nsec;
221 211
222 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); 212 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
223 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); 213 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index c62a3a9ef867..257ce118e380 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -42,8 +42,6 @@
42static unsigned long ct_cur[NR_CPUS]; /* What counter should be at next timer irq */ 42static unsigned long ct_cur[NR_CPUS]; /* What counter should be at next timer irq */
43static long last_rtc_update; /* Last time the rtc clock got updated */ 43static long last_rtc_update; /* Last time the rtc clock got updated */
44 44
45extern volatile unsigned long wall_jiffies;
46
47#if 0 45#if 0
48static int set_rtc_mmss(unsigned long nowtime) 46static int set_rtc_mmss(unsigned long nowtime)
49{ 47{