From owner-svn-src-all@FreeBSD.ORG Fri Aug 13 22:08:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC6681065697; Fri, 13 Aug 2010 22:08:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF088FC13; Fri, 13 Aug 2010 22:08:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7DM8gS9008624; Fri, 13 Aug 2010 22:08:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7DM8gc4008621; Fri, 13 Aug 2010 22:08:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201008132208.o7DM8gc4008621@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 13 Aug 2010 22:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211292 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 22:08:43 -0000 Author: jkim Date: Fri Aug 13 22:08:42 2010 New Revision: 211292 URL: http://svn.freebsd.org/changeset/base/211292 Log: 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. 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 Fri Aug 13 21:23:13 2010 (r211291) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Aug 13 22:08:42 2010 (r211292) @@ -278,13 +278,13 @@ acpi_sleep_machdep(struct acpi_softc *sc 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; } Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Aug 13 21:23:13 2010 (r211291) +++ head/sys/amd64/amd64/mp_machdep.c Fri Aug 13 22:08:42 2010 (r211292) @@ -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); }