projects/linux·commit 5aee405c

[PATCH] time: add barrier after updating jiffies_64

5aee405c · Atsushi Nemoto <[email protected]> · 2006-03-06 15:42:51 -08:00

Add a compiler barrier so that we don't read jiffies before updating
jiffies_64.

Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
5aee405c662ca644980c184774277fc6d0769a84
Parents
a615fa83

Changes

1 files changed · +2 −0

FileStatusAddDelContent
kernel/timer.cmodified+2−0View file

kernel/timer.c

View file
diff --git a/kernel/timer.c b/kernel/timer.c
index 8256f3f..bf7c419 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);
}