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 14F1645B3C; Tue, 15 Oct 2024 04:52:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04DE94065A; Tue, 15 Oct 2024 04:52:09 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2047.outbound.protection.outlook.com [40.107.100.47]) by mails.dpdk.org (Postfix) with ESMTP id 2AC4D40663 for ; Tue, 15 Oct 2024 04:52:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fvyfNUTulp4ATvLEzsISBuZMEyI9Xig1IJ9PLPRvTTHL3ugosUo1X4tTqILtEvjN02QGZMomWEpGysKPg+PitnufftOEvAdT/EE69wlUgDTH2brSXClH4fKBPh9oulzHrLVzP/lzaNmwi5zLSRqFAm6qD/cZhn7bQCU8KwtpfQd6pQHMidwyojbNE3ig2djvUxoIiDsvcf7p5O7f8/BCf7prVPdaKFKp4kOVNOUUiJOMOvu6NVq5VtWFwoCMKKF30ccJIpjbgV9n0XoIg+VjpERfh/ZR5wZuCZyC1N3rL/i69GNIXubUew3Lbao+AwZjlrYDcUhYeTLuIhFd2x7nJg== 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=j1sZjob07VSw9LUMxsBgRN7beqFZj6CR0UsGHmzs6DA=; b=mmY2l/4BFpHXbgGa8CJgxfTkTOUyD/do0iLhLjaGFqyUS2d9OGh2pff9GO3/oUxFtk8aLL+QS/dZqZQl3m6s/fzMuabR9u9+u8AuQGuFp2da8THFT0LnAYs6kKyQbTaQGb0v2Nlz35Xa4Ul+7LjkYbME+GMKYefXENindyHY7QEHxJ/0kFGRhYNbnBo2ZBspBvKKLXMovuaGurDrpWhDtjrk1XOw6GGzmfqMM2KMB6Ik1Q7oCDvytNgzo3xkr4j705w+SYU+g1E6HlurhFgb5+gG3iT1sWH+saOofbhSOnYCf9S1yQCEKhvUpynIjYCeu24XEqxJnRo5X6mtoKGTsw== 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=j1sZjob07VSw9LUMxsBgRN7beqFZj6CR0UsGHmzs6DA=; b=I2BMW0IWwTjDuOJY6QpDfLB5FN+Jrb7Hw7O5EFCw5pww3t7zPg+J77vTUCB0v2RLVH9sfA0w5BgeW0jGu8NQASZ4EdFdjMTBsZiDcLvi24J0c2yD8YLdwxWbS6uux/OuKtssM++97Ew/47gcMkMtG69bh2Kmd3tYHm1upPFr89w= Received: from SJ2PR07CA0014.namprd07.prod.outlook.com (2603:10b6:a03:505::7) by IA1PR12MB8585.namprd12.prod.outlook.com (2603:10b6:208:451::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 02:51:58 +0000 Received: from SJ5PEPF000001D0.namprd05.prod.outlook.com (2603:10b6:a03:505:cafe::bb) by SJ2PR07CA0014.outlook.office365.com (2603:10b6:a03:505::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Tue, 15 Oct 2024 02:51:58 +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 SJ5PEPF000001D0.mail.protection.outlook.com (10.167.242.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 02:51:58 +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; Mon, 14 Oct 2024 21:51:55 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v4 0/5] power: refactor power management library Date: Tue, 15 Oct 2024 02:49:59 +0000 Message-ID: <20241015024959.3478399-7-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015024959.3478399-1-sivaprasad.tummala@amd.com> References: <20241008172719.902619-1-sivaprasad.tummala@amd.com> <20241015024959.3478399-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: SJ5PEPF000001D0:EE_|IA1PR12MB8585:EE_ X-MS-Office365-Filtering-Correlation-Id: d95d265c-e62f-4b15-c31e-08dcecc45640 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Dy4GcDFDJwprO8nQKlff5DYLKVWtWFnMulWHOwq6mqnMPAbzgdlwEIEIaM+0?= =?us-ascii?Q?Q81EshCzK/cSUK62kjMAHWQGjeC+78jH7b/G6LDhkzb6Fj5TB27Ed8Pi0YtF?= =?us-ascii?Q?/r9T3FbyM08bJq3StwpTuCW1isqSfPM/dk0anmqbNCtggD3N0v6hWB+ZFtZD?= =?us-ascii?Q?qjFNS9LvSlAOFlXYQbMDUW2m68tdOWq976VlPYILk3UNw9uuRB0llChIEOBg?= =?us-ascii?Q?+15v0BMAaoO5udeQwCcu75mqPtH6fcY99kCUxPGZNOVZWvGc0k7wM4dqLXzz?= =?us-ascii?Q?LnDXtPJgCxDk3WJGe9YjP0VobXNsEIEU1F2CKLYe92rVVJsic6wA3nOZRXZ9?= =?us-ascii?Q?R5w7H/Sk8O7i6E+LU2laMhNxgI1FGdFbkRE9UCmuj5NhBNo46ggg+R/IBtBN?= =?us-ascii?Q?+T3UI1um9YYC2rgNdpjd4KMTHnlBw7IZebyE7/FkSd1nA7ZvEYF2svb6i6rP?= =?us-ascii?Q?4hnlbfQ6iE5Tk6fpLKX6RQGu2aEn91mFSAeUvV7hY9ZNB0tmMFNh1w1Z2jh+?= =?us-ascii?Q?PKxt01o/htPE8tQa/J2ip9wbTp8Ss3S7ninUDsONbzXC6p1E2Tx/w5B7OMJP?= =?us-ascii?Q?qrsocATamuM2R25gftcCQ1ZHXPCQCyT6eiBdOHFdHoTGb5DEpl0L8r6dGwjs?= =?us-ascii?Q?c4M9KhlN/X6/FiBWAJgtf+eda8IgHK+hd4GYBSUWtVGaa5/aVY8Vkp+5hHmu?= =?us-ascii?Q?CALbg+78uRwRkg0M/OinBT7Ro+woSBx8pwxPZV6PAPl+aHPBl6wQdR7PaVHm?= =?us-ascii?Q?3joBDX3jbbZACG9oezsuu+lvUaHzIbEpTycLWNnd43zbAzRDrQ7A3ahmnQUc?= =?us-ascii?Q?bfMSSRlxLrs05jYwUbW6jnMFm/uGu2GBWUU07tgS+TRCPiH+0480s5p3r/J7?= =?us-ascii?Q?+0nVcviN1P8UghCx0heQUgya+KBxvTyJeV6NXUrLmZX0obag5gqep/QEEUqU?= =?us-ascii?Q?TAG9liEbbxUdwQumrDtXfvOPzlu28+I6CckHYhfT2mxsI7eZKooK9+BTvQmr?= =?us-ascii?Q?GQTvT83yddqbVK6eKCU0CVrqhu1Oyo4ACRwp4cfEUxjPHeyX2QTRkBuwgXKQ?= =?us-ascii?Q?C6GEkpJa0NQgqOYjlv1C4Ece7r6QpKgBN/T/20LQVEIDmhW3jQNJLb6cP6LB?= =?us-ascii?Q?rXQ70RO6FJyJgWG3JO6MSE4OuN9PogBQOYKssl/sANy9l0rUQCxPyWof58sx?= =?us-ascii?Q?VsXzzyqZMoZyLxjoOPSfEGAMc+IUCH9EoGOM55a7sgt6zxPzhZVJtJ4xT1Va?= =?us-ascii?Q?s31jTFc8PbQP9H6dlXLxd7vIC9HWgNLhNARugeVL35earyu2POJlysEyEtbA?= =?us-ascii?Q?kLt2bkLrogTQwMrCqlQrMjpfi8xUr5hdL4yNJ7uND4oJSmwXbPaUm4OymY6z?= =?us-ascii?Q?vjpoReVtPIBsOadPqUJ8L81on+gC?= 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)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 02:51:58.3191 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d95d265c-e62f-4b15-c31e-08dcecc45640 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: SJ5PEPF000001D0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8585 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 | 287 +++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_cpufreq_api.h | 208 +++++++++++ lib/power/rte_power_uncore.c | 207 +++++------ lib/power/rte_power_uncore.h | 87 +++-- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 40 files changed, 1605 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