• Thomas Gleixner's avatar
    x86/cpu/topology: Use topology bitmaps for sizing · 090610ba
    Thomas Gleixner authored
    Now that all possible APIC IDs are tracked in the topology bitmaps, its
    trivial to retrieve the real information from there.
    
    This gets rid of the guesstimates for the maximal packages and dies per
    package as the actual numbers can be determined before a single AP has been
    brought up.
    
    The number of SMT threads can now be determined correctly from the bitmaps
    in all situations. Up to now a system which has SMT disabled in the BIOS
    will still claim that it is SMT capable, because the lowest APIC ID bit is
    reserved for that and CPUID leaf 0xb/0x1f still enumerates the SMT domain
    accordingly. By calculating the bitmap weights of the SMT and the CORE
    domain and setting them into relation the SMT disabled in BIOS situation
    reports correctly that the system is not SMT capable.
    
    It also handles the situation correctly when a hybrid systems boot CPU does
    not have SMT as it takes the SMT capability of the APs fully into account.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Tested-by: default avatarMichael Kelley <mhklinux@outlook.com>
    Tested-by: default avatarSohil Mehta <sohil.mehta@intel.com>
    Link: https://lore.kernel.org/r/20240213210252.681709880@linutronix.de
    090610ba
smp.h 4.72 KB