diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2007-09-20 23:26:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-03 01:44:34 -0400 |
commit | 1ad749980a5fda46f7ec920d8409ddcc89b38714 (patch) | |
tree | 3c1b28f1f6e03660c36e6f320fce54e4e5a1eb5e /arch/powerpc/platforms/iseries/setup.c | |
parent | d831d0b83f205888f4be4dee0a074ad67ef809b3 (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/powerpc/platforms/iseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
561 | static void iseries_shared_idle(void) | 563 | static 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(); |