power: add p-state driver compatibility
authorLiang Ma <liang.j.ma@intel.com>
Thu, 20 Dec 2018 14:43:42 +0000 (14:43 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 21 Dec 2018 00:33:59 +0000 (01:33 +0100)
commite6c6dc0f96c8b2b353061ae27b1059038189b709
treef6dd4e2436f1a0fb1b2840672bad4fa8df7eb74f
parent85d6815fa6d071afc323c3a0bdfe2d0769ec33d0
power: add p-state driver compatibility

Previously, in order to use the power library, it was necessary
for the user to disable the intel_pstate driver by adding
“intel_pstate=disable” to the kernel command line for the system,
which causes the acpi_cpufreq driver to be loaded in its place.

This patch adds the ability for the power library use the intel-pstate
driver.

It adds a new suite of functions behind the current power library API,
and will seamlessly set up the user facing API function pointers to
the relevant functions depending on whether the system is running with
acpi_cpufreq kernel driver, intel_pstate kernel driver or in a guest,
using kvm. The library API and ABI is unchanged.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
lib/librte_power/Makefile
lib/librte_power/meson.build
lib/librte_power/power_pstate_cpufreq.c [new file with mode: 0644]
lib/librte_power/power_pstate_cpufreq.h [new file with mode: 0644]
lib/librte_power/rte_power.c
lib/librte_power/rte_power.h