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 DC16B45BAA; Wed, 23 Oct 2024 07:12:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E531402E1; Wed, 23 Oct 2024 07:12:04 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2059.outbound.protection.outlook.com [40.107.220.59]) by mails.dpdk.org (Postfix) with ESMTP id 663AF4026C for ; Wed, 23 Oct 2024 07:12:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VuDr+SkKoENFDQavqc+5n5KztMPkSKezIiRoQM384qcqwOMdpcqv5fKcHD1xorEK4iqKzYCwaGyDZtU5gimyC2+FHM8xQdy6SRFSAtQ/RrlFCaHmtmNraqzc/Nj/3DaF1Oi9YpzJHhsJo1p/jAbOure3x7x0z8W8MkMjKLFmCEygOy5DpdgcIOApmXn2qGqkmJpzoy5ipYclNnUSLbMK1NzBN5FEMtcrjXubLBGDqs69bpSsFw3umx8nKBNqUwzJr/0F0i8hCuUb4eJIWiOylNIbM2etAsyEFixlmjisgHZH9QsHY0zbY1TqvWysB9yBFr9+Rq6hWSpxoPJPsLrvEQ== 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=sY9dUsix9FbjfcDYFs0r2kbhXipjOBLZ7rqVnHZv8q0=; b=qtrecaIHPEc0VyBtmxqSoWIjoGGZngxmaK9+8QH8Wg/9kpE0ss9O574CECGa+1bvfyPjiKza933E8tjEbUUfHSeaE3/FnY0WN2CwySuJZI2tLvdBcjkgUUDEQ4Juqoth4cNVrvbVjENSDEZ2EoB1Fx88hCOBF6xk1mBngCoosDH/KgzW4KQj/OWPKZfIOm4sC9yA4alpMoI2QCnWtpLYtZLgTlvTye9VPTAtz+lPLq+0CSTyKNoF/b0J5btB+Q5q0/mD0nSWhmsNqIonafJhbo+qzr4NkeRM68pWCswEMhy7LT5HhlMQ1h3wMP9q9tDZJ5p1gxcmeroeHikM+5ccuA== 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=sY9dUsix9FbjfcDYFs0r2kbhXipjOBLZ7rqVnHZv8q0=; b=ghWr4E2Lw/RHx/W6C6a6cpUOcs7+iCNvgEkzCkz3SmjIO8FqjrG9S8LSnsU0M/uK3jUmf8N5sF1HXi5g3kgOoeuHOQyJDnwBlo7/IIVciSsWLVdLMF3B5XF4Q/ij85hldkDTuww3G5oNGiAzEYtTpMQ6NdK2dozlADrw5/06p20= Received: from SJ0PR05CA0132.namprd05.prod.outlook.com (2603:10b6:a03:33d::17) by CY8PR12MB7313.namprd12.prod.outlook.com (2603:10b6:930:53::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.19; Wed, 23 Oct 2024 05:11:59 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:33d:cafe::34) by SJ0PR05CA0132.outlook.office365.com (2603:10b6:a03:33d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.13 via Frontend Transport; Wed, 23 Oct 2024 05:11:59 +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 SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 05:11:59 +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; Wed, 23 Oct 2024 00:11:55 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v9 0/6] power: refactor power management library Date: Wed, 23 Oct 2024 05:11:32 +0000 Message-ID: <20241023051139.1066426-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241022184133.700367-1-sivaprasad.tummala@amd.com> References: <20241022184133.700367-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: SJ1PEPF00001CE0:EE_|CY8PR12MB7313:EE_ X-MS-Office365-Filtering-Correlation-Id: 5731953e-5147-42eb-43fa-08dcf32138e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?x5I1YUmJI4DlT4VtWjxbrNsnUcPou55E4rAXIEeOfLiQfwbsFHwobsiUpb3q?= =?us-ascii?Q?Lg7E4bNvH9zAsobI5tRQjaP8B/3WB1L6ot8GlSzoEtLC2PDYypmTbLpirBN9?= =?us-ascii?Q?V4P3az3OaEbChr/UlbnlO6g4AoAk2DzKySvXR/nd06ctIYO920IaXnqOTdhz?= =?us-ascii?Q?0jaaUsA04cHmCVpM6WhF6RSYe/Maoa5KFIoQ8RRC4eqGYhL+sxEM/AhE+mQM?= =?us-ascii?Q?AOmtZC9QXgFuyQDpmoHdclHER1DqThd4hTIyEMzEfN4ahLgEndJ3ym0dIfsC?= =?us-ascii?Q?J/CXfmXsyqetZnAT6cpY41Mf52Fk+Ym+qM2ci93958VmObg/GJAt/d5sEu/H?= =?us-ascii?Q?SDRBf+NlUulR7r/DS2rXLqry2LFOzCEpzLQhm6eKWiZarMqVKVTO+FGYbs6/?= =?us-ascii?Q?1cN0lmrrD2jgQvb/g/8U4OYQ+p7YIocK7/eBCNaKI8nKYAphTRPEKA570KsU?= =?us-ascii?Q?w5ni7+JlIuL6435O7Ju4ORDYZCCVaPiBZi0cc+z9zWNn+DjbIoqWKinX96Jx?= =?us-ascii?Q?wCINokH6lMH3rpNiJWhMHauRZ7TAduzG9VKY/TqlmT7s07fpUL2ss0yNyLAk?= =?us-ascii?Q?FSp3dq2e+nHHxBkNxdJVAUnFv3xP36kjXBG2FJOMbm1JKDrELgUDBspcAUEn?= =?us-ascii?Q?OQ2K8zB996lnRKuAL3kcqf8wkI2eHX1RDXHyMlkurtZh70WqzslBIcrJv+OL?= =?us-ascii?Q?kYatpshiWHJ4iRbeZQ3UZ38WqEsFNT9hhZmDc3urg62kXVANS9L2xE0CqD7d?= =?us-ascii?Q?wot1iWMgWIDA/mE6G6NFG1I+5i3ysZQF2ogo/DRkqHBRNKEUQu1atfImKTNK?= =?us-ascii?Q?pWsbyi7ZpsdL+RfVJZqb+/gaQXR4W/PfqSMlvy9byh8cqp8Y7auG5m37j6sn?= =?us-ascii?Q?H9CjuNHYXiUkIJUB1PfMoyIytR6+ZImjU9n6FoQ9C5oW/mZoIi++HSsJ3HPF?= =?us-ascii?Q?xSAAHMPfphgFAb//J8wOzkjxWdDY37rurl+BvTYEMvPt8waGSgCKkpdGev62?= =?us-ascii?Q?8O5jYeA3+siWJ2Xy7Xt4NkeAcVgA97p1nwnj15G0btb7fJFwwesz0yuCZf16?= =?us-ascii?Q?/1iMMVHdY261xXY3FnRcmTTNFi61tX5HOFproN53IfVqb6JVPVcb43HbuL0n?= =?us-ascii?Q?dRo7lRctxm3okIuABdJh121zURbsUHlI0eU1GOlitzhCot5Q7O+F732U9Mjg?= =?us-ascii?Q?R5TDsTVfmNkCh0v/kqEpqU3Rj6yIieRrxe15PBsuwi5jO1j/fN4aApsdKW4s?= =?us-ascii?Q?V4sIphPhrTvWStLncHEfoDngVBj8czE6x9GMjNc3WcihA6B5FAy5T4x1BkRT?= =?us-ascii?Q?2UlXAUuwZTP7Bqmj2fEX+RmI1fgCHtaJfQB8P+Tww1wrnSTzRrEO1UxvqNCE?= =?us-ascii?Q?fNEk2a40wBe3c4+wxAP4YgbjezpLgI4mSVkdBFpVdUiOgP9nHw=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)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 05:11:59.2250 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5731953e-5147-42eb-43fa-08dcf32138e3 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: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7313 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 (6): 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 power: rename library sources for cpu frequency management MAINTAINERS | 1 + app/test/test_power.c | 97 +----- app/test/test_power_cpufreq.c | 54 +-- app/test/test_power_kvm_vm.c | 38 +- doc/api/doxy-api-index.md | 2 +- doc/guides/prog_guide/power_man.rst | 24 +- 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 | 225 ++++++++++++ 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 | 9 +- drivers/power/intel_uncore/meson.build | 6 + .../power/kvm_vm}/guest_channel.c | 2 +- .../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/distributor/main.c | 2 +- examples/l3fwd-power/main.c | 14 +- examples/l3fwd-power/perf_core.c | 2 +- examples/vm_power_manager/channel_monitor.c | 2 +- examples/vm_power_manager/channel_monitor.h | 2 +- examples/vm_power_manager/guest_cli/main.c | 2 +- .../guest_cli/vm_power_cli_guest.c | 2 +- examples/vm_power_manager/power_manager.c | 2 +- lib/power/meson.build | 13 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 18 +- lib/power/power_cpufreq.h | 191 ++++++++++ lib/power/power_uncore_ops.h | 244 +++++++++++++ lib/power/rte_power.c | 257 -------------- lib/power/rte_power_cpufreq.c | 230 ++++++++++++ .../{rte_power.h => rte_power_cpufreq.h} | 120 ++++--- lib/power/rte_power_pmd_mgmt.h | 2 +- lib/power/rte_power_uncore.c | 256 +++++++------- lib/power/rte_power_uncore.h | 61 ++-- lib/power/version.map | 15 + 51 files changed, 1766 insertions(+), 713 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 (99%) 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/power_cpufreq.h create mode 100644 lib/power/power_uncore_ops.h delete mode 100644 lib/power/rte_power.c create mode 100644 lib/power/rte_power_cpufreq.c rename lib/power/{rte_power.h => rte_power_cpufreq.h} (73%) -- 2.34.1