mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
9eef7f9da9
The TPMI (Topology Aware Register and PM Capsule Interface) provides a flexible, extendable and PCIe enumerable MMIO interface for PM features. Intel RAPL (Running Average Power Limit) is one of the features that benefit from this. Using TPMI Interface has advantage over traditional MSR (Model Specific Register) interface, where a thread needs to be scheduled on the target CPU to read or write. Also the RAPL features vary between CPU models, and hence lot of model specific code. Here TPMI provides an architectural interface by providing hierarchical tables and fields, which will not need any model specific implementation. TPMI interface uses a PCI VSEC structure to expose the location of MMIO interface for PM feature enumeration and control. The Intel VSEC driver parses VSEC structures present in the PCI configuration space of the given device and creates an auxiliary device object for each of them. In particular, it creates an auxiliary device object representing TPMI that can be bound to by an auxiliary driver. Then the TPMI enumeration driver binds to the TPMI auxiliary device object created by the Intel VSEC driver, parses the PM Feature Structure (PFS) present in the TPMI MMIO region and creates device nodes for PM features described in the PFS. This RAPL TPMI Interface driver binds the RAPL auxiliary device created by the TPMI enumeration driver and expose the RAPL control to userspace via powercap sysfs class. RAPL TPMI details are published in the following document: https://github.com/intel/tpmi_power_management/blob/main/RAPL_TPMI_public_disclosure_FINAL.docx Note, for now, the RAPL TPMI Interface and RAPL MSR Interface cannot co-exists on the same platform (RAPL TPMI Interface is not supported on any platforms in the CPU model list for RAPL MSR Interface). Thus register the RAPL TPMI powercap control type with name "intel-rapl", the same as RAPL MSR Interface, so that it is transparent to userspace. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Wang Wendy <wendy.wang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 lines
439 B
Makefile
11 lines
439 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
obj-$(CONFIG_DTPM) += dtpm.o
|
|
obj-$(CONFIG_DTPM_CPU) += dtpm_cpu.o
|
|
obj-$(CONFIG_DTPM_DEVFREQ) += dtpm_devfreq.o
|
|
obj-$(CONFIG_POWERCAP) += powercap_sys.o
|
|
obj-$(CONFIG_INTEL_RAPL_CORE) += intel_rapl_common.o
|
|
obj-$(CONFIG_INTEL_RAPL) += intel_rapl_msr.o
|
|
obj-$(CONFIG_INTEL_RAPL_TPMI) += intel_rapl_tpmi.o
|
|
obj-$(CONFIG_IDLE_INJECT) += idle_inject.o
|
|
obj-$(CONFIG_ARM_SCMI_POWERCAP) += arm_scmi_powercap.o
|