Commit 84e0dacd authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enabled_this_cpu()

Standardize the naming on top of the context_tracking_enabled_*() base.
Also make it clear we are checking the context tracking state of the
*current* CPU with this function. We'll need to add an API to check that
state on remote CPUs as well, so we must disambiguate the naming.
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J . Wysocki <rjw@rjwysocki.net>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Wanpeng Li <wanpengli@tencent.com>
Cc: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Link: https://lkml.kernel.org/r/20191016025700.31277-7-frederic@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 74c57875
...@@ -118,7 +118,7 @@ static inline void guest_enter_irqoff(void) ...@@ -118,7 +118,7 @@ static inline void guest_enter_irqoff(void)
* one time slice). Lets treat guest mode as quiescent state, just like * one time slice). Lets treat guest mode as quiescent state, just like
* we do with user-mode execution. * we do with user-mode execution.
*/ */
if (!context_tracking_cpu_is_enabled()) if (!context_tracking_enabled_this_cpu())
rcu_virt_note_context_switch(smp_processor_id()); rcu_virt_note_context_switch(smp_processor_id());
} }
......
...@@ -31,7 +31,7 @@ static inline bool context_tracking_enabled(void) ...@@ -31,7 +31,7 @@ static inline bool context_tracking_enabled(void)
return static_branch_unlikely(&context_tracking_key); return static_branch_unlikely(&context_tracking_key);
} }
static inline bool context_tracking_cpu_is_enabled(void) static inline bool context_tracking_enabled_this_cpu(void)
{ {
return __this_cpu_read(context_tracking.active); return __this_cpu_read(context_tracking.active);
} }
...@@ -43,7 +43,7 @@ static inline bool context_tracking_in_user(void) ...@@ -43,7 +43,7 @@ static inline bool context_tracking_in_user(void)
#else #else
static inline bool context_tracking_in_user(void) { return false; } static inline bool context_tracking_in_user(void) { return false; }
static inline bool context_tracking_enabled(void) { return false; } static inline bool context_tracking_enabled(void) { return false; }
static inline bool context_tracking_cpu_is_enabled(void) { return false; } static inline bool context_tracking_enabled_this_cpu(void) { return false; }
#endif /* CONFIG_CONTEXT_TRACKING */ #endif /* CONFIG_CONTEXT_TRACKING */
#endif #endif
...@@ -34,7 +34,7 @@ static inline bool vtime_accounting_enabled(void) ...@@ -34,7 +34,7 @@ static inline bool vtime_accounting_enabled(void)
static inline bool vtime_accounting_cpu_enabled(void) static inline bool vtime_accounting_cpu_enabled(void)
{ {
if (vtime_accounting_enabled()) { if (vtime_accounting_enabled()) {
if (context_tracking_cpu_is_enabled()) if (context_tracking_enabled_this_cpu())
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment