lkml.org 
[lkml]   [2019]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 06/14] context_tracking: Rename context_tracking_is_cpu_enabled() to context_tracking_enabled_this_cpu()
    Date
    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>
    Cc: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Wanpeng Li <wanpengli@tencent.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    ---
    include/linux/context_tracking.h | 2 +-
    include/linux/context_tracking_state.h | 4 ++--
    include/linux/vtime.h | 2 +-
    3 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
    index f1601bac08dc..c9065ad518a7 100644
    --- a/include/linux/context_tracking.h
    +++ b/include/linux/context_tracking.h
    @@ -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());
    }

    diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
    index 91250bdf2060..08f125f6b31b 100644
    --- a/include/linux/context_tracking_state.h
    +++ b/include/linux/context_tracking_state.h
    @@ -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
    diff --git a/include/linux/vtime.h b/include/linux/vtime.h
    index 0fc7f11f7aa4..54e91511250b 100644
    --- a/include/linux/vtime.h
    +++ b/include/linux/vtime.h
    @@ -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;
    }

    --
    2.23.0
    \
     
     \ /
      Last update: 2019-10-16 04:58    [W:5.503 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site