aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/iseries/setup.c')
-rw-r--r--arch/powerpc/platforms/iseries/setup.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index d3e4bf756c83..7f8f0cda6a74 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -694,20 +694,19 @@ static void iseries_shared_idle(void)
694 if (hvlpevent_is_pending()) 694 if (hvlpevent_is_pending())
695 process_iSeries_events(); 695 process_iSeries_events();
696 696
697 preempt_enable_no_resched();
697 schedule(); 698 schedule();
699 preempt_disable();
698 } 700 }
699} 701}
700 702
701static void iseries_dedicated_idle(void) 703static void iseries_dedicated_idle(void)
702{ 704{
703 long oldval; 705 long oldval;
706 set_thread_flag(TIF_POLLING_NRFLAG);
704 707
705 while (1) { 708 while (1) {
706 oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); 709 if (!need_resched()) {
707
708 if (!oldval) {
709 set_thread_flag(TIF_POLLING_NRFLAG);
710
711 while (!need_resched()) { 710 while (!need_resched()) {
712 ppc64_runlatch_off(); 711 ppc64_runlatch_off();
713 HMT_low(); 712 HMT_low();
@@ -720,13 +719,12 @@ static void iseries_dedicated_idle(void)
720 } 719 }
721 720
722 HMT_medium(); 721 HMT_medium();
723 clear_thread_flag(TIF_POLLING_NRFLAG);
724 } else {
725 set_need_resched();
726 } 722 }
727 723
728 ppc64_runlatch_on(); 724 ppc64_runlatch_on();
725 preempt_enable_no_resched();
729 schedule(); 726 schedule();
727 preempt_disable();
730 } 728 }
731} 729}
732 730