• K
    perf/x86/intel/uncore: Add Sapphire Rapids server framework · b4a638a8
    Kan Liang 提交于
    mainline inclusion
    from mainline-v5.15-rc1
    commit c54c53d9
    category: feature
    feature: SPR PMU uncore support
    bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5BECO
    
    Intel-SIG: commit c54c53d9 perf/x86/intel/uncore: Add Sapphire
    Rapids server framework
    This commit is backported for SPR PMU uncore support.
    
    -------------------------------------
    
    Intel Sapphire Rapids supports a discovery mechanism, that allows an
    uncore driver to discover the different components ("boxes") of the
    chip.
    
    All the generic information of the uncore boxes should be retrieved from
    the discovery tables. This has been enabled with the commit edae1f06
    ("perf/x86/intel/uncore: Parse uncore discovery tables"). Add
    use_discovery to indicate the case. The uncore driver doesn't need to
    hard code the generic information for each uncore box.
    But we still need to enable various functionality that cannot be
    directly discovered.
    
    To support these functionalities, the Sapphire Rapids server framework
    is introduced here. Each specific uncore unit will be added into the
    framework in the following patches.
    
    Add use_discovery to indicate that the discovery mechanism is required
    for the platform. Currently, Intel Sapphire Rapids is one of the
    platforms.
    
    The box ID from the discovery table is the accurate index. Use it if
    applicable.
    
    All the undiscovered platform-specific features will be hard code in the
    spr_uncores[]. Add uncore_type_customized_copy(), instead of the memcpy,
    to only overwrite these features.
    
    The specific uncore unit hasn't been added here. From user's
    perspective, there is nothing changed for now.
    Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
    Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: NAndi Kleen <ak@linux.intel.com>
    Link: https://lore.kernel.org/r/1625087320-194204-2-git-send-email-kan.liang@linux.intel.comSigned-off-by: NYunying Sun <yunying.sun@intel.com>
    Signed-off-by: NAichun Shi <aichun.shi@intel.com>
    b4a638a8
uncore.c 46.0 KB