diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/rtc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index eb9b1a198f5e..d2569513ad4c 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <asm/vsyscall.h> | 9 | #include <asm/vsyscall.h> |
10 | 10 | ||
11 | #ifdef CONFIG_X86_32 | 11 | #ifdef CONFIG_X86_32 |
12 | # define CMOS_YEARS_OFFS 1900 | ||
13 | /* | 12 | /* |
14 | * This is a special lock that is owned by the CPU and holds the index | 13 | * This is a special lock that is owned by the CPU and holds the index |
15 | * register we are working with. It is required for NMI access to the | 14 | * register we are working with. It is required for NMI access to the |
@@ -17,14 +16,11 @@ | |||
17 | */ | 16 | */ |
18 | volatile unsigned long cmos_lock = 0; | 17 | volatile unsigned long cmos_lock = 0; |
19 | EXPORT_SYMBOL(cmos_lock); | 18 | EXPORT_SYMBOL(cmos_lock); |
20 | #else | ||
21 | /* | ||
22 | * x86-64 systems only exists since 2002. | ||
23 | * This will work up to Dec 31, 2100 | ||
24 | */ | ||
25 | # define CMOS_YEARS_OFFS 2000 | ||
26 | #endif | 19 | #endif |
27 | 20 | ||
21 | /* For two digit years assume time is always after that */ | ||
22 | #define CMOS_YEARS_OFFS 2000 | ||
23 | |||
28 | DEFINE_SPINLOCK(rtc_lock); | 24 | DEFINE_SPINLOCK(rtc_lock); |
29 | EXPORT_SYMBOL(rtc_lock); | 25 | EXPORT_SYMBOL(rtc_lock); |
30 | 26 | ||
@@ -136,11 +132,8 @@ unsigned long mach_get_cmos_time(void) | |||
136 | BCD_TO_BIN(century); | 132 | BCD_TO_BIN(century); |
137 | year += century * 100; | 133 | year += century * 100; |
138 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); | 134 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); |
139 | } else { | 135 | } else |
140 | year += CMOS_YEARS_OFFS; | 136 | year += CMOS_YEARS_OFFS; |
141 | if (year < 1970) | ||
142 | year += 100; | ||
143 | } | ||
144 | 137 | ||
145 | return mktime(year, mon, day, hour, min, sec); | 138 | return mktime(year, mon, day, hour, min, sec); |
146 | } | 139 | } |