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 F309445BB6 for ; Wed, 23 Oct 2024 23:18:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED83640261; Wed, 23 Oct 2024 23:18:13 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 5E40140261 for ; Wed, 23 Oct 2024 23:18:12 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4315839a7c9so2093375e9.3 for ; Wed, 23 Oct 2024 14:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718292; x=1730323092; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UXTrsr+QjB3G3psuGSROS9AsjkqPgZcWpRT01ONil1M=; b=C+c4E7zAYhAZGjZWTz8AWh5USo21W+efHnTw8k4va84Gt7n7i7Y47sk9cqK3mKRShW kRR1i4Id4CMEkFXeYe2GOzu3dJUJ+kwGM+6ysdIaxDnxRCG01SFwksmgYELPz8O7ul4b QXnFECeZG21PiMIL6p3hMLVxwTA8txHJMiQ6O7W7we+d/OHCkQbAdaqrsijJB8uiw9Op prvKEkzM+t1B53zUG8evdwEORyc0IUSTwaQew03sv3tZbP7qUKrudxNlTKiPiETOxQ+o IpKDNCcnrGR3DL7hAwDgFHw/UVx/Fqej38nxRPu4mYldOoxShuyfb0F9b0Vit0kEeVou Cpmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718292; x=1730323092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UXTrsr+QjB3G3psuGSROS9AsjkqPgZcWpRT01ONil1M=; b=ukPD+5sx5qfdpzUKFD3aYGxA6F+S3i/+PJcUqdghU/TswATk0rRfke+4FfvHhj0YdR LIo4FRpPnGsKF5TSFsAB6LZHu3sMIfQHvu0lHVT9DuPnCWuCcgrI4qmMqRHYKprsAv2k 5keG9xg6NfytgvOfCRQvfv337zT4SL8faDvdN8fX6IPXjooImTHmTNO9yZRZ4/aGmequ bh+ic4lueF+tJkWcV6yFdT8ac5jQgRZESVEfyp8s4gJd0vGbxd0ZLJ5+/7sQnUPmImBW TFCu47qzqt8TE/6Boou8yCFab6G3jm1nOivRaTyYJqs2Zm2F4eKPFjrSAA19Bd4M1ACh z2lA== X-Forwarded-Encrypted: i=1; AJvYcCWxkpnwi/HhkXb1C7yJTbJHCQ8/snRFLCXEBFAHy8UlbrnjSQfQRelSlwI1ED5+ACJS3bYX7y4=@dpdk.org X-Gm-Message-State: AOJu0YyhBOrFJthDTNGcoVoyRZMtvtsn9WqF+IdHAps7eWtKJUwDrE2V 8w1gD/cnhMddGCAEBYno4XVsS7E4AWEoJzl2aaxvLvb1uwZtiFat X-Google-Smtp-Source: AGHT+IFM6fO54F9m55HmaKhVhBirLiVZl27oj8u+3BBDeu7q0aDy7QSLWeNBpwAnFc1RR0REjFMz3g== X-Received: by 2002:a05:600c:4ece:b0:431:5f1c:8362 with SMTP id 5b1f17b1804b1-431841b914bmr26742365e9.35.1729718291869; Wed, 23 Oct 2024 14:18:11 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c1e961sm26563655e9.44.2024.10.23.14.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:18:10 -0700 (PDT) From: luca.boccassi@gmail.com To: Wathsala Vithanage Cc: Dhruv Tripathi , dpdk stable Subject: patch 'power: enable CPPC' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:00 +0100 Message-ID: <20241023211704.1216956-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/2bb52b6763e360c1811cb0e80967d9eccfd77a1d Thanks. Luca Boccassi --- >From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d 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 fc9cffef91..d6cc58cb3b 100644 --- a/lib/power/power_cppc_cpufreq.c +++ b/lib/power/power_cppc_cpufreq.c @@ -35,7 +35,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 f9a2606e6c..18a9819289 100644 --- a/lib/power/rte_power_pmd_mgmt.c +++ b/lib/power/rte_power_pmd_mgmt.c @@ -419,10 +419,11 @@ 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)) { + RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n"); return -ENOTSUP; } /* ensure we could initialize the power library */ @@ -431,8 +432,9 @@ 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) { + RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n"); return -ENOTSUP; } -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.306702521 +0100 +++ 0020-power-enable-CPPC.patch 2024-10-23 22:16:40.451940874 +0100 @@ -1 +1 @@ -From 35220c7cb3aff022b3a41919139496326ef6eecc Mon Sep 17 00:00:00 2001 +From 2bb52b6763e360c1811cb0e80967d9eccfd77a1d 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 fc9cffef91..d6cc58cb3b 100644 @@ -25 +26 @@ -@@ -36,7 +36,7 @@ +@@ -35,7 +35,7 @@ @@ -35 +36 @@ -index b1c18a5f56..830a6c7a97 100644 +index f9a2606e6c..18a9819289 100644 @@ -38 +39 @@ -@@ -419,11 +419,12 @@ check_scale(unsigned int lcore) +@@ -419,10 +419,11 @@ check_scale(unsigned int lcore) @@ -43 +44 @@ -+ /* only PSTATE, AMD-PSTATE, ACPI and CPPC modes are supported */ ++ /* only PSTATE, ACPI and CPPC modes are supported */ @@ -45,4 +46,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) && @@ -50 +50 @@ -+ POWER_LOG(DEBUG, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported"); ++ RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, or CPPC modes are supported\n"); @@ -54 +54,2 @@ -@@ -433,8 +434,8 @@ check_scale(unsigned int lcore) +@@ -431,8 +432,9 @@ check_scale(unsigned int lcore) + @@ -57,5 +58,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) { ++ RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, or CPPC modes\n");