patch 'power: enable CPPC' has been queued to stable release 21.11.9

Kevin Traynor ktraynor at redhat.com
Wed Nov 27 18:17:25 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/26bb6c9f32361f1ae5a8bfad766ead7cdf036d85

Thanks.

Kevin

---
>From 26bb6c9f32361f1ae5a8bfad766ead7cdf036d85 Mon Sep 17 00:00:00 2001
From: Wathsala Vithanage <wathsala.vithanage at arm.com>
Date: Thu, 10 Oct 2024 14:17:36 +0000
Subject: [PATCH] power: enable CPPC

[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]

Power library already supports Linux CPPC driver,
but initialization was failing.
Enable its use in the drivers check,
and fix the name of the CPPC driver name.

Fixes: ef1cc88f1837 ("power: support cppc_cpufreq driver")

Signed-off-by: Wathsala Vithanage <wathsala.vithanage at arm.com>
Reviewed-by: Dhruv Tripathi <dhruv.tripathi at arm.com>
---
 lib/power/power_cppc_cpufreq.c |  2 +-
 lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index 25185a791c..3223a6a445 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -35,5 +35,5 @@
 		"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_max_freq"
 
-#define POWER_CPPC_DRIVER "cppc-cpufreq"
+#define POWER_CPPC_DRIVER "cppc_cpufreq"
 #define BUS_FREQ     100000
 
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index 39a2b4cd23..d73f450538 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -413,8 +413,9 @@ check_scale(unsigned int lcore)
 	enum power_management_env env;
 
-	/* only PSTATE and ACPI modes are supported */
+	/* only PSTATE, ACPI and CPPC modes are supported */
 	if (!rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ) &&
-	    !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
+			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
+			!rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) {
+		POWER_LOG(DEBUG, "Only ACPI, PSTATE, or CPPC modes are supported");
 		return -ENOTSUP;
 	}
@@ -425,6 +426,7 @@ check_scale(unsigned int lcore)
 	/* ensure we initialized the correct env */
 	env = rte_power_get_env();
-	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
+	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
+			env != PM_ENV_CPPC_CPUFREQ) {
+		POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, or CPPC modes");
 		return -ENOTSUP;
 	}
-- 
2.47.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 17:17:38.886704070 +0000
+++ 0018-power-enable-CPPC.patch	2024-11-27 17:17:38.173269103 +0000
@@ -1 +1 @@
-From 35220c7cb3aff022b3a41919139496326ef6eecc Mon Sep 17 00:00:00 2001
+From 26bb6c9f32361f1ae5a8bfad766ead7cdf036d85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- lib/power/rte_power_pmd_mgmt.c | 11 ++++++-----
- 2 files changed, 7 insertions(+), 6 deletions(-)
+ lib/power/rte_power_pmd_mgmt.c | 12 +++++++-----
+ 2 files changed, 8 insertions(+), 6 deletions(-)
@@ -22 +23 @@
-index 32aaacb948..e68b39b424 100644
+index 25185a791c..3223a6a445 100644
@@ -25 +26 @@
-@@ -37,5 +37,5 @@
+@@ -35,5 +35,5 @@
@@ -33 +34 @@
-index b1c18a5f56..830a6c7a97 100644
+index 39a2b4cd23..d73f450538 100644
@@ -36 +37 @@
-@@ -420,9 +420,10 @@ check_scale(unsigned int lcore)
+@@ -413,8 +413,9 @@ check_scale(unsigned int lcore)
@@ -40 +41 @@
-+	/* only PSTATE, AMD-PSTATE, ACPI and CPPC modes are supported */
++	/* only PSTATE, ACPI and CPPC modes are supported */
@@ -42,4 +43,3 @@
- 			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
--			!rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ)) {
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes are supported");
-+			!rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ) &&
+-	    !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) {
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
++			!rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
@@ -47 +47 @@
-+		POWER_LOG(DEBUG, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported");
++		POWER_LOG(DEBUG, "Only ACPI, PSTATE, or CPPC modes are supported");
@@ -50 +50,2 @@
-@@ -434,6 +435,6 @@ check_scale(unsigned int lcore)
+@@ -425,6 +426,7 @@ check_scale(unsigned int lcore)
+ 	/* ensure we initialized the correct env */
@@ -52,5 +53,5 @@
- 	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
--			env != PM_ENV_AMD_PSTATE_CPUFREQ) {
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes were initialized");
-+			env != PM_ENV_AMD_PSTATE_CPUFREQ && env != PM_ENV_CPPC_CPUFREQ) {
-+		POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes");
+-	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ) {
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
++	if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
++			env != PM_ENV_CPPC_CPUFREQ) {
++		POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, or CPPC modes");



More information about the stable mailing list