Skip to content

Commit

Permalink
timekeeping: access rtc outside of xtime lock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: John Stultz <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Thomas Gleixner committed Sep 16, 2007
1 parent d017464 commit 3be9095
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3be9095

Please sign in to comment.