summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-07-10 04:44:59 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:22 -0700
commit7ba1c6c88c945b065a75094830f6b76f414e42ad (patch)
tree614506c720fd4a15d6f22c03bcc7706d931dbd42 /arch/i386
parent11eebe307e4d3afa33eb25e999ac458ac4f9b41e (diff)
downloadop-kernel-dev-7ba1c6c88c945b065a75094830f6b76f414e42ad.zip
op-kernel-dev-7ba1c6c88c945b065a75094830f6b76f414e42ad.tar.gz
[PATCH] get_cmos_time() locking fix (lockdep)
rtc_lock is supposed to be irq-safe. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index 316421a..8705c0f 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -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;
}
OpenPOWER on IntegriCloud