Module Name:    src
Committed By:   snj
Date:           Tue Mar 24 20:20:57 UTC 2009

Modified Files:
        src/sys/arch/x86/acpi [netbsd-5]: acpi_wakeup.c

Log Message:
Pull up following revision(s) (requested by drochner in ticket #589):
        sys/arch/x86/acpi/acpi_wakeup.c: revision 1.12
sync TSC on resume (because CPUs were switched off in the meantime),
otherwise we get diverging timecounters leading to eg the monotonic
clock jump backwards
(pullup candidate)


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/sys/arch/x86/acpi/acpi_wakeup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.10.4.1 src/sys/arch/x86/acpi/acpi_wakeup.c:1.10.4.2
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.10.4.1	Tue Nov 25 18:22:37 2008
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Tue Mar 24 20:20:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.10.4.1 2008/11/25 18:22:37 snj Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.10.4.2 2009/03/24 20:20:57 snj Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.10.4.1 2008/11/25 18:22:37 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.10.4.2 2009/03/24 20:20:57 snj Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe <[email protected]>
@@ -101,6 +101,7 @@
 #include <machine/mtrr.h>
 
 #include <x86/cpuvar.h>
+#include <x86/x86/tsc.h>
 
 #include "acpi_wakecode.h"
 
@@ -307,6 +308,8 @@
 
 	atomic_or_32(&ci->ci_flags, CPUF_RUNNING);
 	atomic_or_32(&cpus_running, ci->ci_cpumask);
+	tsc_sync_ap(ci);
+	tsc_sync_ap(ci);
 
 	x86_enable_intr();
 }
@@ -391,6 +394,9 @@
 
 		while ((ci->ci_flags & CPUF_RUNNING) == 0)
 			x86_pause();
+
+		tsc_sync_bp(ci);
+		tsc_sync_bp(ci);
 	}
 #endif
 

Reply via email to