[PATCH] time: add barrier after updating jiffies_64

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>
This commit is contained in:
Atsushi Nemoto 2006-03-06 15:42:51 -08:00 committed by Linus Torvalds
parent a615fa8395
commit 5aee405c66

View 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);
}