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 C4D7845AE3; Tue, 8 Oct 2024 19:28:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65B6340E64; Tue, 8 Oct 2024 19:28:04 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2075.outbound.protection.outlook.com [40.107.220.75]) by mails.dpdk.org (Postfix) with ESMTP id 4332340E48 for ; Tue, 8 Oct 2024 19:28:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SwLiOR4d/DNzEhpg5v7IBwCSSFkfzZdR+ad88fU3Bo2qW8An3v4it8nkVxAXXn11fgU42uLov8o8xTcbpNT+WfvUKJxZPwICAsckf7fj4f04ksv0XFYgvDMGYT4X27K7O6TZY8YYcckhBy17q/ubj31ILe6cW62wB4BJwb8bIwvw46Kw2yCjzsa2KqsZmw5Df5TTyQP/4Cy2eDJLIrIC+lxhWcCMGJP41Qv5VJNe5KEki+w3DpChTklW0Z4Ol5Iu3jdzyER2qnpuW5Gy+0YTOw+0F0lNzKxAGOrxfaa182Vfys2lwcfVze1TvFNhgYpm+Z+vXCo/nxE1kgV0KNvVnw== 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=pcgD+yIMpXyYAdvJuFjZjItCNwT+91qIHlqyIFrKkEo=; b=POC/mzKW0OJcnHFKYdqjFdoUYdI6TLtiW3rWGJp/631J2FyvGhv+IjdjpKLEqsqYbaZuysXm7pJJRdttSmxDkALwIrW87lMtj1QzuG/Dqi1XtmQzwgsS0QQuTwyHLtOxY3BLmshJU82VsEsNDO7Q1ulIZ+y+Mty9pfv9Z6fap4CIkZc/dpBgQIoY7YF8/BwQ/V6AoDRbEFLe2hfDezFNM+JBuTR4FaTn/wQF2REOfpa46jFh5YmzuWpXxYD5Eaq+BgVgVi9goROo73+rYni5IemWmth1IQFYMcsQtke08W5uA1AiWKFd1k1P5pOXLY3s639vu9AWIFYbU2HOr5+dcA== 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=pcgD+yIMpXyYAdvJuFjZjItCNwT+91qIHlqyIFrKkEo=; b=ggVVcW9zHKOva2/nvyvxSN91QCgBZNTYADj0dRrrMkGSohV6RoTM9iSj73WXP6jjb4RaGDiYhIYwpXThtt1feTVR+CcvimmjQVX9w2bwQ3qUlTriJzhD5ewERf2TiJrHitnaDS2Pbp5SHUH41bgg2Y3uH6vwqZPI9CMWgvW1QqY= Received: from SA0PR11CA0019.namprd11.prod.outlook.com (2603:10b6:806:d3::24) by PH7PR12MB8056.namprd12.prod.outlook.com (2603:10b6:510:269::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Tue, 8 Oct 2024 17:27:57 +0000 Received: from SA2PEPF00003AE6.namprd02.prod.outlook.com (2603:10b6:806:d3:cafe::ca) by SA0PR11CA0019.outlook.office365.com (2603:10b6:806:d3::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.24 via Frontend Transport; Tue, 8 Oct 2024 17:27:57 +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 SA2PEPF00003AE6.mail.protection.outlook.com (10.167.248.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Tue, 8 Oct 2024 17:27:57 +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; Tue, 8 Oct 2024 12:27:53 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v3 0/5] power: refactor power management library Date: Tue, 8 Oct 2024 17:27:19 +0000 Message-ID: <20241008172719.902619-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008172719.902619-1-sivaprasad.tummala@amd.com> References: <20240826130650.320130-1-sivaprasad.tummala@amd.com> <20241008172719.902619-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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00003AE6:EE_|PH7PR12MB8056:EE_ X-MS-Office365-Filtering-Correlation-Id: 74704931-dd8f-4f77-ee4c-08dce7be8cff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8xtw9QBeozDi6j9YaZcAbQDHdF0r5Amg/nzJy9dD58f2oY0AEUQ/gVdQiXjg?= =?us-ascii?Q?YI1yk1KmZ2Ut8ITkg019dfTpVh5EVaRH0AkHBdo0kQrKGcLfkfX0a+lSApwx?= =?us-ascii?Q?AgzYj/YBjxlOJ5Xy9Gbu40GpE0b+oLjtUdCFq1V+HcUH7MYYAixdQgra5sii?= =?us-ascii?Q?ubsuy6Wf/2NFTTn+QSGTUOrzFOBEVunDqDEYcr64BAaY5Rx3PlKAUW9wH56w?= =?us-ascii?Q?iNxgI0zsezkf/tMbk57GmelA3zHqO5CN0pVE4/Q6po/Y3KEjUErstfklCLQv?= =?us-ascii?Q?vVQfqPV/iMXd1Zw+DSM6v8csty+BJAQdSgOyXs+wJa0GQatmNZMDY5ZXMOEM?= =?us-ascii?Q?1htkhW9SS5Uo2iCdq/+E7Yhs4iCtN1+br6LIvgmFJ1/75WZz9YTVL/HJQcCi?= =?us-ascii?Q?i8mUdQ4SH2AXKXaF50daaVmzE644ISDYA/PJ5X2DKr8V2NvOBFxPycSQ3+ox?= =?us-ascii?Q?lWd8g3BsOjLhtrqTU0l6dr6jMSS3Dg9HuXeCiGkW66aGK9uPheA87j4CcdlY?= =?us-ascii?Q?D+AiWKbR55yqn4tBPb9gNQLRraV8fH6jh0C6iPnRsshWaSW/keuqiGD9803n?= =?us-ascii?Q?4H846oJrYVtMzPFRza8nsoZ6ehrWnACTp/cHXJBIHkm/BnbI1usOCQAx4Pir?= =?us-ascii?Q?d/vxvJTka3p2sEWZZcTcFyPcvTy44DTRErDtUkUeMw9uzOQ21BOweVy96cBd?= =?us-ascii?Q?AduEO6VkOM/ztQzAUgkTaTUU3Z2jr8wJducbcB7QHptOfmnWnjAKLphykR71?= =?us-ascii?Q?heifZEPzglC58xOD5MqtfKdWWSFr2pDXI3a4pcm94AIcmQOfg7MhhK27vtdF?= =?us-ascii?Q?2T3R5+KXhi5lXitMducEMaejTqchw6MxF+xiKzrS7q5VNskZHzdjDsHHPsVi?= =?us-ascii?Q?6+C8PDLjqYBdEs47BxGoj5bjNBHkp+J3geaRPvd09p+lHGNgH4y3fkp1F8PP?= =?us-ascii?Q?szlpppvPlFexez3zYdM/euB++Q4pxOKNA0VQy40ip5oc7/misMNZiTjTZhnV?= =?us-ascii?Q?cOhzJqmVHSm8LDEOLeSdQ7ATs4i22iBVq62XLizln0auMJKnvONTP+81rdvG?= =?us-ascii?Q?JH2l6gEDbTlhvpjTKFFHnGoGA2e+Ti6FIf0fnTJgxKW/Fr0xYC7IzSb++pn3?= =?us-ascii?Q?cBUhA/5mhBQx+fyRX9Jkcf1HWrX85ek4w3avftKECGcweplRKmoV54ocZJ9V?= =?us-ascii?Q?EnuzCWMmnVGZelQvO/2M/e0magaPsVYRHAUhfqLmmKJ8SkH7ecZ/g9BKDNiN?= =?us-ascii?Q?alDQ04aaG3Qi6xm28EESfal+G1E8Y6RtKrdnhD98uvk652jVZ1HBNMomMvfj?= =?us-ascii?Q?haCGxpePsfjLPf8jxEb2YYef6IchKjkmb5dDc+92xGJOxabuHwYKaKZUp23i?= =?us-ascii?Q?rnsOFcfJ2UbB18g/j4VxaEQGWLFb?= 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)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 17:27:57.3903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74704931-dd8f-4f77-ee4c-08dce7be8cff 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: SA2PEPF00003AE6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8056 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 power/amd_uncore: 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 | 8 +- drivers/power/amd_pstate/meson.build | 10 + drivers/power/amd_uncore/amd_uncore.c | 328 ++++++++++++++++++ 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 | 16 + 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 | 16 +- lib/power/rte_power.c | 286 +++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_cpufreq_api.h | 208 +++++++++++ lib/power/rte_power_uncore.c | 206 +++++------ lib/power/rte_power_uncore.h | 87 +++-- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 40 files changed, 1602 insertions(+), 624 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 (97%) 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