From: Atsushi Nemoto Date: Mon, 6 Mar 2006 23:42:51 +0000 (-0800) Subject: [PATCH] time: add barrier after updating jiffies_64 X-Git-Tag: v2.6.16-rc6~96 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5aee405c662ca644980c184774277fc6d0769a84;p=linux-2.6-omap-h63xx.git [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 Cc: Ralf Baechle Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/timer.c b/kernel/timer.c index 8256f3f5ec0..bf7c4193b93 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -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); }