• Srinivas Pandruvada's avatar
    platform/x86: ISST: Add SST-CP support via TPMI · 12a7d2cb
    Srinivas Pandruvada authored
    Intel Speed Select Technology Core Power (SST-CP) is an interface that
    allows users to define per core priority. This defines a mechanism to
    distribute power among cores when there is a power constrained
    scenario. This defines a class of service (CLOS) configuration.
    
    Three new IOCTLs are added:
    ISST_IF_CORE_POWER_STATE : Enable/Disable SST-CP
    ISST_IF_CLOS_PARAM : Configure CLOS parameters
    ISST_IF_CLOS_ASSOC : Associate CPUs to a CLOS
    
    To associate CPUs to CLOS, either Linux CPU numbering or PUNIT numbering
    scheme can be used, using parameter punit_cpu_map (1: for PUNIT numbering
    0 for Linux CPU number).
    
    There is no change to IOCTL to get PUNIT CPU number for a CPU.
    
    Introduce get_instance() function, which is used by majority of IOCTLs
    processing to convert a socket and power domain to
    tpmi_per_power_domain_info * instance. This instance has all the MMIO
    offsets stored to read a particular field.
    
    Once an instance is identified, read or write from correct MMIO
    offset for a given field as defined in the specification.
    
    For details on SST CP operations using intel-speed-selet utility,
    refer to:
    Documentation/admin-guide/pm/intel-speed-select.rst
    under the kernel documentation
    Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Reviewed-by: default avatarZhang Rui <rui.zhang@intel.com>
    Tested-by: default avatarPragya Tanwar <pragya.tanwar@intel.com>
    Link: https://lore.kernel.org/r/20230308070642.1727167-5-srinivas.pandruvada@linux.intel.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    12a7d2cb
isst_if.h 7.87 KB