1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-25 14:45:52 +00:00

Apparently we shouldn't touch the RTC before restarting the i8254 clock

when coming out of S3 suspend.  This makes the x250 lock up.

ok jsg@, deraadt@
This commit is contained in:
kettenis
2026-03-15 11:16:36 +00:00
parent dd48a00822
commit 2e0288d2b7

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: acpi_machdep.c,v 1.113 2026/03/11 16:18:42 kettenis Exp $ */
/* $OpenBSD: acpi_machdep.c,v 1.114 2026/03/15 11:16:36 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -481,10 +481,10 @@ acpi_resume_cpu(struct acpi_softc *sc, int state)
sc->sc_wakegpe = WAKEGPE_RTC;
}
rtcalarm_resume();
if (state == ACPI_STATE_S0)
if (state == ACPI_STATE_S0) {
rtcalarm_resume();
return;
}
cpu_init_msrs(&cpu_info_primary);
cpu_fix_msrs(&cpu_info_primary);
@@ -504,6 +504,7 @@ acpi_resume_cpu(struct acpi_softc *sc, int state)
#endif
i8254_startclock();
rtcalarm_resume(); /* i8254 must be running */
if (initclock_func == i8254_initclocks)
rtcstart(); /* in i8254 mode, rtc is profclock */