• Ben Hutchings's avatar
    sched: Add sched_smt_active() · c8034099
    Ben Hutchings authored
    Add the sched_smt_active() function needed for some x86 speculation
    mitigations.  This was introduced upstream by commits 1b568f0a
    "sched/core: Optimize SCHED_SMT", ba2591a5 "sched/smt: Update
    sched_smt_present at runtime", c5511d03 "sched/smt: Make
    sched_smt_present track topology", and 321a874a "sched/smt: Expose
    sched_smt_present static key".  The upstream implementation uses the
    static_key_{disable,enable}_cpuslocked() functions, which aren't
    practical to backport.
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c8034099
core.c 218 KB