Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45de7079 authored by Andi Kleen's avatar Andi Kleen Committed by Ingo Molnar
Browse files

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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 068c9222
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -112,15 +112,14 @@ unsigned long mach_get_cmos_time(void)
	mon = CMOS_READ(RTC_MONTH);
	year = CMOS_READ(RTC_YEAR);

#if defined(CONFIG_ACPI) && defined(CONFIG_X86_64)
	/* CHECKME: Is this really 64bit only ??? */
#ifdef CONFIG_ACPI
	if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
	    acpi_gbl_FADT.century)
		century = CMOS_READ(acpi_gbl_FADT.century);
#endif

	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)) {
		BCD_TO_BIN(sec);