summaryrefslogtreecommitdiff
path: root/include/linux/context_tracking_state.h
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2015-11-12 23:59:01 +0300
committerIngo Molnar <mingo@kernel.org>2015-11-24 11:56:43 +0300
commited11a7f1b3bd482bd7d6ef7bc2859c41fb43b9ee (patch)
tree35dbeb8917ca3b467a7f55325616ba6939501eb9 /include/linux/context_tracking_state.h
parent49b24106315ddf7b024cf6d289e2ff5c2c7a69fc (diff)
downloadlinux-ed11a7f1b3bd482bd7d6ef7bc2859c41fb43b9ee.tar.xz
context_tracking: Switch to new static_branch API
This is much less error-prone than the old code. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/812df7e64f120c5c7c08481f36a8caa9f53b2199.1447361906.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/context_tracking_state.h')
-rw-r--r--include/linux/context_tracking_state.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
index ee956c528fab..1d34fe68f48a 100644
--- a/include/linux/context_tracking_state.h
+++ b/include/linux/context_tracking_state.h
@@ -22,12 +22,12 @@ struct context_tracking {
};
#ifdef CONFIG_CONTEXT_TRACKING
-extern struct static_key context_tracking_enabled;
+extern struct static_key_false context_tracking_enabled;
DECLARE_PER_CPU(struct context_tracking, context_tracking);
static inline bool context_tracking_is_enabled(void)
{
- return static_key_false(&context_tracking_enabled);
+ return static_branch_unlikely(&context_tracking_enabled);
}
static inline bool context_tracking_cpu_is_enabled(void)