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 EC94B45665; Sat, 20 Jul 2024 18:51:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75DD9427A5; Sat, 20 Jul 2024 18:51:14 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2053.outbound.protection.outlook.com [40.107.93.53]) by mails.dpdk.org (Postfix) with ESMTP id 5EE3240687 for ; Sat, 20 Jul 2024 18:51:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZLGThLjCb0Jf9jyD9GXOpu5h/0a5//NxJTrwYSTufrgaimxNrJx7Ex98v8Evtq7g1Ck3hi1J4nCJtNpjLqRQDToZ1g3h+2SLMyf9+4NUNSM6Zf255g+GsDI310plWlajJ1oQ4sLMTecIg6WMP9zUduN6CHCxslzHE7494jKerGnf1A2uyC7VbhsTgwOS+HlOKXYri+WHJ2ew2gUCjIk3y6+Qke+OuSNcUOfgoTgNhEoDftS4XMJ4Y2a3fZWQGGMs/OdLPhC6Ktc8itxOuf78aL0oj8oH5Ubeq6byP8YXDaav0KPCXaoA9I3onDUK7q3NvT8Xe50AKaeUzp0c7NyJtg== 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=48ufViZtV7IcRVG6D67wy7XxgxBBZM/0/TKXalftA7M=; b=XvZlQU/kqi0sjQNi8cD9pYLY5jqolJyWEbpfAKXIgi2WxhkA+4u+UjcvNRBGpd0SgQr9manwGzzBFKXzcqMjftrgJj1rb2l/UC2ePysqr9aPe+s4V7pplc7gNnA5qLQq8gCLLUsXQdYMTRK2UF5lPIXWp0VoTrHX2y8Ev6in/wL65MHAkeJDJbgu+VetXjfTK9MNAjyXVCBlhsrwY7D4CWbUFjyo0DlTYI5tPuLHt9EdYtFVtLOrzM8Em6MkXQ2l8i6g1YzoSG+JnY+mqsI8m4jpbHjC+dDxa4zSHK81Owutxi2bCkNnPpchfXDsnJoOCk4YspuRcOHispMtmawoGQ== 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=48ufViZtV7IcRVG6D67wy7XxgxBBZM/0/TKXalftA7M=; b=MvOoTvS2bNbl/soWyLF/RTh/XBmOax1arip4tEsRa4lOHJjip6fqxiBf/gaqBUFEcyGdyXCbQLJ2M7lyM584xcDeCL6p44gobhp3Hq/kxsk3AfVQwpS6EKL7Hvq4OsBQTRbr9fFMznDLpyJONPJYFxLyljhxx8ujcGD5uB46kHA= Received: from MN2PR17CA0024.namprd17.prod.outlook.com (2603:10b6:208:15e::37) by IA0PR12MB8975.namprd12.prod.outlook.com (2603:10b6:208:48f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18; Sat, 20 Jul 2024 16:51:08 +0000 Received: from BL6PEPF0001AB54.namprd02.prod.outlook.com (2603:10b6:208:15e:cafe::be) by MN2PR17CA0024.outlook.office365.com (2603:10b6:208:15e::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29 via Frontend Transport; Sat, 20 Jul 2024 16:51:08 +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 BL6PEPF0001AB54.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Sat, 20 Jul 2024 16:51: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; Sat, 20 Jul 2024 11:51:05 -0500 From: Sivaprasad Tummala To: , , , , , , CC: Subject: [PATCH v1 0/4] power: refactor power management library Date: Sat, 20 Jul 2024 16:50:30 +0000 Message-ID: <20240720165030.246294-6-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240720165030.246294-1-sivaprasad.tummala@amd.com> References: <20240220153326.6236-1-sivaprasad.tummala@amd.com> <20240720165030.246294-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: BL6PEPF0001AB54:EE_|IA0PR12MB8975:EE_ X-MS-Office365-Filtering-Correlation-Id: 9586e178-545c-4039-0e6a-08dca8dc274e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?bFIVXOnLdVvWfsvg5HysrSIEqm3SSH4UQ+RW/SYYPBXK2HB3yvjxw5MguZYo?= =?us-ascii?Q?txIm3LHm24fQ68LxuK+nOw/YeEl/mIhpFKwlv8H07M/z7EzTjcr4p9VlPTGY?= =?us-ascii?Q?nfiAqQtUdU+yW05cfcwdim15ISEZmK4FvIpG01+xfsQ7hRD/ytRHbjcGKDF6?= =?us-ascii?Q?mQu2puHd4ie/y7ObC4HC2Gi2a0wbj5d0hIZfkIZA627TaYZ9YNzo/79vsnGh?= =?us-ascii?Q?5kVJz7vYEs8YbjSUM2txSqx9pi8r1AknNhlWNx1tD7OrO8zrIwOPnw+WyjWo?= =?us-ascii?Q?PlLLEHnrXe1dtIBbbCdqCxpoVt1F5VFj8K8qD0x5lRkvov0yqqya+Jtg4V/7?= =?us-ascii?Q?LWF7rTux5cK1jwZS9LVtPX3ZDmzwUx5fqnYwta0OchjNnKN9YodiC3MRLtJ+?= =?us-ascii?Q?wdHiqW/ECqSQYL70lVwDLZO22cxOYm5hNCEqmCgVKLVwuL4KRHWhPz+6AAGH?= =?us-ascii?Q?Jio7qmudN4CoHXlsm99RZO2NbrTcF8YdG7PD7+ccTFxh09Nf6x94+DMLYdER?= =?us-ascii?Q?zXB6Yi2IpctFo49qlasGTcIdC52byaf05QIkyk/Y+Lgvy5GFwjBdc5LXpGnr?= =?us-ascii?Q?oYIA5NgELrav4c9NHn4nxjpDWcYgbowowAbXybyVBBAyMN5QbAWjONe6Gnr5?= =?us-ascii?Q?Trz88YpcrM19fsAt3ph+KKqNi+cBPsLwJGux5Hrdqfeta5VfRQEQk1FOfnyz?= =?us-ascii?Q?IYz9EnxUddtQlzXTUNV9Fl6isutA6Ixutqdg8YR/VZs/YfG9ep4UqLM0yi+c?= =?us-ascii?Q?Idvro13eUU7NvwK+6pWaJWDij1l1mgkubrLySCgA/4jNl7hxrMKCT3LWbcrK?= =?us-ascii?Q?Zl24UrT+lWAWz+xHzxydPsYervHdNoPt3mjOM7awA3n7iRbRWJEqe7A7QkSZ?= =?us-ascii?Q?z+k9L0kPeRa6uSfTe5ZZb4VuWtSE7O5O3ZrZqUxN4daIrHSfFOdrJZ95ebuV?= =?us-ascii?Q?zNm8WJDJsjcKbkRHQCmchMMZ3RfgETd6xLerKmOgEltMvnk0ANzJIBzQnQi+?= =?us-ascii?Q?PE/SzpKpTyItGJDoEd8idTnwcOsfUJBJPvWQpQ3/lDH0MY6A5Km6/0/glD8n?= =?us-ascii?Q?Qj0LmPPOEawI3VqWhPNUkONLnRg3F/JiAC48sTMvXTCIdj6pi8GOeGkOarsz?= =?us-ascii?Q?GUmJQCyAHszmdDZ84QF3ZwuzdRZ3Lyr80a0sPtpX2YGAL9jDDAAxXWFamNMk?= =?us-ascii?Q?0NmihsWs48yxMgxzWwX9DRTZXkuFFv809sCevoHrFO2TrCPULQKUpq/32Krm?= =?us-ascii?Q?mYK6mW5NeLQzpsNbeAMmL3Nm575NYdL4MACYorck0+c443yiGKRUm20gIQm/?= =?us-ascii?Q?qOBSM3a5WARc3gcuYb87uPQM5r4ddzd7hJaPsNY5TSMkujT6GOzVWXXD/WYK?= =?us-ascii?Q?7IdVd9NoKvCkGy9mvxFnQH8wrWC6l0LhY8B4g2KhBMywCYkmBj3aAuh78LRJ?= =?us-ascii?Q?krwd8aCR+EdfE8nJWjCIGStgHQeGpi2m?= 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)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2024 16:51:08.4684 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9586e178-545c-4039-0e6a-08dca8dc274e 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: BL6PEPF0001AB54.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8975 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 (4): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations power/amd_uncore: uncore power management support for AMD EPYC processors 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 | 321 ++++++++++++++++++ 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 | 7 + .../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 +- lib/power/meson.build | 9 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 16 +- lib/power/rte_power.c | 287 ++++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_core_ops.h | 208 ++++++++++++ lib/power/rte_power_uncore.c | 206 +++++------ lib/power/rte_power_uncore.h | 91 ++--- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 38 files changed, 1591 insertions(+), 621 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_core_ops.h create mode 100644 lib/power/rte_power_uncore_ops.h -- 2.34.1