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 80B1145AE3; Tue, 8 Oct 2024 19:44:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E16B140EE4; Tue, 8 Oct 2024 19:43:51 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2077.outbound.protection.outlook.com [40.107.237.77]) by mails.dpdk.org (Postfix) with ESMTP id 2F46D40E3E for ; Tue, 8 Oct 2024 19:43:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RrgbGWhWqed3yqxfHjTsYVzQRmK2XkBfXqPlQrffjZygQ+m/+rPr64R5Pu3BBU0Q/q8FRbrBACYSleU7M//LjPPGXzaAHRnJ8JKiPCVSvY0iYVvkcpmi1oblhcEAc8DB88gu0l2MgAOyy/0vuh03deCV8FslbjEonpUFpv6VwWBuF43OZ3H8CAMskI8+OklhMb8KyZm+GNdrqCT7qjttkZeSD98X6CGl97vuvLO1vebxfZ7wZdMx2tFB8W8Ifmi1ACBCGS823LEQ1fcoRDT2BhnbfzMeIZmhby7QHl7BqHIRYsMVbqDdWttfI9g1jX8iWJXObXIGY5wCdtn5OLKH8g== 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=mnvxVO31r2jIMRMi9lI1qfyLQAXraGGCTGuHOGjX2pA=; b=IQDRCz/EiVIrNp8yXxVI1aqJpjEEEn7+krVwa4x5CoVjX/QKqhVDsRfFsPjQ+J7GTUJnNAriV8/dAGmbTiFqF0QLRTRJivr89lJ6Ha789B9mThMkNHQVQfigt9ujMgGo6zp9CjBaKPFGdnS1xONllAbI4KfvIX8iLvTYhuyuS1Ouhnm0wve/GrrC9syRtHxyXxK7Xd/t1+HyPjJYnS0rt9Xe+5wFOvOOXgQ7j/HJNME1s/lpxp80jL68DutDiIXSV0Yaobc+NYTvLB+i/WSTqEyJUn3rXZ6fRydTd49F2w1LQLOQHmlBs7ZuBBTVE4I14mqc53YtdwQCU89U0ECVeg== 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=mnvxVO31r2jIMRMi9lI1qfyLQAXraGGCTGuHOGjX2pA=; b=UThPTDkaw0ptJgoXBxf/J4slZUfWNH73PEvyhUHASD0wqMhP340APe1SUoIwAbVjp97M7zAgH2fUSihhAOH/Nz9btDru3b1wInxINXW56huDjpxvKvbpGtT6tetBjW+WVgU90xPving+kGdfWP5aabFbMnoltg40fqVWAU/R4Z8= Received: from BN8PR16CA0035.namprd16.prod.outlook.com (2603:10b6:408:4c::48) by PH8PR12MB7109.namprd12.prod.outlook.com (2603:10b6:510:22f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Tue, 8 Oct 2024 17:43:44 +0000 Received: from BN3PEPF0000B36E.namprd21.prod.outlook.com (2603:10b6:408:4c:cafe::10) by BN8PR16CA0035.outlook.office365.com (2603:10b6:408:4c::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.30 via Frontend Transport; Tue, 8 Oct 2024 17:43:43 +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 BN3PEPF0000B36E.mail.protection.outlook.com (10.167.243.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.0 via Frontend Transport; Tue, 8 Oct 2024 17:43:43 +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:43:40 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v3 0/5] power: refactor power management library Date: Tue, 8 Oct 2024 17:43:09 +0000 Message-ID: <20241008174309.1133051-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008174309.1133051-1-sivaprasad.tummala@amd.com> References: <20241008172719.902619-1-sivaprasad.tummala@amd.com> <20241008174309.1133051-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: BN3PEPF0000B36E:EE_|PH8PR12MB7109:EE_ X-MS-Office365-Filtering-Correlation-Id: 50d4b13a-242b-4082-1586-08dce7c0c10a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA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ZwZiHUmCvLiyOYb9apTYH2h?= =?us-ascii?Q?nX+StjITJSnrs6GeLjvs5QTp1lA4720CXUMQ9bBhNVRvqn9eLqXcAFRPTcKt?= =?us-ascii?Q?np/ee8OnzAFs8BncerlQLW5KiYRC7PAygFi0ughoWEVxf5xrO9yLSkVGGvVB?= =?us-ascii?Q?ocwwyHHk8+FsNUs8fX3CfWnEvHABWZr9jvHCaTzFHTgUfiS0oo76zFx7fW1+?= =?us-ascii?Q?v1Xk1/aSy5c1MEFOWoqC30l8mOPEsu/05s4YThAwqfRpPm5wIninE4+UegUH?= =?us-ascii?Q?O23dHmySz0eubHHwFWkyURQYhuocDFziwYrOtXrO2+n+x4TeVisCB0/h2j7o?= =?us-ascii?Q?Q6jbQA2JwHiIjQk0gDxm8/TtFowl8yQrwYJ8FWDBE2oSRPxFoorpF3q5oFNo?= =?us-ascii?Q?XxCKHXQ6D4aMlGPLWIa52sQtwmTms5D/yRyjOzCu9I3DP81weqq/dcEAZ+3x?= =?us-ascii?Q?mm6Ty2FVTuYvqsHSl55eLFtr9/qakvbQvcmiPl3Ityc3ui8ra8w31st6NxEK?= =?us-ascii?Q?wgHlLxqpWCfEtKL67kM+feQHIY3ybsG5NgUVuoDaK8ns0txA3RXPJ8+fE1wv?= =?us-ascii?Q?yWOhQ1+bERTnMHR70gbozo/HW1Au?= 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)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 17:43:43.6918 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50d4b13a-242b-4082-1586-08dce7c0c10a 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: BN3PEPF0000B36E.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7109 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 | 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 | 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, 1603 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