提交 45de7079 编写于 作者: A Andi Kleen 提交者: Ingo Molnar

x86: enable ACPI extended century handling for 32bit

The extended century readout does not solve the year 2038 problem on
32bit!

v2: Fix compilation on !ACPI, pointed out by tglx
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 068c9222
...@@ -112,15 +112,14 @@ unsigned long mach_get_cmos_time(void) ...@@ -112,15 +112,14 @@ unsigned long mach_get_cmos_time(void)
mon = CMOS_READ(RTC_MONTH); mon = CMOS_READ(RTC_MONTH);
year = CMOS_READ(RTC_YEAR); year = CMOS_READ(RTC_YEAR);
#if defined(CONFIG_ACPI) && defined(CONFIG_X86_64) #ifdef CONFIG_ACPI
/* CHECKME: Is this really 64bit only ??? */
if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
acpi_gbl_FADT.century) acpi_gbl_FADT.century)
century = CMOS_READ(acpi_gbl_FADT.century); century = CMOS_READ(acpi_gbl_FADT.century);
#endif #endif
status = CMOS_READ(RTC_CONTROL); status = CMOS_READ(RTC_CONTROL);
WARN_ON_ONCE((RTC_ALWAYS_BCD && (status & RTC_DM_BINARY)); WARN_ON_ONCE(RTC_ALWAYS_BCD && (status & RTC_DM_BINARY));
if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) { if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) {
BCD_TO_BIN(sec); BCD_TO_BIN(sec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册