summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-09-16 15:36:43 +0200
committerThomas Gleixner <tglx@chaos.(none)>2007-09-16 15:36:43 +0200
commit3be9095063885d482b87d3875ea7f28e635882d0 (patch)
treec29f9a90a244032515c4f830e1d73d4dd2a3f1ac /kernel
parentd0174640eedc1cd756754f03afe2dbb3d56de74e (diff)
timekeeping: access rtc outside of xtime lock
Lockdep complains about the access of rtc in timekeeping_suspend inside the interrupt disabled region of the write locked xtime lock. Move the access outside. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <johnstul@us.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index acc417b5a9b..f682091fa89 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -325,9 +325,10 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state)
{
unsigned long flags;
+ timekeeping_suspend_time = read_persistent_clock();
+
write_seqlock_irqsave(&xtime_lock, flags);
timekeeping_suspended = 1;
- timekeeping_suspend_time = read_persistent_clock();
write_sequnlock_irqrestore(&xtime_lock, flags);
clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);