diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-28 02:39:55 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-11-10 12:06:22 +0100 |
commit | f70cd6b07e629f367bb9b1ac9d0e3e669eb325c0 (patch) | |
tree | d7598a2f03f41b30d8dd415eabcc27f9785bbc58 /kernel | |
parent | 8cfe9866960581303f244780945c5d12ecc4e5bc (diff) | |
download | linux-stable-f70cd6b07e629f367bb9b1ac9d0e3e669eb325c0.tar.gz linux-stable-f70cd6b07e629f367bb9b1ac9d0e3e669eb325c0.tar.bz2 linux-stable-f70cd6b07e629f367bb9b1ac9d0e3e669eb325c0.zip |
context_tracking: remove duplicate enabled check
All calls to context_tracking_enter and context_tracking_exit
are already checking context_tracking_is_enabled, except the
context_tracking_user_enter and context_tracking_user_exit
functions left in for the benefit of assembly calls.
Pull the check up to those functions, by making them simple
wrappers around the user_enter and user_exit inline functions.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Tested-by: Rik van Riel <riel@redhat.com>
Acked-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/context_tracking.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 0a495ab35bc7..6d4c6ce21275 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -63,15 +63,6 @@ void context_tracking_enter(enum ctx_state state) unsigned long flags; /* - * Repeat the user_enter() check here because some archs may be calling - * this from asm and if no CPU needs context tracking, they shouldn't - * go further. Repeat the check here until they support the inline static - * key check. - */ - if (!context_tracking_is_enabled()) - return; - - /* * Some contexts may involve an exception occuring in an irq, * leading to that nesting: * rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit() @@ -128,7 +119,7 @@ EXPORT_SYMBOL_GPL(context_tracking_enter); void context_tracking_user_enter(void) { - context_tracking_enter(CONTEXT_USER); + user_enter(); } NOKPROBE_SYMBOL(context_tracking_user_enter); @@ -148,9 +139,6 @@ void context_tracking_exit(enum ctx_state state) { unsigned long flags; - if (!context_tracking_is_enabled()) - return; - if (in_interrupt()) return; @@ -181,7 +169,7 @@ EXPORT_SYMBOL_GPL(context_tracking_exit); void context_tracking_user_exit(void) { - context_tracking_exit(CONTEXT_USER); + user_exit(); } NOKPROBE_SYMBOL(context_tracking_user_exit); |