[-mm PATCH] time: i386 conversion part 3 - lock jiffies_64manipulation

From: john stultz
Date: Fri Mar 03 2006 - 23:02:41 EST


Hey Andrew,

This should merge TOD my changes with Atsushi's jiffies/jiffies_64 fix
that is in your tree.

thanks
-john

Signed-off-by: John Stultz <johnstul@xxxxxxxxxx>

diff -ru mmmerge/arch/i386/kernel/time.c mytree/arch/i386/kernel/time.c
--- mmmerge/arch/i386/kernel/time.c 2006-03-03 19:44:22.000000000 -0800
+++ mytree/arch/i386/kernel/time.c 2006-03-03 19:44:45.000000000 -0800
@@ -266,6 +266,7 @@

static int timer_resume(struct sys_device *dev)
{
+ unsigned long flags;
unsigned long sec;
unsigned long sleep_length;

@@ -276,8 +277,10 @@
setup_pit_timer();
sec = get_cmos_time() + clock_cmos_diff;
sleep_length = (get_cmos_time() - sleep_start) * HZ;
+ write_seqlock_irqsave(&xtime_lock, flags);
jiffies_64 += sleep_length;
wall_jiffies += sleep_length;
+ write_sequnlock_irqrestore(&xtime_lock, flags);
touch_softlockup_watchdog();
return 0;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/