Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 May 2011 12:27:25 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221599 - head/sys/i386/i386
Message-ID:  <201105071227.p47CRPUa098439@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat May  7 12:27:25 2011
New Revision: 221599
URL: http://svn.freebsd.org/changeset/base/221599

Log:
  Don't use MWAIT for short sleeps under XEN, as it was before r212541.
  This fixes panic during boot in PV mode on Xen 3.2.

Modified:
  head/sys/i386/i386/machdep.c

Modified: head/sys/i386/i386/machdep.c
==============================================================================
--- head/sys/i386/i386/machdep.c	Sat May  7 11:29:48 2011	(r221598)
+++ head/sys/i386/i386/machdep.c	Sat May  7 12:27:25 2011	(r221599)
@@ -1359,6 +1359,7 @@ cpu_idle(int busy)
 	if (mp_grab_cpu_hlt())
 		return;
 #endif
+#ifndef XEN
 	/* If we are busy - try to use fast methods. */
 	if (busy) {
 		if ((cpu_feature2 & CPUID2_MON) && idle_mwait) {
@@ -1367,7 +1368,6 @@ cpu_idle(int busy)
 		}
 	}
 
-#ifndef XEN
 	/* If we have time - switch timers into idle mode. */
 	if (!busy) {
 		critical_enter();
@@ -1395,8 +1395,8 @@ cpu_idle(int busy)
 		cpu_activeclock();
 		critical_exit();
 	}
-#endif
 out:
+#endif
 	CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done",
 	    busy, curcpu);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105071227.p47CRPUa098439>