diff -ruNp --exclude compile sys.prev2/powerpc/aim/machdep.c sys/powerpc/aim/machdep.c --- sys.prev2/powerpc/aim/machdep.c 2010-09-03 02:15:35.000000000 +0300 +++ sys/powerpc/aim/machdep.c 2010-09-05 10:34:45.000000000 +0300 @@ -639,7 +638,13 @@ cpu_idle(int busy) panic("ints disabled in idleproc!"); } #endif + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", + busy, curcpu); if (powerpc_pow_enabled) { + if (!busy) { + critical_enter(); + cpu_idleclock(); + } switch (vers) { case IBM970: case IBM970FX: @@ -659,7 +664,13 @@ cpu_idle(int busy) isync(); break; } + if (!busy) { + cpu_activeclock(); + critical_exit(); + } } + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", + busy, curcpu); } int diff -ruNp --exclude compile sys.prev2/powerpc/booke/machdep.c sys/powerpc/booke/machdep.c --- sys.prev2/powerpc/booke/machdep.c 2010-09-03 02:15:34.000000000 +0300 +++ sys/powerpc/booke/machdep.c 2010-09-05 18:04:07.000000000 +0300 @@ -488,9 +488,21 @@ cpu_idle (int busy) } #endif + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", + busy, curcpu); + if (!busy) { + critical_enter(); + cpu_idleclock(); + } /* Freescale E500 core RM section 6.4.1. */ msr = msr | PSL_WE; __asm __volatile("msync; mtmsr %0; isync" :: "r" (msr)); + if (!busy) { + cpu_activeclock(); + critical_exit(); + } + CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", + busy, curcpu); } int