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 51B6345A6D; Sun, 20 Oct 2024 11:23:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26BB840649; Sun, 20 Oct 2024 11:23:40 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2073.outbound.protection.outlook.com [40.107.94.73]) by mails.dpdk.org (Postfix) with ESMTP id 8AB1A402BD for ; Sun, 20 Oct 2024 11:23:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TzwnK4X/sIPjPPK2n2TIh5VkK6cCcBD7VA1thZj95NT5BnF/AKYGNlcIneEwyS8mUfRRY1h04XgVmnBW8quY2BAOke8mucQUMKCaFYramKaxpBLaiw4D/6/jbLhqwh9pIUQBi/AKOX1eh6bQNzrKL7dsFZaZGS58WOtyCZCnkO5o3WQ4/6rOFTe6SJSV7SZDK+qVx9Jt7L72af/WVOxPJHZb6U2aQ1nBmkP5nX9vZLmRfgU5lWeUw5XkNpKWofZe8OOtkcIoIwIKxv0JTMRpjD7n4l0wPoPjyU5R7kV6gIHoMVMrLDFLMJsZRktkQQIFfumHQabjtV/DjMPgKSJoeQ== 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=rvPGhEIyo+otU5rXLmuf5Mgpg4+WyGR9Gk+sKOpDA7Q=; b=Y6QMJeF5Q3EXSY9EGYoArpJbroA0qBCYOXIOwngDrP0WHs0OyDOXuEQhhuY1TwoChsUVpB3n2mSH8Y2ukZ46X/iVTbJLrxmO7/HffqGcAN4PMEhv1f1OB2kgI6jfS6MGH/QMvA98p+pkvr0srsDfQ9xHIkhuzyrFZmg23ChB9qkEJvu8zj4Y5pDwh4pXN6F76Z8ARjJc1lJOgtnKhiXPJrDenIa1NhWR4DSJQaXIiWvrcqBOOQ+Rt44rAJqv54DaWLfM3dgR72bM7XaTH9sI8k0Gjt9tw9PmjzFh6YlK93QWS+Pe+XYbzv4mth9I+DvobsNJhwSYhL6WW0Donk8Gxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rvPGhEIyo+otU5rXLmuf5Mgpg4+WyGR9Gk+sKOpDA7Q=; b=d7YyTGRtQUeAg/w58BxecssNp2Txjs9CNPQlnG9w8TgwbBq0RwhCVT2auwryY5iHQGQdEigAJUhPpKghuZb6+33kFY9LuYfodZOg7PfRCwmIJfoJjy62Cd++t9J5a42fAu/LtWe+UDFfEifg2hE1CNmU3/A6M3EUSdgstLg216s= Received: from CH0PR13CA0001.namprd13.prod.outlook.com (2603:10b6:610:b1::6) by DS0PR12MB7993.namprd12.prod.outlook.com (2603:10b6:8:14b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.26; Sun, 20 Oct 2024 09:23:09 +0000 Received: from CH1PEPF0000AD83.namprd04.prod.outlook.com (2603:10b6:610:b1:cafe::cd) by CH0PR13CA0001.outlook.office365.com (2603:10b6:610:b1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.11 via Frontend Transport; Sun, 20 Oct 2024 09:23:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000AD83.mail.protection.outlook.com (10.167.244.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Sun, 20 Oct 2024 09:23:08 +0000 Received: from jfw9ny3-os.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 20 Oct 2024 04:23:05 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v6 0/5] power: refactor power management library Date: Sun, 20 Oct 2024 09:22:33 +0000 Message-ID: <20241020092233.2906612-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241020092233.2906612-1-sivaprasad.tummala@amd.com> References: <20241017102650.1041030-1-sivaprasad.tummala@amd.com> <20241020092233.2906612-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD83:EE_|DS0PR12MB7993:EE_ X-MS-Office365-Filtering-Correlation-Id: 24d9c894-ebf9-41f0-28eb-08dcf0e8cfde X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4OXbALJraX+6mXha2oyMJ7QBKxZ06hU2QemHj9gmrx3XYuKDCjUCSZxyo/dy?= =?us-ascii?Q?hGK8qK7pLuOVjREqDHphzgifcAo5gh4pmUT6AdL10Bl/Z/I1koMarPZdsOmR?= =?us-ascii?Q?7ejDrh805diS0p3jmGTvuz9KPCnH7xv6zB1/h61lvdrWAeIsIKp7ohsQYCI4?= =?us-ascii?Q?I1/28GzscDmP49E8cFqEhaFBadWRggNBiBjtftMx56Ggi4M6WPiWC9uHVmnZ?= =?us-ascii?Q?9b1wT+pHTUazhUOpPMbRRcRGDdspUBe0E61GV2uOv4B4zeb83C0yXWl5jgjl?= =?us-ascii?Q?PFyLssU9in3R32AoPWyfYn+7mWugwhPhRtz4exlH9m1ArrD2+FdBHNBfNtVg?= =?us-ascii?Q?ENEWTAzBRCCQgX03e8WAhPtJyOGoJi88l88KP6QyCJt6W3JwKxiiX55W1Jnq?= =?us-ascii?Q?/TrAN+3idZH8BoPTOrr9Q4E8QiNi04uuNIK87byQN6aC29f7Unp6IFsESMM8?= =?us-ascii?Q?oiGTX5d9CHa40GkNxN8XbORrES3SUPjjZjgcjv+7rUjNkc5vY9N00JVIcpaF?= =?us-ascii?Q?Nb7Nk/0nSXZrbSkitzoK8GixZ33TAE1rxmz1UaawqZNO949gu0ZXQEg32hME?= =?us-ascii?Q?2ow6gdog7PyIx/gd9FBe/45hz7ct4J1bVJu6dSxe0JcWAA5NENH1+ThG9+mS?= =?us-ascii?Q?sW7oruVyLmeyNktCqR68JTTfT3m+RjHRrkB7fSROxgOFIf2W4m7/4yMA9vRg?= =?us-ascii?Q?XxTLIDhgQL/bzreupjTKCaPYRVM3Rems+axuEKS1sz6g7OldARmO1Epi5oue?= =?us-ascii?Q?c2Y514LmzaVGfR7F7lgJp8sFsEneg9Ilx+/FYy9FXEsRn/MDLTLsBkNI6l8m?= =?us-ascii?Q?ycvNa5JS1WqIQt1uAmHnPmH5GVZ+Ck/1Lmo6dPP6tZe9tQ+wtSlO5Fi0Cp2V?= =?us-ascii?Q?5a4biMBX9LlWP+z8SBbWkMYhqTzonX5qgqtSb4B4RCDNo1a3GfDiLXGwOFLO?= =?us-ascii?Q?7V2Py0Bupy2k7cFH7p8u9HVh26SyyFffjuEhHkmbYzcbKFVtWfZEaObubDjo?= =?us-ascii?Q?CLmLl2kaMf7Rux1S49Iuia3IEFY2V7MAJ+G0QkAhHoEjGi0Jo1Y5bLb1Mwzg?= =?us-ascii?Q?JB/BnsLmLgCj4vJRxP0ox0rXFljgD5mJTCrjqU50yOh2bHh5Zfz8gcETTqgK?= =?us-ascii?Q?8L0oeadSu9H8T1iMgL2p/juc7c8S75GsCqRh2CKfSkgzP7Cpc40VO9BVh+oH?= =?us-ascii?Q?frJTmsdhQYxxUnTJe4zFmS6lYSuRNQWG9dHFUfVXt3DWBjxaDP7Dld21ljit?= =?us-ascii?Q?5n/iRbBrErqDdYWqy5PH9WDrLDrIyxKbxyj9dFmjnm02LYFTCHD5Ce8a0t79?= =?us-ascii?Q?PS3QFgE4lgcIABEvAlCcBU14khH9aYduR5VUJyAdvVLK8GqsZllKb5yfCQqL?= =?us-ascii?Q?S8eShJztiRNxw+qMWyim22W2UsbHcU57Pqxv5JpfZ5VNjD6Fbg=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2024 09:23:08.9508 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24d9c894-ebf9-41f0-28eb-08dcf0e8cfde X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD83.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7993 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patchset refactors the power management library, addressing both core and uncore power management. The primary changes involve the creation of dedicated directories for each driver within 'drivers/power/core/*' and 'drivers/power/uncore/*'. This refactor significantly improves code organization, enhances clarity, and boosts maintainability. It lays the foundation for more focused development on individual drivers and facilitates seamless integration of future enhancements, particularly the AMD uncore driver. Furthermore, this effort aims to streamline code maintenance by consolidating common functions for cpufreq and cppc across various core drivers, thus reducing code duplication. Sivaprasad Tummala (5): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations drivers/power: uncore support for AMD EPYC processors maintainers: update for drivers/power MAINTAINERS | 1 + app/test/test_power.c | 95 ----- app/test/test_power_cpufreq.c | 52 --- app/test/test_power_kvm_vm.c | 36 -- drivers/meson.build | 1 + .../power/acpi/acpi_cpufreq.c | 22 +- .../power/acpi/acpi_cpufreq.h | 6 +- drivers/power/acpi/meson.build | 10 + .../power/amd_pstate/amd_pstate_cpufreq.c | 24 +- .../power/amd_pstate/amd_pstate_cpufreq.h | 10 +- drivers/power/amd_pstate/meson.build | 10 + drivers/power/amd_uncore/amd_uncore.c | 329 ++++++++++++++++ drivers/power/amd_uncore/amd_uncore.h | 226 +++++++++++ drivers/power/amd_uncore/meson.build | 20 + .../power/cppc/cppc_cpufreq.c | 22 +- .../power/cppc/cppc_cpufreq.h | 8 +- drivers/power/cppc/meson.build | 10 + .../power/intel_uncore/intel_uncore.c | 18 +- .../power/intel_uncore/intel_uncore.h | 8 +- drivers/power/intel_uncore/meson.build | 6 + .../power/kvm_vm}/guest_channel.c | 0 .../power/kvm_vm}/guest_channel.h | 0 .../power/kvm_vm/kvm_vm.c | 22 +- .../power/kvm_vm/kvm_vm.h | 6 +- drivers/power/kvm_vm/meson.build | 14 + drivers/power/meson.build | 14 + drivers/power/pstate/meson.build | 10 + .../power/pstate/pstate_cpufreq.c | 22 +- .../power/pstate/pstate_cpufreq.h | 6 +- examples/l3fwd-power/main.c | 12 +- lib/power/meson.build | 9 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 18 +- lib/power/rte_power.c | 355 ++++++++---------- lib/power/rte_power.h | 116 +++--- lib/power/rte_power_cpufreq_api.h | 206 ++++++++++ lib/power/rte_power_uncore.c | 253 +++++++------ lib/power/rte_power_uncore.h | 61 ++- lib/power/rte_power_uncore_ops.h | 230 ++++++++++++ lib/power/version.map | 16 + 40 files changed, 1664 insertions(+), 622 deletions(-) rename lib/power/power_acpi_cpufreq.c => drivers/power/acpi/acpi_cpufreq.c (95%) rename lib/power/power_acpi_cpufreq.h => drivers/power/acpi/acpi_cpufreq.h (98%) create mode 100644 drivers/power/acpi/meson.build rename lib/power/power_amd_pstate_cpufreq.c => drivers/power/amd_pstate/amd_pstate_cpufreq.c (95%) rename lib/power/power_amd_pstate_cpufreq.h => drivers/power/amd_pstate/amd_pstate_cpufreq.h (96%) create mode 100644 drivers/power/amd_pstate/meson.build create mode 100644 drivers/power/amd_uncore/amd_uncore.c create mode 100644 drivers/power/amd_uncore/amd_uncore.h create mode 100644 drivers/power/amd_uncore/meson.build rename lib/power/power_cppc_cpufreq.c => drivers/power/cppc/cppc_cpufreq.c (95%) rename lib/power/power_cppc_cpufreq.h => drivers/power/cppc/cppc_cpufreq.h (97%) create mode 100644 drivers/power/cppc/meson.build rename lib/power/power_intel_uncore.c => drivers/power/intel_uncore/intel_uncore.c (95%) rename lib/power/power_intel_uncore.h => drivers/power/intel_uncore/intel_uncore.h (97%) create mode 100644 drivers/power/intel_uncore/meson.build rename {lib/power => drivers/power/kvm_vm}/guest_channel.c (100%) rename {lib/power => drivers/power/kvm_vm}/guest_channel.h (100%) rename lib/power/power_kvm_vm.c => drivers/power/kvm_vm/kvm_vm.c (82%) rename lib/power/power_kvm_vm.h => drivers/power/kvm_vm/kvm_vm.h (98%) create mode 100644 drivers/power/kvm_vm/meson.build create mode 100644 drivers/power/meson.build create mode 100644 drivers/power/pstate/meson.build rename lib/power/power_pstate_cpufreq.c => drivers/power/pstate/pstate_cpufreq.c (96%) rename lib/power/power_pstate_cpufreq.h => drivers/power/pstate/pstate_cpufreq.h (98%) create mode 100644 lib/power/rte_power_cpufreq_api.h create mode 100644 lib/power/rte_power_uncore_ops.h -- 2.34.1