aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/time.c')
-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 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)
206unsigned long get_cmos_time(void) 206unsigned 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}