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: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Peter 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.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
74c578759f
commit
84e0dacd0c
|
@ -118,7 +118,7 @@ static inline void guest_enter_irqoff(void)
|
|||
* one time slice). Lets treat guest mode as quiescent state, just like
|
||||
* 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());
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static inline bool context_tracking_enabled(void)
|
|||
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);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ static inline bool context_tracking_in_user(void)
|
|||
#else
|
||||
static inline bool context_tracking_in_user(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
|
||||
|
|
|
@ -34,7 +34,7 @@ static inline bool vtime_accounting_enabled(void)
|
|||
static inline bool vtime_accounting_cpu_enabled(void)
|
||||
{
|
||||
if (vtime_accounting_enabled()) {
|
||||
if (context_tracking_cpu_is_enabled())
|
||||
if (context_tracking_enabled_this_cpu())
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue