Date: Thu, 12 Aug 2010 00:20:46 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r211202 - in head/sys/amd64: acpica amd64 Message-ID: <201008120020.o7C0Kka6015945@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Thu Aug 12 00:20:46 2010 New Revision: 211202 URL: http://svn.freebsd.org/changeset/base/211202 Log: 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. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Thu Aug 12 00:16:18 2010 (r211201) +++ head/sys/amd64/acpica/acpi_wakeup.c Thu Aug 12 00:20:46 2010 (r211202) @@ -278,11 +278,13 @@ acpi_sleep_machdep(struct acpi_softc *sc 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; } Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 12 00:16:18 2010 (r211201) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 12 00:20:46 2010 (r211202) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008120020.o7C0Kka6015945>