dect
/
linux-2.6
Archived
13
0
Fork 0

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); leds_event(led_idle_end);
rcu_idle_exit(); rcu_idle_exit();
tick_nohz_idle_exit(); tick_nohz_idle_exit();
preempt_enable_no_resched(); schedule_preempt_disabled();
schedule();
preempt_disable();
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -374,11 +374,8 @@ static noinline void __init_refok rest_init(void)
* at least once to get things moving: * at least once to get things moving:
*/ */
init_idle_bootup_task(current); init_idle_bootup_task(current);
preempt_enable_no_resched(); schedule_preempt_disabled();
schedule();
/* Call into cpu_idle with preempt disabled */ /* Call into cpu_idle with preempt disabled */
preempt_disable();
cpu_idle(); 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: */ /* didn't get the lock, go to sleep: */
spin_unlock_mutex(&lock->wait_lock, flags); spin_unlock_mutex(&lock->wait_lock, flags);
preempt_enable_no_resched(); schedule_preempt_disabled();
schedule();
preempt_disable();
spin_lock_mutex(&lock->wait_lock, flags); spin_lock_mutex(&lock->wait_lock, flags);
} }

View File

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