summaryrefslogtreecommitdiff
path: root/include/linux/context_tracking_state.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-11-06 18:11:57 +0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-12-02 23:43:15 +0400
commitd0df09ebfc126b23c1005f98ddecc9907f9c5d25 (patch)
tree66ac41ceb12f79e4895cee14170ad2b428171df6 /include/linux/context_tracking_state.h
parent58135f574f1b791c926622387780ed3d090116d6 (diff)
downloadlinux-d0df09ebfc126b23c1005f98ddecc9907f9c5d25.tar.xz
context_tracking: Rename context_tracking_active() to context_tracking_cpu_is_enabled()
We currently have a confusing couple of API naming with the existing context_tracking_active() and context_tracking_is_enabled(). Lets keep the latter one, context_tracking_is_enabled(), for global context tracking state check and use context_tracking_cpu_is_enabled() for local state check. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/context_tracking_state.h')
-rw-r--r--include/linux/context_tracking_state.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
index 0db535b79be7..97a81225d037 100644
--- a/include/linux/context_tracking_state.h
+++ b/include/linux/context_tracking_state.h
@@ -26,14 +26,15 @@ static inline bool context_tracking_is_enabled(void)
{
return static_key_false(&context_tracking_enabled);
}
-static inline bool context_tracking_in_user(void)
+
+static inline bool context_tracking_cpu_is_enabled(void)
{
- return __this_cpu_read(context_tracking.state) == IN_USER;
+ return __this_cpu_read(context_tracking.active);
}
-static inline bool context_tracking_active(void)
+static inline bool context_tracking_in_user(void)
{
- return __this_cpu_read(context_tracking.active);
+ return __this_cpu_read(context_tracking.state) == IN_USER;
}
#else
static inline bool context_tracking_in_user(void) { return false; }