lkml.org 
[lkml]   [2023]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 01/10] cpu/hotplug: remove dependancy against cpu_primary_thread_mask
    Date
    The commit 18415f33e2ac ("cpu/hotplug: Allow "parallel" bringup up to
    CPUHP_BP_KICK_AP_STATE") introduce a dependancy against a global variable
    cpu_primary_thread_mask exported by the X86 code. This variable is only
    used when CONFIG_HOTPLUG_PARALLEL is set.

    Since cpuhp_get_primary_thread_mask() and cpuhp_smt_aware() are only used
    when CONFIG_HOTPLUG_PARALLEL is set, don't define them when it is not set.

    There is no functional change introduce by that patch.

    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
    ---
    kernel/cpu.c | 24 ++++++++++--------------
    1 file changed, 10 insertions(+), 14 deletions(-)

    diff --git a/kernel/cpu.c b/kernel/cpu.c
    index 88a7ede322bd..03309f2f35a4 100644
    --- a/kernel/cpu.c
    +++ b/kernel/cpu.c
    @@ -650,22 +650,8 @@ bool cpu_smt_possible(void)
    }
    EXPORT_SYMBOL_GPL(cpu_smt_possible);

    -static inline bool cpuhp_smt_aware(void)
    -{
    - return topology_smt_supported();
    -}
    -
    -static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
    -{
    - return cpu_primary_thread_mask;
    -}
    #else
    static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
    -static inline bool cpuhp_smt_aware(void) { return false; }
    -static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
    -{
    - return cpu_present_mask;
    -}
    #endif

    static inline enum cpuhp_state
    @@ -1793,6 +1779,16 @@ static int __init parallel_bringup_parse_param(char *arg)
    }
    early_param("cpuhp.parallel", parallel_bringup_parse_param);

    +static inline bool cpuhp_smt_aware(void)
    +{
    + return topology_smt_supported();
    +}
    +
    +static inline const struct cpumask *cpuhp_get_primary_thread_mask(void)
    +{
    + return cpu_primary_thread_mask;
    +}
    +
    /*
    * On architectures which have enabled parallel bringup this invokes all BP
    * prepare states for each of the to be onlined APs first. The last state
    --
    2.41.0
    \
     
     \ /
      Last update: 2023-07-05 16:53    [W:7.342 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site