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 EC96845B8E; Mon, 21 Oct 2024 06:08:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B7184028C; Mon, 21 Oct 2024 06:08:44 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2043.outbound.protection.outlook.com [40.107.236.43]) by mails.dpdk.org (Postfix) with ESMTP id E01C44027C for ; Mon, 21 Oct 2024 06:08:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=f3KZ5zWxwMJJ4lluI/vcgGUO/dBWyF5Ucsf34OYVa6fWRbjXBtYym6+MbVVNPPfp7knd+CIuHV7jP7bTy7csG6KmIVO1payhGaTt0UlbmfOwrYsc4xDvCGX8TTZCBofolgQRsiavjZ0lmWvkGkjkMzLKhxTZuM+HnBgCWHIr/fcZaNSHsUy2cXaubv3tr8jfdKy/Sdje/0k+/ePN7yCrPE76FXUUsb8LMfJaWcPVvx+q1292mINXEfiv+G8Yr1eqTJkcb0aeTyxm4rHDDMdQb7fPsMHQ/AWTO4Hv4cgO0VRf8nvHVBrFSmlIcK2/IkKF8MJL7x6WAl6rwS4ovaacnQ== 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=ToBBS2i4ugHXA5pEnPigI/1F+WX9OEbtyAQcYcICq13LoHvbBu1QYOIjoOktVfH7Cap1LzCuztzUTCDkYuow70/EmdAcwyqpapqP5xORfkxkdkOp/awWBe5q8255PvCkta9pNbEvSKXrFZ8OI/8frycNYTHlkEflw3SeCTidRSNh7TMAHqKgBLujeOpRKsPkVBd6HExvdoTEM9yQ441JmwWjbdgNQ5NsrajbzYeKGHob3k5cODIuOQTXapsNRlWcp4OkeKFgU5PgYK8ZEyXTYR47cmD0mOZJCGqhgZD+yzt8yzvB5v4ARcl1Si+hX9Osr0gNeBbfm1PcnTi9kVuCoA== 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=gZMOWI5AHq3o/3x+lzdrVVl1mwpHOlmYOI/BEy9M2snNMypgoH6FtKT/yMqlKFCmKpsiB6ad6eE6WxyYF2RRFAYDLojB5oGSb+3rMpv+AkJXZ+bmdplqTYpsx/unDMqNaPAr1j57GjCWK7UpI7NUuC9UqxPgLq+no5/EUYwSr3w= Received: from BN9PR03CA0289.namprd03.prod.outlook.com (2603:10b6:408:f5::24) by MN6PR12MB8516.namprd12.prod.outlook.com (2603:10b6:208:46f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29; Mon, 21 Oct 2024 04:08:40 +0000 Received: from BN3PEPF0000B071.namprd04.prod.outlook.com (2603:10b6:408:f5:cafe::dc) by BN9PR03CA0289.outlook.office365.com (2603:10b6:408:f5::24) 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:08:40 +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 BN3PEPF0000B071.mail.protection.outlook.com (10.167.243.116) 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:08:40 +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:07:48 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v7 0/5] power: refactor power management library Date: Mon, 21 Oct 2024 04:07:18 +0000 Message-ID: <20241021040724.3325876-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241020092233.2906612-1-sivaprasad.tummala@amd.com> References: <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: BN3PEPF0000B071:EE_|MN6PR12MB8516:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a2c56d5-3755-4ca9-cf40-08dcf1860bac 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?OaO1eWJM9wqj9BUlziS7+n88KZ6N3b6j/+TNbg1xUReMGxHKf/rYqBD7FJds?= =?us-ascii?Q?SqeYDjdREhGWp1SNaMr7wx1Jn+Gud+o432xOcEpS8E579gSxalPfImCWvRgK?= =?us-ascii?Q?rGQ2G35urB1qKXQSmz7uj4/1dEU2pGRXlPzyZand1rqNUAvoyi5YD1su33PL?= =?us-ascii?Q?Yu+jB3EvV4jIq0J9PX0T/+nGiFlVXcNbKjHSTbX39+exDbZkLcCd4Ks9OAgS?= =?us-ascii?Q?bYO1yr0RdbMIZ65WXryUN36h11p+jJDunSqgBNW4eJomt46OtnH+cD4Hh9ST?= =?us-ascii?Q?cz8ppS3GPJqLKB+tyx9LddYS74WKKM+6MR7NHLCwIigweuER3WF/+Og2RHAH?= =?us-ascii?Q?L6Paodij647fCTgaEO0lVIhMRIwsDhNaHrwI9RYQLtBw53abRMKmnxDETRrb?= =?us-ascii?Q?XAf3xCCHMWmJnn6W3aF7Z0cLjo6BvTXnAumSaoRsIH+ZCvk15jmffxETRuem?= =?us-ascii?Q?ZK1qXaJthRXQNGdHn2UqGTdd0ifVA7nvp5XVHqHK682qb1GtNMTbuHdz/qVi?= =?us-ascii?Q?N7yEU0QqA/DZLNeIm9oK6VGw7To2mggpOyp3ukB61O4vWI+YIJ6RG7jk6Xe5?= =?us-ascii?Q?uL1d4w19KZogBXXd6s4ClTLn+joadn8DgApYwF6Yen8U39135rVXm6dfo5AM?= =?us-ascii?Q?vjakHnnlrf01whjxfRRfoyJRhksgxK0nMIQxbR5XgmAeWnIeky92gdEhTxaP?= =?us-ascii?Q?l+CRjnCWRo73b7WshJtPxPCO+5arycaUlNUaUk8OdC41+OuEPYMwxKiaoPe8?= =?us-ascii?Q?h9eVlqavE6ERBR24h8AyD9Gc9XcJzDYl7tlotDP3+9Q2mxsVLGikyR7HlJf5?= =?us-ascii?Q?8t/I1ocTtsFIPOv3XrNpp5CBIZ6IXhgzZEu4XBuVzYCSXg7DBPpAYR3JQCxm?= =?us-ascii?Q?d+KXJWJxCzpXR5AGf7gJfk4wtDJraZMu0kpi4PsnFa/UCih8OA2fkwLFbzM+?= =?us-ascii?Q?Y1uEYCyyJeSYFvMvWaviTsXLWG6+r0bdDQMfwFpJGJq8ZqYb3Js3wEFGZzeR?= =?us-ascii?Q?eaKun4lvPv3cEp8hw7QC09Fwdryc1VvGqi+CsmxunxNdbPqS8n+1mwtK8l+M?= =?us-ascii?Q?/baK2My2e2Tn0PKsLTzXiCQthP3Vu/zP1IX1FD0lGLVJzJGKrRh2p+aCo3z3?= =?us-ascii?Q?G47NmfbOxovzXkUIT0dlQFNBY/Rq7d4SoChLRjgi5Je2Dq1Fnr75tRrW8K1u?= =?us-ascii?Q?biyt5mnrr6dds5UrkE0R5CAyjMrysU1VonWEQuaZKx6e5F/DAatriI+VD1x9?= =?us-ascii?Q?0THpNrRTsrk7APU+4li3LM3LiBPpVkA0UTdc57jXG8N6MZiMby0syTMcUoK4?= =?us-ascii?Q?ZUeANbBLCGGXrXyVS3BJvvS1jpk8p1czUee3DKkqrrcMQ57dtvNCDrtLvvWd?= =?us-ascii?Q?7YQKY7DjV4XRuYOgXR4quOatAnB2OoneGxf7XV2/ERKQE+YGlw=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:08:40.2928 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a2c56d5-3755-4ca9-cf40-08dcf1860bac 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: BN3PEPF0000B071.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8516 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