From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 567C345DB9 for ; Wed, 27 Nov 2024 18:20:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5364B4060C; Wed, 27 Nov 2024 18:20:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1E5FC40663 for ; Wed, 27 Nov 2024 18:20:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vWZ31AmCMFuUqo1VBSSZ8A+9MFkRviUJlU+aod1eCFM=; b=ZzUxK1yHA673zkavxdTB055evUwCrg4ayIXnzL54ef0txsTXU7EeMldbSLd2K17Mp2doYc Bk8nBqDlTDre1ndIV+Pwf07TDQMyD+x/Qd1ilKScTZ3hYb74KN5TSMZp3aFcyGsZ/u9YP2 qNAC6uGqpVb0o1elctV2oM+WrbQQ/U8= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-134-oOXxsYrxPZiDNgdRXLJC0g-1; Wed, 27 Nov 2024 12:20:12 -0500 X-MC-Unique: oOXxsYrxPZiDNgdRXLJC0g-1 X-Mimecast-MFC-AGG-ID: oOXxsYrxPZiDNgdRXLJC0g Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 69C9D1955F35; Wed, 27 Nov 2024 17:20:11 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5E07300019E; Wed, 27 Nov 2024 17:20:09 +0000 (UTC) From: Kevin Traynor To: Wathsala Vithanage Cc: Dhruv Tripathi , dpdk stable Subject: patch 'power: enable CPPC' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:17:25 +0000 Message-ID: <20241127171916.690404-18-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 62BZj7x-ZpN0EG9xJSoiyznMSYIsswdPisdYmkKqwx4_1732728011 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Reviewed-by: Dhruv Tripathi --- 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@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");