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 A9C9145B5D; Thu, 17 Oct 2024 12:28:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A66B406B8; Thu, 17 Oct 2024 12:27:43 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2053.outbound.protection.outlook.com [40.107.223.53]) by mails.dpdk.org (Postfix) with ESMTP id 58F8C40697 for ; Thu, 17 Oct 2024 12:27:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RG7IpN6vMonRw5cnKWh6/AI04fxYSV40uoUYCVsjJRktwiv2E4v+q1nG7WfLUmaHGHQPgtZPr9Re/vgjpnRc7DU7G4bXfvxbYJ2zp/1eA6WRwhY0l3699MVgHXOo289q2KdV8OI81E1ukn98GPGOos33lQxZ10z9phljD47yDI8WgAhTIARIkeGvgZFid92BNp2fm4IcsXK96OK7xfqdqvWKHnwWsX3V/avLOgThkiBTZvWWSxBlePqTxL9TcpR6p50fVE14Wk4K8XlKuGtlc6/41GeIpFzePI7B57E6qIWlDQmVGjgJR0DeXBde4wyUWdRSnjIhCLm6GnouduMcgg== 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=28At3mKaz3oFN1bYkbDowHX3S4btpL1Ru2HmKfWaqVQ=; b=mn2nKdDiAHzJbRF6fttrVpyrzuensXiaciTgjFLt0W6A1lD0i3kEudKpJUbovCM2Mn1HCU3ZrEXjtqlmrBUwJUjo4Z1CsIL9pJOgFR4t7J5MUI6I9KMxRLNm0mDeCTlzkLENfyKiGyjHiyJO3qjKSgOWdXcs7fmHFFnwApXmFX/MfOyrqGvUnucbFJESs1vODVFV34tlU4Va/2qvEwdbBBhc2liFNIJsUQC+Y6AU3XgigLQad3Jb63Z7ccX6CeDeX8lsIVpM19eUEPuZTkm1odVKW9Ml8zMQWiLQzuMs6L3EK3pK7uydk1M4LeuFWfQeRF7XJ4A4wCmFIH1XqJECAw== 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=28At3mKaz3oFN1bYkbDowHX3S4btpL1Ru2HmKfWaqVQ=; b=cexh0Zp05RWmsYzsUfSM2D0aEbryOjPwFCfc2xKOo6rlHQCdFV8kL4xriv8JR/OzXHpyx5k6TeFIp5ym97EJgKg/MSLNLwUNK1tjHMpeM6bBuuwrTV/sH0Hkdj+IuWqx8i38EUmd9xsbeOSYYxbq/NX0nwKvmT77lnD/EkKkCsM= Received: from SJ0PR13CA0159.namprd13.prod.outlook.com (2603:10b6:a03:2c7::14) by BY5PR12MB4052.namprd12.prod.outlook.com (2603:10b6:a03:209::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Thu, 17 Oct 2024 10:27:32 +0000 Received: from SJ5PEPF000001ED.namprd05.prod.outlook.com (2603:10b6:a03:2c7:cafe::90) by SJ0PR13CA0159.outlook.office365.com (2603:10b6:a03:2c7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21 via Frontend Transport; Thu, 17 Oct 2024 10:27:32 +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 SJ5PEPF000001ED.mail.protection.outlook.com (10.167.242.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Thu, 17 Oct 2024 10:27:31 +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; Thu, 17 Oct 2024 05:27:27 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v5 0/5] power: refactor power management library Date: Thu, 17 Oct 2024 10:26:50 +0000 Message-ID: <20241017102650.1041030-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241017102650.1041030-1-sivaprasad.tummala@amd.com> References: <20241015024959.3478399-1-sivaprasad.tummala@amd.com> <20241017102650.1041030-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: SJ5PEPF000001ED:EE_|BY5PR12MB4052:EE_ X-MS-Office365-Filtering-Correlation-Id: fbafb9be-dbe0-446c-d4a0-08dcee964f25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?niIqTpKA32N3cIudGsF/HOJA+5Kl5LxQZ8LwPF/15WGIcQZgmajPo7wYwSoX?= =?us-ascii?Q?4jfORFM8Pf/CQ0WQZO+CJk5x7Mza3z19aD2b1tGkjY4tLPfGdQkpx/234FjQ?= =?us-ascii?Q?RlWoTHl9Dyt3FEKLM9a1PSsekFhzNe//3YZ3ZiCESnS0Mk24NWQH1n/PKemh?= =?us-ascii?Q?LO2okDAH76h1IgriZjrnp0EhiUqXAHGMYknBgwZBLN67LSUICWuYzsLCdbuq?= =?us-ascii?Q?MWt9kOU98MpBD0uwzSukIjtLHugRPsCborobaoGtsWajNnRszMEUKGxCQJu/?= =?us-ascii?Q?cuY0sQW6JSbezk8VlB0xzayG2BkyLYJ5EvOM02QacEmzrTa9zB5OlZwJiGhA?= =?us-ascii?Q?CENlV2poGFYvPnoyr6B1ZZD9BPF8MGuBrbwGsUviUeEUqKfIErU3oiyYhg+R?= =?us-ascii?Q?i+e2a9TreAl4wg8fwnB/vvqzcIuNP4EJxqPWVWrNIm0M1ui1HDZCM2lLQegY?= =?us-ascii?Q?F4Hk192wIcXSUJ/E67JefTk2MIH7egXoNC3yH+gXhK7pDhBgqFi/rYz9pkij?= =?us-ascii?Q?SMbVfNhEQ4ZHYgLSuNkorWJnY/I2EBTGbkRSgo0ubHKvVEZbrd5DvoFodK3l?= =?us-ascii?Q?eeap7DQg7Bzh46st6YDoOFZxmu7XHKIxy2vbAnzUp4RqG2DE9VxGaP5anJy6?= =?us-ascii?Q?9fHWkqWlvT9WUXnwgJObIKQkJHEyTF+ZH1fttplR+saS1VCPVWgQHrlWm0r7?= =?us-ascii?Q?zKw/Ei3psifzAe7d2sAr5WYSRQgt4u6/1RPer3xHnvDAHMsZCyAiUBoUxAob?= =?us-ascii?Q?f+BKLTqUIKzaOaNaV0S5ePo1H8SgMtOblb9Ai3mpVRxbJG4Im46nmPu5m5EH?= =?us-ascii?Q?8eZni/MbHOdFoc4alok1XXOGuBH6RAES+/FNzgDT5PwTuoUYYlBJx1sqSL/u?= =?us-ascii?Q?GlxlB3YJ/IqkXzPR692QfZ4ac0q26KWAPS8eC7sqbvwwKRiA2gqdsV1af6fz?= =?us-ascii?Q?sMPMT5Y6RStu7wrA2HOt/zy9a1qz0UzKOcrdTinPG6cbsffBH9qf+Li2VbEq?= =?us-ascii?Q?9/j5cQLYPTfMxoKkTLU2MqVCjE2YiJdlfm1TCiAFBCHrHhpaSlAuvvSUVvRN?= =?us-ascii?Q?gWkwtPAdeAbcsMujr8+ip5qvmuL1vu75uMz1vI7f3ucmIopob/YmzlJ8gxwB?= =?us-ascii?Q?pLmXhitaTfgNFwuAh0znAxMQ1etTuKzoNenAW3gWEa1wQD1kf8mCJNyQieYu?= =?us-ascii?Q?4dcVzf3kaLv32drvtlqMdr70KlELZhdyKTGmmKPEwimgeuQUXy7baCfNwfaC?= =?us-ascii?Q?ZF9p54kfg2muXlwyKBJn186QYxm2xjrqPtiGPEZ3nKSgMKA9XWvFF3oJDX2s?= =?us-ascii?Q?XRcivLgJtlPgQAWIgV+WWbBrr+2noxsdnucK1mhMLMe9i+wsF/dVaAd216AP?= =?us-ascii?Q?6Zh5XMPJfdwWfbVgELrfRPpnXG5phXW/zXsHcmxdAryReqI7Qw=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)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2024 10:27:31.8745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fbafb9be-dbe0-446c-d4a0-08dcee964f25 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: SJ5PEPF000001ED.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4052 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 | 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 | 287 +++++---------- lib/power/rte_power.h | 141 +++++--- lib/power/rte_power_cpufreq_api.h | 209 +++++++++++ lib/power/rte_power_uncore.c | 207 +++++------ lib/power/rte_power_uncore.h | 87 +++-- lib/power/rte_power_uncore_ops.h | 241 +++++++++++++ lib/power/version.map | 17 + 40 files changed, 1611 insertions(+), 625 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