aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Breeds <tony@bakeyournoodle.com>2007-09-20 23:26:03 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-03 01:44:34 -0400
commit1ad749980a5fda46f7ec920d8409ddcc89b38714 (patch)
tree3c1b28f1f6e03660c36e6f320fce54e4e5a1eb5e /arch
parentd831d0b83f205888f4be4dee0a074ad67ef809b3 (diff)
[POWERPC] Enable tickless idle and high res timers for powerpc
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/powerpc/kernel/idle.c3
-rw-r--r--arch/powerpc/platforms/iseries/setup.c6
3 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a46f8116f476..b387e1ed5177 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -173,6 +173,7 @@ config HIGHMEM
173 bool "High memory support" 173 bool "High memory support"
174 depends on PPC32 174 depends on PPC32
175 175
176source kernel/time/Kconfig
176source kernel/Kconfig.hz 177source kernel/Kconfig.hz
177source kernel/Kconfig.preempt 178source kernel/Kconfig.preempt
178source "fs/Kconfig.binfmt" 179source "fs/Kconfig.binfmt"
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index a9e9cbd32975..abd2957fe537 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -24,6 +24,7 @@
24#include <linux/smp.h> 24#include <linux/smp.h>
25#include <linux/cpu.h> 25#include <linux/cpu.h>
26#include <linux/sysctl.h> 26#include <linux/sysctl.h>
27#include <linux/tick.h>
27 28
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/processor.h> 30#include <asm/processor.h>
@@ -59,6 +60,7 @@ void cpu_idle(void)
59 60
60 set_thread_flag(TIF_POLLING_NRFLAG); 61 set_thread_flag(TIF_POLLING_NRFLAG);
61 while (1) { 62 while (1) {
63 tick_nohz_stop_sched_tick();
62 while (!need_resched() && !cpu_should_die()) { 64 while (!need_resched() && !cpu_should_die()) {
63 ppc64_runlatch_off(); 65 ppc64_runlatch_off();
64 66
@@ -90,6 +92,7 @@ void cpu_idle(void)
90 92
91 HMT_medium(); 93 HMT_medium();
92 ppc64_runlatch_on(); 94 ppc64_runlatch_on();
95 tick_nohz_restart_sched_tick();
93 if (cpu_should_die()) 96 if (cpu_should_die())
94 cpu_die(); 97 cpu_die();
95 preempt_enable_no_resched(); 98 preempt_enable_no_resched();
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index fad493e29d37..37ae07ee54a9 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -26,6 +26,8 @@
26#include <linux/major.h> 26#include <linux/major.h>
27#include <linux/root_dev.h> 27#include <linux/root_dev.h>
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/hrtimer.h>
30#include <linux/tick.h>
29 31
30#include <asm/processor.h> 32#include <asm/processor.h>
31#include <asm/machdep.h> 33#include <asm/machdep.h>
@@ -561,6 +563,7 @@ static void yield_shared_processor(void)
561static void iseries_shared_idle(void) 563static void iseries_shared_idle(void)
562{ 564{
563 while (1) { 565 while (1) {
566 tick_nohz_stop_sched_tick();
564 while (!need_resched() && !hvlpevent_is_pending()) { 567 while (!need_resched() && !hvlpevent_is_pending()) {
565 local_irq_disable(); 568 local_irq_disable();
566 ppc64_runlatch_off(); 569 ppc64_runlatch_off();
@@ -574,6 +577,7 @@ static void iseries_shared_idle(void)
574 } 577 }
575 578
576 ppc64_runlatch_on(); 579 ppc64_runlatch_on();
580 tick_nohz_restart_sched_tick();
577 581
578 if (hvlpevent_is_pending()) 582 if (hvlpevent_is_pending())
579 process_iSeries_events(); 583 process_iSeries_events();
@@ -589,6 +593,7 @@ static void iseries_dedicated_idle(void)
589 set_thread_flag(TIF_POLLING_NRFLAG); 593 set_thread_flag(TIF_POLLING_NRFLAG);
590 594
591 while (1) { 595 while (1) {
596 tick_nohz_stop_sched_tick();
592 if (!need_resched()) { 597 if (!need_resched()) {
593 while (!need_resched()) { 598 while (!need_resched()) {
594 ppc64_runlatch_off(); 599 ppc64_runlatch_off();
@@ -605,6 +610,7 @@ static void iseries_dedicated_idle(void)
605 } 610 }
606 611
607 ppc64_runlatch_on(); 612 ppc64_runlatch_on();
613 tick_nohz_restart_sched_tick();
608 preempt_enable_no_resched(); 614 preempt_enable_no_resched();
609 schedule(); 615 schedule();
610 preempt_disable(); 616 preempt_disable();