[PATCH] time: add barrier after updating jiffies_64
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Mon, 6 Mar 2006 23:42:51 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 7 Mar 2006 02:40:44 +0000 (18:40 -0800)
Add a compiler barrier so that we don't read jiffies before updating
jiffies_64.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/timer.c

index 8256f3f5ec0d1db576787e58923d80f4b83c7e57..bf7c4193b936ee1723281db43f46daba7de1165b 100644 (file)
@@ -941,6 +941,8 @@ static inline void update_times(void)
 void do_timer(struct pt_regs *regs)
 {
        jiffies_64++;
+       /* prevent loading jiffies before storing new jiffies_64 value. */
+       barrier();
        update_times();
        softlockup_tick(regs);
 }