svn commit: r229269 - projects/armv6/sys/arm/arm

Grzegorz Bernacki gber at FreeBSD.org
Mon Jan 2 09:53:47 UTC 2012


Author: gber
Date: Mon Jan  2 09:53:47 2012
New Revision: 229269
URL: http://svn.freebsd.org/changeset/base/229269

Log:
  Switch timers into idle mode when cpu is idle.
  
  Obtained from:	Marvell, Semihalf

Modified:
  projects/armv6/sys/arm/arm/machdep.c

Modified: projects/armv6/sys/arm/arm/machdep.c
==============================================================================
--- projects/armv6/sys/arm/arm/machdep.c	Mon Jan  2 09:51:12 2012	(r229268)
+++ projects/armv6/sys/arm/arm/machdep.c	Mon Jan  2 09:53:47 2012	(r229269)
@@ -348,7 +348,16 @@ cpu_est_clockrate(int cpu_id, uint64_t *
 void
 cpu_idle(int busy)
 {
+	
+	if (!busy) {
+		critical_enter();
+		cpu_idleclock();
+	}
 	cpu_sleep(0);
+	if (!busy) {
+		cpu_activeclock();
+		critical_exit();
+	}
 }
 
 int


More information about the svn-src-projects mailing list