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 3554545A6D; Sun, 20 Oct 2024 11:22:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB8D440268; Sun, 20 Oct 2024 11:22:57 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2048.outbound.protection.outlook.com [40.107.243.48]) by mails.dpdk.org (Postfix) with ESMTP id 09CA64021F for ; Sun, 20 Oct 2024 11:22:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BrasAhhEHPvmeQH73mIliWOgA1WgPUqgJ6azhi7rze12a5EeJ1v1/7jA8qfep2Fs1a+Q2gWPgK5tOA0xNpy6Z0nvcbaOdJox/klgVOLg97oac+ck3Gr5yCX02YG9N5bkwFSAf5QqSq7XoJYy5BzLzkoF0n/ChppV3dHL79pwuF5JbytXltvo8rP9vmjaauBmzk6A2iSmIXWy6JdYuaDhZ9AdktLdRrKI8ipSn5OCz3yuWMQV0RQPhq5/XmvPPqe+y5nIDs7H6R2j0SYhMCt29eFUsevEhupvObN0WQCmz+tMb1m3ztGruOYdW952PsAK9p8c/F6WkY8c/KfVggvmmQ== 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=rvPGhEIyo+otU5rXLmuf5Mgpg4+WyGR9Gk+sKOpDA7Q=; b=HLwO3/CozPKaLR32QH31uvLuSxFW/eEFQRKlDDPMQk9WUdV+AXy6MEyFKXKy//von62dbiZtUD5KCUO9NnndJJa4QenhKhsXraHIsNtIQ2gUjc4WYVW8fgsoD5YbtEo9EmGVpUQjZwryVzM6dUcjeb3O/UwhZQxPefqWx8iUZ0X9y/MU9JTRmEsBk69DBbCpZNvCGnV7ZBndybUUYjL+hOtxX6wiaFcvIC9+tcVtKbq+YXBYJlUltO5NVDxnRz1o0lwXAWnnIs7bYl4Rlx8Zsv7mJ71JdWg7qi9UlR2anmyUtlLwSufLcj5W76BG0/HD4w4adj8K8R7kAenYf0fHug== 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=rvPGhEIyo+otU5rXLmuf5Mgpg4+WyGR9Gk+sKOpDA7Q=; b=4acXZie099CmJZQPwQDgaee+tt3cxXTWaRuXCVSmZctrDCDJUwoQSsa5YGUJnWLwVaSv6giPl2t4o20HFtdaIfmQX8hyDO8evv6jCYGIip4at61mDwbWlAXmPZwc2E+w9kZ1NsUUSRUEl5GLXFmpIoEj+AfeTrMpnW0VHCyPYhA= Received: from CH2PR07CA0056.namprd07.prod.outlook.com (2603:10b6:610:5b::30) by DM6PR12MB4076.namprd12.prod.outlook.com (2603:10b6:5:213::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Sun, 20 Oct 2024 09:22:50 +0000 Received: from CH1PEPF0000AD7C.namprd04.prod.outlook.com (2603:10b6:610:5b:cafe::9a) by CH2PR07CA0056.outlook.office365.com (2603:10b6:610:5b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Sun, 20 Oct 2024 09:22:50 +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 CH1PEPF0000AD7C.mail.protection.outlook.com (10.167.244.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Sun, 20 Oct 2024 09:22:50 +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; Sun, 20 Oct 2024 04:22:46 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v6 0/5] power: refactor power management library Date: Sun, 20 Oct 2024 09:22:27 +0000 Message-ID: <20241020092233.2906612-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241017102650.1041030-1-sivaprasad.tummala@amd.com> References: <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: 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: CH1PEPF0000AD7C:EE_|DM6PR12MB4076:EE_ X-MS-Office365-Filtering-Correlation-Id: db7a72e0-c439-4718-0357-08dcf0e8c4a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8zptD2QI2q8F44RDfBdVY7SO3ZJCtY4P8+GrP7S3H3gkQ9PQiszUNL/mxG4m?= =?us-ascii?Q?MjYxkQYU9LAFqF4DTY+gD1urNJwOprag5oS3S89/TReMpok+H+R8jv0CfP7S?= =?us-ascii?Q?/cxJsKAXv6C1QoEvmCQOpRoUvmGoqY11SGQOepImcLzXIR3Q0MPM1TkJe8hC?= =?us-ascii?Q?d+rw6bJ+xtf63tLcv+Ipry4soqq4585DGR2t/bBBgYe0EyekFM6D3prDaM8A?= =?us-ascii?Q?T6BMPp2P0KXu7ZYlYLfuZewMqlwFb+zrY6SKfdLrQv3PZte9p/GZBd9nfZpF?= =?us-ascii?Q?SYRNTVCv23XXNwgx36I+K82w/8CGpvlmdAdjAS7aFzojiT5kitr4Bb9vmmjm?= =?us-ascii?Q?1/N9wZ7LdPyfKnPPkwDisu7A3kPOTgzd47f1zHQ6+XrLowSa8bGYlhveNJvy?= =?us-ascii?Q?z9Ij3FlFMU1MQjzS09aHaDkBkbyvZMdrsykDdJzk84ZrTMOCO36jOH1T9Svt?= =?us-ascii?Q?dmbPwdOh6yEzi4PbX1xUsoo/N6wlVf+03ArWQqd/kXOZn1S7mCdAABScIBQZ?= =?us-ascii?Q?P6Q5lMeQOQiFgx1DagE1Q8B2kpysuKKoyGoB8Fnr5V89IuPrz5S2Rvq3K3bJ?= =?us-ascii?Q?x4zD9uBOCruCzzakQrfGhQcuMe7Amomr/NY9ISuXvG+m6sjaqqLNBGixkGoc?= =?us-ascii?Q?5g0eA/FES1MrrhkovaJp6G22vHmnZv8dtrcM7pbAHPLdT8XIJE9P45bSqItB?= =?us-ascii?Q?MPrhlbfnW/H1hWM3wE9BVR7nYrvB2Dy6WppobSNmNuHRe8xoCMgxNU744hFq?= =?us-ascii?Q?ypcfpzQHbSqlh8N4g2fYZhpdnjGYOkWdAlFwkiCdmcbPTyLjAJMA0ISFemIc?= =?us-ascii?Q?Mv/IYkl+MjRVVg7HHV7raWy0TrWDDFvKMiR4emmzD5linOMSZ8KTSU1XokzZ?= =?us-ascii?Q?95BKr0u4B7S5IAQC0XJMe9pZ7LjUOgxwMFJiU56y0aktvTYL5cyJf02UGmDB?= =?us-ascii?Q?T1skvfdUQEu1sLw4gShTEwC9LHBtzmG6crXL0LDfHl3ThD0dAZdRzmxwBRJc?= =?us-ascii?Q?hEsTJVVgBRwo/npoM54wFcBhouDw9cqEt1T/kRlQ5BlhtffgH0Xl60BezIr3?= =?us-ascii?Q?ck6LOmcb5Hv8RSIE+FB6A8b/P9yjLS3LyFbrYq0Ee4hkESDvs72SxlxHztG4?= =?us-ascii?Q?LLnHVG2C6l1FiBdpE40GyWkHveeeNCVP7kWmgUBonce/0a1btFpvMHQISTw/?= =?us-ascii?Q?h7Zz9dHm1GK2AUjGs57sZNETBfHWs+Mth1kvUQSaz9kS2ooe/Jpx5sOfM/0Y?= =?us-ascii?Q?TntpQizf7xtCNg0zy2HqR6o1fp0Zi5mDo6UnW6U0NyKjmTiqJp5KhisxJv4K?= =?us-ascii?Q?HUYLl9r/cShGpmLshKeWHCHhYoShqY+2bI3fnYwc38BnPllTWSwzuNvK9obv?= =?us-ascii?Q?Efi1tldRXKj04qHBOLVOnGky7CtjbAhpFKKFTGLHEMtSudn8Mw=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)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2024 09:22:50.1032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db7a72e0-c439-4718-0357-08dcf0e8c4a7 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: CH1PEPF0000AD7C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4076 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 | 10 +- 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 | 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/l3fwd-power/main.c | 12 +- lib/power/meson.build | 9 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 18 +- lib/power/rte_power.c | 355 ++++++++---------- lib/power/rte_power.h | 116 +++--- lib/power/rte_power_cpufreq_api.h | 206 ++++++++++ lib/power/rte_power_uncore.c | 253 +++++++------ lib/power/rte_power_uncore.h | 61 ++- lib/power/rte_power_uncore_ops.h | 230 ++++++++++++ lib/power/version.map | 16 + 40 files changed, 1664 insertions(+), 622 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 (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