summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-08-12 00:20:46 +0000
committerjkim <jkim@FreeBSD.org>2010-08-12 00:20:46 +0000
commit303b073c92130ef5476049299135f77edab88fe0 (patch)
treef9a9d5b9d49cd1f76891643f42b2891c8231ba55 /sys/amd64/amd64/mp_machdep.c
parent8d948403ba72b7fa474f42e7456d2a255584b17b (diff)
downloadFreeBSD-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/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index c5efc48..3646ef0 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -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 */
OpenPOWER on IntegriCloud