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

Xueming Li xuemingl at nvidia.com
Mon Nov 11 07:27:15 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=418efc7dd043b02b6666fe70b88613dd8984bb98

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 418efc7dd043b02b6666fe70b88613dd8984bb98 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lib/power/power_cppc_cpufreq.c b/lib/power/power_cppc_cpufreq.c
index bb70f6ae52..f2ba684c83 100644
--- a/lib/power/power_cppc_cpufreq.c
+++ b/lib/power/power_cppc_cpufreq.c
@@ -36,7 +36,7 @@
 #define POWER_SYSFILE_SYS_MAX \
 		"/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

 enum power_state {
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index 6f18ed0adf..20aa753c3a 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -419,11 +419,12 @@ check_scale(unsigned int lcore)
 {
 	enum power_management_env env;

-	/* only PSTATE and ACPI modes are supported */
+	/* only PSTATE, AMD-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_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ)) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
+			!rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ) &&
+			!rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) {
+		RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported\n");
 		return -ENOTSUP;
 	}
 	/* ensure we could initialize the power library */
@@ -433,8 +434,8 @@ 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 &&
-			env != PM_ENV_AMD_PSTATE_CPUFREQ) {
-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
+			env != PM_ENV_AMD_PSTATE_CPUFREQ && env != PM_ENV_CPPC_CPUFREQ) {
+		RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes\n");
 		return -ENOTSUP;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-11 14:23:06.652309809 +0800
+++ 0029-power-enable-CPPC.patch	2024-11-11 14:23:05.062192841 +0800
@@ -1 +1 @@
-From 35220c7cb3aff022b3a41919139496326ef6eecc Mon Sep 17 00:00:00 2001
+From 418efc7dd043b02b6666fe70b88613dd8984bb98 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 32aaacb948..e68b39b424 100644
+index bb70f6ae52..f2ba684c83 100644
@@ -35 +37 @@
-index b1c18a5f56..830a6c7a97 100644
+index 6f18ed0adf..20aa753c3a 100644
@@ -47 +49 @@
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes are supported");
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes are supported\n");
@@ -50 +52 @@
-+		POWER_LOG(DEBUG, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported");
++		RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported\n");
@@ -59 +61 @@
--		POWER_LOG(DEBUG, "Neither ACPI nor PSTATE modes were initialized");
+-		RTE_LOG(DEBUG, POWER, "Neither ACPI nor PSTATE modes were initialized\n");
@@ -61 +63 @@
-+		POWER_LOG(DEBUG, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes");
++		RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes\n");


More information about the stable mailing list