]> err.no Git - linux-2.6/commitdiff
[POWERPC] Enable tickless idle and high res timers for powerpc
authorTony Breeds <tony@bakeyournoodle.com>
Fri, 21 Sep 2007 03:26:03 +0000 (13:26 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Oct 2007 05:44:34 +0000 (15:44 +1000)
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/kernel/idle.c
arch/powerpc/platforms/iseries/setup.c

index a46f8116f4763203cf3aae8d9cc0af046fa8559a..b387e1ed51771616ab789539905af4a3f29044ca 100644 (file)
@@ -173,6 +173,7 @@ config HIGHMEM
        bool "High memory support"
        depends on PPC32
 
+source kernel/time/Kconfig
 source kernel/Kconfig.hz
 source kernel/Kconfig.preempt
 source "fs/Kconfig.binfmt"
index a9e9cbd329752aa11411d7d3058f6903655a9840..abd2957fe5378ba59c4ccf6c58a9ecdd6f892798 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/smp.h>
 #include <linux/cpu.h>
 #include <linux/sysctl.h>
+#include <linux/tick.h>
 
 #include <asm/system.h>
 #include <asm/processor.h>
@@ -59,6 +60,7 @@ void cpu_idle(void)
 
        set_thread_flag(TIF_POLLING_NRFLAG);
        while (1) {
+               tick_nohz_stop_sched_tick();
                while (!need_resched() && !cpu_should_die()) {
                        ppc64_runlatch_off();
 
@@ -90,6 +92,7 @@ void cpu_idle(void)
 
                HMT_medium();
                ppc64_runlatch_on();
+               tick_nohz_restart_sched_tick();
                if (cpu_should_die())
                        cpu_die();
                preempt_enable_no_resched();
index fad493e29d375584fc33f12d6bd41ab5e5e041ec..37ae07ee54a9886944d5f15e932deac4abeb9432 100644 (file)
@@ -26,6 +26,8 @@
 #include <linux/major.h>
 #include <linux/root_dev.h>
 #include <linux/kernel.h>
+#include <linux/hrtimer.h>
+#include <linux/tick.h>
 
 #include <asm/processor.h>
 #include <asm/machdep.h>
@@ -561,6 +563,7 @@ static void yield_shared_processor(void)
 static void iseries_shared_idle(void)
 {
        while (1) {
+               tick_nohz_stop_sched_tick();
                while (!need_resched() && !hvlpevent_is_pending()) {
                        local_irq_disable();
                        ppc64_runlatch_off();
@@ -574,6 +577,7 @@ static void iseries_shared_idle(void)
                }
 
                ppc64_runlatch_on();
+               tick_nohz_restart_sched_tick();
 
                if (hvlpevent_is_pending())
                        process_iSeries_events();
@@ -589,6 +593,7 @@ static void iseries_dedicated_idle(void)
        set_thread_flag(TIF_POLLING_NRFLAG);
 
        while (1) {
+               tick_nohz_stop_sched_tick();
                if (!need_resched()) {
                        while (!need_resched()) {
                                ppc64_runlatch_off();
@@ -605,6 +610,7 @@ static void iseries_dedicated_idle(void)
                }
 
                ppc64_runlatch_on();
+               tick_nohz_restart_sched_tick();
                preempt_enable_no_resched();
                schedule();
                preempt_disable();