1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Reset switchtime and switchticks after resynchronizing the system clock.

This should fix weird runtime problem after resume on amd64.  It also fixes
"calcru: runtime went backwards" warnings with bootverbose.
This commit is contained in:
Jung-uk Kim 2010-08-12 00:20:46 +00:00
parent 97f24f666f
commit a1004d0abf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211202
2 changed files with 6 additions and 1 deletions

View File

@ -278,11 +278,13 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
for (;;)
ia32_pause();
} else {
acpi_resync_clock(sc);
PCPU_SET(switchtime, cpu_ticks());
PCPU_SET(switchticks, ticks);
#ifdef SMP
if (wakeup_cpus != 0)
acpi_wakeup_cpus(sc, wakeup_cpus);
#endif
acpi_resync_clock(sc);
ret = 0;
}

View File

@ -1369,6 +1369,9 @@ cpususpend_handler(void)
if (savectx(susppcbs[cpu])) {
wbinvd();
atomic_set_int(&stopped_cpus, cpumask);
} else {
PCPU_SET(switchtime, cpu_ticks());
PCPU_SET(switchticks, ticks);
}
/* Wait for resume */