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 E3AAA45B8E; Mon, 21 Oct 2024 06:12:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF4EB402E7; Mon, 21 Oct 2024 06:12:04 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2076.outbound.protection.outlook.com [40.107.237.76]) by mails.dpdk.org (Postfix) with ESMTP id 96EE34042C for ; Mon, 21 Oct 2024 06:11:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xSj1ZkxTI146iizbhKFnP/I/VMyDGEDqkUtVTdxfdrjbvHUMdrfuyNx3wxv25jx7pEfxrp8RIP9bNCpM1DVExkD1eyYUV7/MYB0jjPFOl6HyALWjf6RSL/x7uBSARJYpKUs/DTRmgIbUxhO4X9xtfYX3X0Z9kfFhvDZyIxufc99/YNF08xWct+yZlgtCylIY2cekkY1AmxPLKAYRXLs3wJLfo4h+Kcs1FpkRVgua2jQNWcLYSLrjGALDNfGN3Bqy8xhmNOE1eLIcm9Phvek/7OQ7GN2zPokPqDm0t4K2Viv2l+k3JEL5wwi64mXJqmx+6a4IGPZ7ujGieKiGSPf+iQ== 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=O5SwN97mTI7ZSpRDuq8Jla+isDSjfzSIiavNA8YudLw=; b=FHbZFXGHBZgzTcQ4O4tCGWVGp+DKeOGsB602/hUi8cvisuRuKCUKqPnVq8kIFXx3Cvjk3hyqnqG9UPT9nn3lAiT6zyDyLPC/jG+xNxFedJZfMr5rZbszE/f2nc9Ur227hBHSwST24B1onL8nLaawu7rQeNc366KkaJJKEaNfQVvvgN+pZf5eQT7Glys/UoZLVJXxgnhSsd9QqEASK2csD9dixTcaUV8E6oDAGmO1jDqdlWhXSjDYa3utkb4oxx1ohtc0FZk2GYprcKY7x0wUZCCuE6uKwgZ5Ot5jU/x1x5dWaTgNuiJV7rCamXaKApab7ulhhWd10D0uWGegaFXIdg== 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=O5SwN97mTI7ZSpRDuq8Jla+isDSjfzSIiavNA8YudLw=; b=hBqqyx4XqQMBRmkeQu8ACAuXlEgDGrNnKdLwzbnpHo9/wGO9kZ2sbe+VZpwHi6xTtS+D0QKDRK5ap32YWUc/5R4WF4uEbqDUjY09qS4trzqsOO3hbh/86ZBNi9pAPLQwSUmdR+IGHb00tKuReU2AZpSUk1Uu8cypyaca1OQg6lo= Received: from BN9PR03CA0965.namprd03.prod.outlook.com (2603:10b6:408:109::10) by PH7PR12MB5734.namprd12.prod.outlook.com (2603:10b6:510:1e1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 04:11:56 +0000 Received: from BL02EPF0002992B.namprd02.prod.outlook.com (2603:10b6:408:109:cafe::72) by BN9PR03CA0965.outlook.office365.com (2603:10b6:408:109::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 04:11:55 +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 BL02EPF0002992B.mail.protection.outlook.com (10.167.249.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 04:11:55 +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 23:11:52 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v7 0/5] power: refactor power management library Date: Mon, 21 Oct 2024 04:07:24 +0000 Message-ID: <20241021040724.3325876-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021040724.3325876-1-sivaprasad.tummala@amd.com> References: <20241020092233.2906612-1-sivaprasad.tummala@amd.com> <20241021040724.3325876-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: BL02EPF0002992B:EE_|PH7PR12MB5734:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e051b1e-a61e-44e7-ba77-08dcf1868027 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?nZ1Qkr7sD6qI193U1vA5dCZ10oaFUQyrU6GsVZ9luKDf9CYUbCC1H2nJ4wTT?= =?us-ascii?Q?EQN+28LfykstTtoU8UqsaMui+X+HkYfZ/C0GuBvbRAm2fu43KBmMS2xwB+wZ?= =?us-ascii?Q?hhfUM/mrUFngTKDoD6EsPRPlpuW+nWbED3GoUFEgnpBkWrCRiOPmnYdTe6U+?= =?us-ascii?Q?Xej6LNxx8PPIE1Zg9mCtIhGXHYZyadFoc2u7mefadVDdJ9JpfVZpjB97DhZk?= =?us-ascii?Q?n9WaFd6DtCyxRvPQu2zps4kYnX9n1OylLEXYHXKmw/L7MqeZd1Yj0/E1gPPw?= =?us-ascii?Q?hsRzNE0vKebAiUlpFsQTGkiddmAiT303W+pMHaAxByk5Ckk0Bs92TWxYDNjT?= =?us-ascii?Q?P4iEyndqpgRSapbF/MPHjK5gGiH+Db8O2ePssYav5eenpFjLbIw/rSFRISsm?= =?us-ascii?Q?7E1/SOsC7eUe2QqSywSzvfWxCApxAmr8YD983eh22DhmFJjV9RiqGD0yZ3JU?= =?us-ascii?Q?EVsXw8E4jKX/H6mPe7Dy7rz30wBwP3bpos+GsDhLMmn8BO7ZfnpOVgUEv9Bl?= =?us-ascii?Q?jZdyHHdj3yfwESwPXzcwe4ZDkj2oH4Ii1yFSl/Xq6y3qN6Fyq1PhXh9bzDYK?= =?us-ascii?Q?OlJoa7D9Pc4UwtQc3bN7ybYYe899cV1xL3+55D/wXTbOw5aIYSmlDa4BHPpV?= =?us-ascii?Q?tbj6tjvCU07ZN5aBceiTffUMPFLcBkoj1OAazUcKgMO/cnMyWv9Sn0dHCxqy?= =?us-ascii?Q?3guUEL/nVDWq/GGrepAJmob1wn1C+/Vspcn7GfpEG9TRQlKIRP83Pn56lUUd?= =?us-ascii?Q?cxigl4TGCPYxmnuq47pFsKIKPov67F5BGunNVbdUNjYVm2/emvk5xOj8aVPn?= =?us-ascii?Q?WvksFZfEcsntc7ebGacvPhyt2yNjvY0bIT5KBQH76dy0H/lMrC3/8bNTWlwX?= =?us-ascii?Q?Tr2lEp/ZVhdlo19s68jbh/jhTVy1IlJe7Yit6bkAfukfvr0SMwvMD4iCgWG6?= =?us-ascii?Q?C1pL/RHU30HOghrs959U5j1MgHK7dG05jiHW+z4Fektp5XrcIBv3GF2z84oS?= =?us-ascii?Q?qtSVIVFOmpN4xO7Kk3wxx/ZaLyDWm6mncYHiudCtsgmLrDOsOoAjfDlT287w?= =?us-ascii?Q?uH497bwUFX3QL880SOst14e1+fZdewQCYlo9JisSV60Q+1ynaOhmWflgI0/I?= =?us-ascii?Q?n8qtRyrgA1jLt9phhDsXJA58g9plH+6M2l0QH/cwTuMmJmaIDaqal8ChAVE0?= =?us-ascii?Q?zvEvekZOGHfb+Pjb3CjhUA5B8qbn1NieP9gPAUO8/Iznd1AmOwGBiPMYE8uu?= =?us-ascii?Q?QewGCNecBogoXiiVNHCCHZ9zgRb3mAFgveGbkYssFpAxYrUQcFa1XqzoEtom?= =?us-ascii?Q?Fk9Y2MG8fX3IGeVWUBByLcpqeHUyV32M+DswLsAAQV9Nqgyq+6bnRCIxk0U0?= =?us-ascii?Q?6o/7Y4pLLolcEHMVZFyYlcafZLkjWh2DoSv54N3cbNUC9qlUdA=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)(82310400026)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 04:11:55.6672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e051b1e-a61e-44e7-ba77-08dcf1868027 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: BL02EPF0002992B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5734 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 | 256 +++++++------ lib/power/rte_power_uncore.h | 61 ++- lib/power/rte_power_uncore_ops.h | 230 ++++++++++++ lib/power/version.map | 16 + 40 files changed, 1666 insertions(+), 623 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