mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
2 changed files with 3 additions and 3 deletions
|
|
@ -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 a new issue