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 574EA45CE3 for ; Mon, 11 Nov 2024 07:32:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 500FA40685; Mon, 11 Nov 2024 07:32:20 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2064.outbound.protection.outlook.com [40.107.237.64]) by mails.dpdk.org (Postfix) with ESMTP id 11C3F40685 for ; Mon, 11 Nov 2024 07:32:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jVPRCcLdf3RpymgI/lIPzVUEbCVhwqkqOY1ieiCJL8IHVBQcmY3mdCq7IbhQCMv/C6UDbB/WxW2614UnenPPbeTnrqchDN0E5BhwLInelW2alpsBCGgrFVU6cXxZtbxywntnpi+7hla9QpbUuZDNEMmYe5yyNVurbeG2OHbyrocYU/jZVFFKhxo7hSPU8sIajbmQF/Ch+lmcf5X8JIqC5+9Eb6iMuLBuMDOqKq8c75zo4SjelsISgUx+6RiQb6VeYkuKMSKxHTFdsmyWN6OU4OFLM7nVhMLR0V1OukdYouoWp7LuLf1kHOpmDIHyksC1/d73OMV+Pdmf56Nl8Vy+eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WITM3iDnYhowH1K2S8Kmh2jntiRchCe1cDXRegvDUz8=; b=u2xUayTP2ns3GsyNrXZ4HKmhLjCT8r6N2plEb8zk0mBNuyZE6mWm+uE7iXpgo9V+Y40LjJOzAqnc9XYyLsGFQ2mK9vYFkjCgT/csX9FnXILJE3cgz2/CXnhlQDJsWXGGGsCYyla3owxHKi2osiuHaoeEAvX61JoArvfWxhW48mS62X2y3Y1U1bsTsXb9CS0hVFQfrSldtIZxsjJGWrPZnQDjt1BXLprTGtGGSBFXVbEzedqI/a50/F68lCFiwnsk6ol+c07mq2Rte6KshBFHgnHBzNqNMGxhAc57FI20830G6U7Vc096ruBuV0eYc6y+nnO8Z2Zdibi/QgpqI2XLVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WITM3iDnYhowH1K2S8Kmh2jntiRchCe1cDXRegvDUz8=; b=p3qg+Q2L4QAfDjCTNaGb4I5G1yAlhRMzEjJ++mGgP2fgm06qR/SgYYQ3NT6W3R+iZHsY5tLIBnVMWxrWrj4cjcitVEXflQqmnzWC8er8OVkhyjPhbZUomxMDuFLY2T4vEStT/1wMa3HKASqEzjdpRTYTl61geNcJeK3mPgXkif466Nc2LDsqSHcDUuv0yr0Yq/Fv6DqWSMfKD9pn4cx/zr4AWg47ENPXwt+vsXTPEu0X0uKGcJzk0hOF6jRIE/GvwL1PBLE+lHvnHPzJmnOxWxzRUoF8T9MPjU0FKnH3KDcGY53boGu9ElmXXS7zTicKncfdhv5M4uF7jr12rPm7dA== Received: from BL0PR01CA0027.prod.exchangelabs.com (2603:10b6:208:71::40) by SJ1PR12MB6339.namprd12.prod.outlook.com (2603:10b6:a03:454::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27; Mon, 11 Nov 2024 06:32:15 +0000 Received: from BN2PEPF000055DE.namprd21.prod.outlook.com (2603:10b6:208:71:cafe::ec) by BL0PR01CA0027.outlook.office365.com (2603:10b6:208:71::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:32:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000055DE.mail.protection.outlook.com (10.167.245.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Mon, 11 Nov 2024 06:32:14 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:32:00 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:31:58 -0800 From: Xueming Li To: Wathsala Vithanage CC: , Dhruv Tripathi , "dpdk stable" Subject: patch 'power: enable CPPC' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:15 +0800 Message-ID: <20241111062847.216344-30-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DE:EE_|SJ1PR12MB6339:EE_ X-MS-Office365-Filtering-Correlation-Id: d05ba274-1337-4cf1-0fb6-08dd021a9514 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6VNaEuf2NE6wd9W9bujoSOCeeyDdKVneeXMAelbNXsvoEfxzXrGqHi2Rgo3m?= =?us-ascii?Q?FGbMI+1h54dDk8wHPwzgIZLkN89VxKieFLofobas5l/T+nQVp0qLeHD67IhS?= =?us-ascii?Q?PsONt/qABoC3707zLiXoxAXxBLCre2ZKyhsnCJqkTENeEYQteoxSL3OQXKYt?= =?us-ascii?Q?ItXl3zkKn6T1oNMYrR88730vpPU9w6uYFjHxJrxVeF3eqOgTUZgJ9pKsBYZs?= =?us-ascii?Q?aMhVGFFjix5803KWgZuTLu0Cpr4QXoDLvTn+JoMp/M/GhEHIIwnvtL8+ywCF?= =?us-ascii?Q?Wn/ccZdm1pvh+/OsOz9bWwTkWYIQV++OLNSQaJHuJSywN9lnLUgUrz9N9sb7?= =?us-ascii?Q?APbW7sfRmwstf4OYx7hfkE9ZWLraZjGlEdl2K/gqRnPLUM/Oie3NnxAdby9G?= =?us-ascii?Q?A83qSI43/Zzhg4OyLc//NKFESWwPlHsv+M/ZMVuo/FWEUe1c1cyhO2GtTsgS?= =?us-ascii?Q?R7B/yCNGzDl7igc8+6AEP8OPAszbBJDi2qdMTli+dYV7exgyVfdU8da623lK?= =?us-ascii?Q?7KTKhm3a7oIDFcGfo54rbJ19aoy3Y39r6Aegl4g79g95KyNGITorhINeDIjG?= =?us-asc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:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:32:14.7972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d05ba274-1337-4cf1-0fb6-08dd021a9514 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000055DE.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6339 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 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 --- >From 418efc7dd043b02b6666fe70b88613dd8984bb98 Mon Sep 17 00:00:00 2001 From: Wathsala Vithanage Date: Thu, 10 Oct 2024 14:17:36 +0000 Subject: [PATCH] power: enable CPPC Cc: Xueming Li [ 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 | 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 + +[ upstream commit 35220c7cb3aff022b3a41919139496326ef6eecc ] @@ -12 +14,0 @@ -Cc: stable@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");