mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 13:21:45 +00:00
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>
This commit is contained in:
parent
49b2410631
commit
ed11a7f1b3
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue