This version uses Peter's suggestion from [1] as if and incrementally adds cleanup on top to the arch/ bits. I've tested the x86 side but the PowerPC and the s390 bits are only build tested. Review and feedback is greatly appreciated.
[1] https://lore.kernel.org/lkml/20250825091910.gt3245...@noisy.programming.kicks-ass.net/ Patches are prepared on top of tip:master at commit 4628e5bbca91 ("Merge branch into tip/master: 'x86/tdx'") --- changelog v6..v7: o Fix the s390 and ppc build errors (Intel test robot) o Use Peter's diff as is and incrementally do the cleanup on top. The PowerPC part was slightly more extensive due to the lack of CONFIG_SCHED_MC in arch/powerpc/Kconfig. v6: https://lore.kernel.org/lkml/20250825120244.11093-1-kprateek.na...@amd.com/ --- K Prateek Nayak (7): powerpc/smp: Rename cpu_corgroup_* to cpu_corgrp_* powerpc/smp: Export cpu_coregroup_mask() powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC scheduling bits sched/topology: Unify tl_smt_mask() across core and all arch sched/topology: Unify tl_cls_mask() across core and x86 sched/topology: Unify tl_mc_mask() across core and all arch sched/topology: Unify tl_pkg_mask() across core and all arch Peter Zijlstra (1): sched/fair: Get rid of sched_domains_curr_level hack for tl->cpumask() arch/powerpc/Kconfig | 9 ++++++ arch/powerpc/include/asm/smp.h | 4 +++ arch/powerpc/kernel/smp.c | 51 +++++++++++++++++++--------------- arch/s390/kernel/topology.c | 16 ++++------- arch/x86/kernel/smpboot.c | 9 +++--- include/linux/sched/topology.h | 34 ++++++++++++++++++++--- include/linux/topology.h | 2 +- kernel/sched/topology.c | 28 +++++++------------ 8 files changed, 93 insertions(+), 60 deletions(-) base-commit: 4628e5bbca916edaf4ed55915ab399f9ba25519f -- 2.34.1