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 47D7445B3C; Tue, 15 Oct 2024 04:50:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C8E740270; Tue, 15 Oct 2024 04:50:21 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2067.outbound.protection.outlook.com [40.107.95.67]) by mails.dpdk.org (Postfix) with ESMTP id ACB6140156 for ; Tue, 15 Oct 2024 04:50:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tCxxD/vPLSWlMWj+y56ruLiYKWbiAc8DJRppVwTzVVf03XWSHwQvOrpnuowmFRfBPboSUR33PYCuAjI1RShYv2pBANAVkC2DfXlkUshjb/qLJYP/78dOoztwim5liDrDz9R+6cpmX8CRcb0i/Sxb16HpOPIPjRkbj0a5dWpp5wc3/VZVnVlrUMd3hvI+lGtaawfxZp3kRoAGhwUylaGrRXFF80zmtNcUqK/HoKXFhfGtW8Rx59FUlxJ8xy0dEreZYj7qp2gC3F0lj9JMTM5iwEafR9i0rAt4lXHc/UJwktgJrBbV6KKLqh7869TJuem6ARSa9Yt7s8lz8t8CbL4Krw== 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=LrBjdMW2N7jx4WmjazpCVJfO8ktXHrtWTy0JvmkYc4vSDPeKMHdbSAfh1U7DwvooWYkYJ+kaAN2IC9/qOfxZiZqDsVSHP4K0KBmsKXv6i+RTGXlgDn4sbpYUVw2GbvCXaY5enOk0ggN4fY13SA7QQ1xZFdWjG0FUZYTVFUwwUkiVXj28OTa9B6fvRJRbiW8tevRq+IJlH5Maa7F47KaFZga2kI9NdcAuDgwukTYEKPyjmKKEMmvY8LniNinwnpQ2CIgHXuGwOmr6JN0KY+C8CYGANQ8SKtE5Z5wESFwF2rgPrCEzkU5lxZfoFw2V/o6guTqYTly6pQCvpT2TnEmc5A== 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=cnpSV+S5xtC1yCJXC+LMGL/oaax0MKVfaj8MWCa3cvmYFHSy9ET0djEKGreZF6Is+YEsJjFBMTy+2NqVgMed+Jlh3p0aeW6yB0EoKOeMlK9fSI/dHtTrG67mSIlKvVpxMdxU9XpwJ0PLUTETVp0n/d9VFl4QCqa15BmQIj67XVE= Received: from DS7PR03CA0340.namprd03.prod.outlook.com (2603:10b6:8:55::21) by DS7PR12MB6096.namprd12.prod.outlook.com (2603:10b6:8:9b::9) 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:50:17 +0000 Received: from DS3PEPF000099DF.namprd04.prod.outlook.com (2603:10b6:8:55:cafe::5f) by DS7PR03CA0340.outlook.office365.com (2603:10b6:8:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26 via Frontend Transport; Tue, 15 Oct 2024 02:50:17 +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 DS3PEPF000099DF.mail.protection.outlook.com (10.167.17.202) 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:50:17 +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:50:13 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v4 0/5] power: refactor power management library Date: Tue, 15 Oct 2024 02:49:53 +0000 Message-ID: <20241015024959.3478399-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008172719.902619-1-sivaprasad.tummala@amd.com> References: <20241008172719.902619-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: DS3PEPF000099DF:EE_|DS7PR12MB6096:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c46cb1c-7424-4289-49b2-08dcecc41a0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026;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HEGmLIwssUFTqtlUqxImhhAwgs4wIIdL76xISxSUzAYoClkL?= =?us-ascii?Q?Ds7ZCTn+/NZXNXi7CN/+u0bUmO3mErpGjMS1rELkFhON2mWh0HjnVanCqInI?= =?us-ascii?Q?Pd41XxIPl5zRuz5P4b0bEwZ6lI6mlQHxfpEv7YRp8rjBkRuU9sgykrWJjVAN?= =?us-ascii?Q?Q5GHrmAyG97zy4+fh/UOihDErEuRkrNTJbrkeiw40+tWgpA/bLoJ5l7KSW7f?= =?us-ascii?Q?UB41OP/vyKlf54FmjkDgO4pKkX28g0qd8JiL/kaHyIBfHFpBrH9Otxieferf?= =?us-ascii?Q?syHA+wAMBCLQyeBzIflHesM93Q0Wke8YBHyWNvSCQVKJYb2bcSZpEwux+Dy1?= =?us-ascii?Q?Jnb0QAmGi/NP6Klf88dhvwtVZF42g9QYiKbBpL5jNk1iw3Ogyq4Mc6sDAnt7?= =?us-ascii?Q?ViqD0eNIQTxzn8CZTt7IlZ4/hSRb4W/CWlqu47+ArTo7bhcs8oaMyjok+AP6?= =?us-ascii?Q?HUVXmwKQ+rL91gGNSCCuCSkQYDvmg3O0vuvrLrX3OWVLSGXy9vo3B9FpzkxI?= =?us-ascii?Q?EI74Y9JmAGY+w+33bGee0KbWodvA?= 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)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 02:50:17.2807 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c46cb1c-7424-4289-49b2-08dcecc41a0c 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: DS3PEPF000099DF.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6096 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