sched/rt: Use schedule_preempt_disabled()

Coccinelle based conversion.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Thomas Gleixner 2011-03-21 12:33:18 +01:00 committed by Ingo Molnar
parent c5491ea779
commit bd2f55361f
28 changed files with 36 additions and 95 deletions

View File

@ -239,9 +239,7 @@ void cpu_idle(void)
leds_event(led_idle_end);
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -40,9 +40,7 @@ void cpu_idle(void)
cpu_idle_sleep();
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -94,9 +94,7 @@ void cpu_idle(void)
idle();
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -115,9 +115,7 @@ void cpu_idle (void)
idle = default_idle;
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -92,9 +92,7 @@ void cpu_idle(void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -81,9 +81,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -330,9 +330,7 @@ cpu_idle (void)
normal_xtp();
#endif
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
check_pgt_cache();
if (cpu_is_offline(cpu))
play_dead();

View File

@ -90,9 +90,7 @@ void cpu_idle (void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -78,9 +78,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -73,9 +73,7 @@ void cpu_idle(void)
/* endless idle loop with no priority at all */
while (1) {
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -110,9 +110,7 @@ void cpu_idle(void)
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
check_pgt_cache();
}
}

View File

@ -80,9 +80,7 @@ void __noreturn cpu_idle(void)
#endif
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -123,9 +123,7 @@ void cpu_idle(void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -71,9 +71,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
barrier();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
check_pgt_cache();
}
}

View File

@ -101,11 +101,11 @@ void cpu_idle(void)
ppc64_runlatch_on();
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
if (cpu_should_die())
if (cpu_should_die()) {
preempt_enable_no_resched();
cpu_die();
schedule();
preempt_disable();
}
schedule_preempt_disabled();
}
}

View File

@ -584,9 +584,7 @@ static void iseries_shared_idle(void)
if (hvlpevent_is_pending())
process_iSeries_events();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
@ -615,9 +613,7 @@ static void iseries_dedicated_idle(void)
ppc64_runlatch_on();
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -97,9 +97,7 @@ void cpu_idle(void)
tick_nohz_idle_exit();
if (test_thread_flag(TIF_MCCK_PENDING))
s390_handle_mcck();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -53,9 +53,7 @@ void __noreturn cpu_idle(void)
while (!need_resched())
barrier();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -114,9 +114,7 @@ void cpu_idle(void)
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -113,9 +113,7 @@ void cpu_idle(void)
while (!need_resched())
cpu_relax();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
check_pgt_cache();
}
}
@ -138,9 +136,7 @@ void cpu_idle(void)
while (!need_resched())
cpu_relax();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
check_pgt_cache();
}
}

View File

@ -104,15 +104,13 @@ void cpu_idle(void)
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
#ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(cpu))
if (cpu_is_offline(cpu)) {
preempt_enable_no_resched();
cpu_play_dead();
}
#endif
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -108,9 +108,7 @@ void cpu_idle(void)
}
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -119,9 +119,7 @@ void cpu_idle(void)
}
rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -156,9 +156,7 @@ void cpu_idle(void)
}
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -113,9 +113,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
platform_idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}

View File

@ -374,11 +374,8 @@ static noinline void __init_refok rest_init(void)
* at least once to get things moving:
*/
init_idle_bootup_task(current);
preempt_enable_no_resched();
schedule();
schedule_preempt_disabled();
/* Call into cpu_idle with preempt disabled */
preempt_disable();
cpu_idle();
}

View File

@ -240,9 +240,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
/* didn't get the lock, go to sleep: */
spin_unlock_mutex(&lock->wait_lock, flags);
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
spin_lock_mutex(&lock->wait_lock, flags);
}

View File

@ -744,9 +744,7 @@ static int run_ksoftirqd(void * __bind_cpu)
while (!kthread_should_stop()) {
preempt_disable();
if (!local_softirq_pending()) {
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
__set_current_state(TASK_RUNNING);