Reset switchtime to zero rather than the current CPU ticker (TSC) value.
It is more appropriate in this context because TSC MSR is reset to zero when the CPU is restarted from S3 and above. Move acpi_resync_clock() back to where it was before r211202. It does not make a difference any more.
This commit is contained in:
parent
4a2637c486
commit
0405a5efe7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211292
@ -278,13 +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(switchtime, 0);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
#ifdef SMP
|
||||
if (wakeup_cpus != 0)
|
||||
acpi_wakeup_cpus(sc, wakeup_cpus);
|
||||
#endif
|
||||
acpi_resync_clock(sc);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
|
@ -1366,7 +1366,7 @@ cpususpend_handler(void)
|
||||
wbinvd();
|
||||
atomic_set_int(&stopped_cpus, cpumask);
|
||||
} else {
|
||||
PCPU_SET(switchtime, cpu_ticks());
|
||||
PCPU_SET(switchtime, 0);
|
||||
PCPU_SET(switchticks, ticks);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user