summaryrefslogtreecommitdiff
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index a66a15e47744..b4d807436ec5 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -519,6 +519,7 @@ unsigned long get_cmos_time(void)
unsigned int year, mon, day, hour, min, sec;
int i;
+ spin_lock(&rtc_lock);
/* The Linux interpretation of the CMOS clock register contents:
* When the Update-In-Progress (UIP) flag goes from 1 to 0, the
* RTC registers show the second which has precisely just started.
@@ -548,6 +549,7 @@ unsigned long get_cmos_time(void)
BCD_TO_BIN(mon);
BCD_TO_BIN(year);
}
+ spin_unlock(&rtc_lock);
if ((year += 1900) < 1970)
year += 100;
return mktime(year, mon, day, hour, min, sec);