Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ad749980a5fda46f7ec920d8409ddcc89b38714
Commit:     1ad749980a5fda46f7ec920d8409ddcc89b38714
Parent:     d831d0b83f205888f4be4dee0a074ad67ef809b3
Author:     Tony Breeds <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 21 13:26:03 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 15:44:34 2007 +1000

    [POWERPC] Enable tickless idle and high res timers for powerpc
    
    Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/Kconfig                   |    1 +
 arch/powerpc/kernel/idle.c             |    3 +++
 arch/powerpc/platforms/iseries/setup.c |    6 ++++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a46f811..b387e1e 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -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"
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index a9e9cbd..abd2957 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -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();
diff --git a/arch/powerpc/platforms/iseries/setup.c 
b/arch/powerpc/platforms/iseries/setup.c
index fad493e..37ae07e 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -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();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to