context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enable...
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 16 Oct 2019 02:56:52 +0000 (04:56 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 29 Oct 2019 09:01:12 +0000 (10:01 +0100)
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>
include/linux/context_tracking.h
include/linux/context_tracking_state.h
include/linux/vtime.h

index f1601bac08dc9d26cdd98246633ff7fc9c20ad23..c9065ad518a712b4bd8df9eb720d01fa7fe146dd 100644 (file)
@@ -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());
 }
 
index 91250bdf206065409c9a19a582432b318874ca6e..08f125f6b31bbea198ab3b0216960c5709327b1e 100644 (file)
@@ -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
index 0fc7f11f7aa4224106d42602c3dc01231554a5f0..54e91511250b9ccbef6d34e09fb69f7cd4ea9533 100644 (file)
@@ -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;
        }