提交 bd2f5536 编写于 作者: T Thomas Gleixner 提交者: Ingo Molnar

sched/rt: Use schedule_preempt_disabled()

Coccinelle based conversion.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@elte.hu>
上级 c5491ea7
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -115,9 +115,7 @@ void cpu_idle (void)
idle = default_idle;
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -92,9 +92,7 @@ void cpu_idle(void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -81,9 +81,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -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();
......
......@@ -90,9 +90,7 @@ void cpu_idle (void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -78,9 +78,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -123,9 +123,7 @@ void cpu_idle(void)
idle();
}
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -53,9 +53,7 @@ void __noreturn cpu_idle(void)
while (!need_resched())
barrier();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
......@@ -156,9 +156,7 @@ void cpu_idle(void)
}
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();
preempt_disable();
schedule_preempt_disabled();
}
}
......
......@@ -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();
}
}
......
......@@ -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();
}
......
......@@ -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);
}
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册