2019-05-19 20:07:45 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-12-09 00:41:44 +08:00
|
|
|
obj-$(CONFIG_DTPM) += dtpm.o
|
2020-12-09 00:41:45 +08:00
|
|
|
obj-$(CONFIG_DTPM_CPU) += dtpm_cpu.o
|
2022-01-29 00:35:36 +08:00
|
|
|
obj-$(CONFIG_DTPM_DEVFREQ) += dtpm_devfreq.o
|
2013-10-12 07:54:56 +08:00
|
|
|
obj-$(CONFIG_POWERCAP) += powercap_sys.o
|
2019-07-10 21:44:30 +08:00
|
|
|
obj-$(CONFIG_INTEL_RAPL_CORE) += intel_rapl_common.o
|
|
|
|
obj-$(CONFIG_INTEL_RAPL) += intel_rapl_msr.o
|
powercap: intel_rapl: Introduce RAPL TPMI interface driver
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>
2023-04-19 10:44:19 +08:00
|
|
|
obj-$(CONFIG_INTEL_RAPL_TPMI) += intel_rapl_tpmi.o
|
2018-06-26 18:53:29 +08:00
|
|
|
obj-$(CONFIG_IDLE_INJECT) += idle_inject.o
|
2022-10-14 01:46:12 +08:00
|
|
|
obj-$(CONFIG_ARM_SCMI_POWERCAP) += arm_scmi_powercap.o
|