提交 7ba1c6c8 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] get_cmos_time() locking fix (lockdep)

rtc_lock is supposed to be irq-safe.
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 11eebe30
......@@ -206,15 +206,16 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned long get_cmos_time(void)
{
unsigned long retval;
unsigned long flags;
spin_lock(&rtc_lock);
spin_lock_irqsave(&rtc_lock, flags);
if (efi_enabled)
retval = efi_get_time();
else
retval = mach_get_cmos_time();
spin_unlock(&rtc_lock);
spin_unlock_irqrestore(&rtc_lock, flags);
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册