diff options
author | Andrew Morton <akpm@osdl.org> | 2006-07-10 07:44:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:22 -0400 |
commit | 7ba1c6c88c945b065a75094830f6b76f414e42ad (patch) | |
tree | 614506c720fd4a15d6f22c03bcc7706d931dbd42 /arch | |
parent | 11eebe307e4d3afa33eb25e999ac458ac4f9b41e (diff) |
[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')
-rw-r--r-- | arch/i386/kernel/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 316421a7f56f..8705c0f05788 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) | |||
206 | unsigned long get_cmos_time(void) | 206 | unsigned long get_cmos_time(void) |
207 | { | 207 | { |
208 | unsigned long retval; | 208 | unsigned long retval; |
209 | unsigned long flags; | ||
209 | 210 | ||
210 | spin_lock(&rtc_lock); | 211 | spin_lock_irqsave(&rtc_lock, flags); |
211 | 212 | ||
212 | if (efi_enabled) | 213 | if (efi_enabled) |
213 | retval = efi_get_time(); | 214 | retval = efi_get_time(); |
214 | else | 215 | else |
215 | retval = mach_get_cmos_time(); | 216 | retval = mach_get_cmos_time(); |
216 | 217 | ||
217 | spin_unlock(&rtc_lock); | 218 | spin_unlock_irqrestore(&rtc_lock, flags); |
218 | 219 | ||
219 | return retval; | 220 | return retval; |
220 | } | 221 | } |