diff options
author | jkim <jkim@FreeBSD.org> | 2010-08-12 00:20:46 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-08-12 00:20:46 +0000 |
commit | 303b073c92130ef5476049299135f77edab88fe0 (patch) | |
tree | f9a9d5b9d49cd1f76891643f42b2891c8231ba55 /sys/amd64/acpica | |
parent | 8d948403ba72b7fa474f42e7456d2a255584b17b (diff) | |
download | FreeBSD-src-303b073c92130ef5476049299135f77edab88fe0.zip FreeBSD-src-303b073c92130ef5476049299135f77edab88fe0.tar.gz |
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.
Diffstat (limited to 'sys/amd64/acpica')
-rw-r--r-- | sys/amd64/acpica/acpi_wakeup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c index 0e85937..bff8045 100644 --- a/sys/amd64/acpica/acpi_wakeup.c +++ b/sys/amd64/acpica/acpi_wakeup.c @@ -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; } |