Merge branch 'intx' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
[pandora-kernel.git] / arch / powerpc / kernel / idle.c
index e9f321d..8994af3 100644 (file)
@@ -19,7 +19,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #define cpu_should_die()       0
 #endif
 
+static int __init powersave_off(char *arg)
+{
+       ppc_md.power_save = NULL;
+       return 0;
+}
+__setup("powersave=off", powersave_off);
+
 /*
  * The body of the idle task.
  */
@@ -50,9 +56,9 @@ void cpu_idle(void)
 
        set_thread_flag(TIF_POLLING_NRFLAG);
        while (1) {
-               ppc64_runlatch_off();
-
                while (!need_resched() && !cpu_should_die()) {
+                       ppc64_runlatch_off();
+
                        if (ppc_md.power_save) {
                                clear_thread_flag(TIF_POLLING_NRFLAG);
                                /*