diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-06-19 23:56:22 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-08-13 00:40:43 +0200 |
commit | fbb00b568bc93073452d2a0f9f06e7c33d16eece (patch) | |
tree | 1e0d6f980341e3f7848717ba6e3ea9816e44baa4 /kernel/context_tracking.c | |
parent | ae920eb24277e4a174a3ca575ce42b98b18a6748 (diff) | |
download | blackbird-op-linux-fbb00b568bc93073452d2a0f9f06e7c33d16eece.tar.gz blackbird-op-linux-fbb00b568bc93073452d2a0f9f06e7c33d16eece.zip |
sched: Consolidate open coded preemptible() checks
preempt_schedule() and preempt_schedule_context() open
code their preemptability checks.
Use the standard API instead for consolidation.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Alex Shi <alex.shi@intel.com>
Cc: Paul Turner <pjt@google.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Diffstat (limited to 'kernel/context_tracking.c')
-rw-r--r-- | kernel/context_tracking.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 383f8231e436..942835c12ae5 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -87,10 +87,9 @@ void user_enter(void) */ void __sched notrace preempt_schedule_context(void) { - struct thread_info *ti = current_thread_info(); enum ctx_state prev_ctx; - if (likely(ti->preempt_count || irqs_disabled())) + if (likely(!preemptible())) return; /* |