#include <machine/machine_routines.h>
#include <machine/sched_param.h>
+#include <machine/machine_cpu.h>
#include <kern/kern_types.h>
#include <kern/clock.h>
#include <sys/kdebug.h>
-#ifdef __ppc__
-#include <ppc/pms.h>
-#endif
+#include <kern/pms.h>
#define DEFAULT_PREEMPTION_RATE 100 /* (1/s) */
int default_preemption_rate = DEFAULT_PREEMPTION_RATE;
* If blocked at a continuation, discard
* the stack.
*/
-#ifndef i386
if (thread->continuation != NULL && thread->kernel_stack)
stack_free(thread);
-#endif
if (!(thread->state & TH_IDLE)) {
wake_lock(thread);
s = splsched();
+#if 0
+#if MACH_KDB
+ {
+ extern void db_chkpmgr(void);
+ db_chkpmgr(); /* (BRINGUP) See if pm config changed */
+
+ }
+#endif
+#endif
+
if (!(reason & AST_PREEMPT))
funnel_release_check(self, 2);
timer_event((uint32_t)abstime, &processor->idle_thread->system_timer);
}
- else
+ else {
+ cpu_pause();
abstime = mach_absolute_time();
+ }
}
timer_event((uint32_t)abstime, &self->system_timer);
(void)splsched(); /* Turn interruptions off */
-#ifdef __ppc__
pmsDown(); /* Step power down. Note: interruptions must be disabled for this call */
-#endif
while ( (*threadp == THREAD_NULL) &&
(*gcount == 0) && (*lcount == 0) ) {
pset = processor->processor_set;
simple_lock(&pset->sched_lock);
-#ifdef __ppc__
pmsStep(0); /* Step up out of idle power, may start timer for next step */
-#endif
state = processor->state;
if (state == PROCESSOR_DISPATCHING) {