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 B5D3D45C00; Mon, 28 Oct 2024 20:56:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7800427A1; Mon, 28 Oct 2024 20:56:21 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86]) by mails.dpdk.org (Postfix) with ESMTP id 8553442788 for ; Mon, 28 Oct 2024 20:56:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NcBynj1ICc7LaQZwW5uQA8gWkJOXd+gOkdoUnYZcAH0ZqfS/iPXQOKKfxz0EcGe1lwzJMYHirjsRNJHkKAOKTNQ/IzBSkr5P/zRIl/ywjT28qgSWxjXXut6mY4zYeXajOSlf4tU222tcxx7dZ3XUkYO+qC6jv2b5m0KDSCEepQzl8XzWM7lxMQnUYCmGxYw1MP0ovqmzQkLxRJtKanCKkUvluIoI0jYt/b+AUNJeCra5ZFcORIZBVQVnQHf9cUp15Jhrp8fIKlPT400TR8SeBWy1zTBxxoyLJraVr4tD3zAE23YM/Sm0y5zc2wHeIrX5SHcKH9lnaHh9RO6m+HEMLw== 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=z3W2UxE8ALTlorkfptS2aV5ZfGMuwDdKdMWYPxfjK4Y=; b=GlKwT5D0Nh+MkGoJ0c7Zso2BE/lnEnExvVUgHKlQIwHZ/JTSMTVj1VsgMgXN2YL2Q/5E2+xcbOaGAKDwQedoUdblQqbZFN8bwIwIsleIb9wFTlHx0h94Vu8GPx7HPibourk6gn8HfJy4s+6W66XYYMe0Q69Afop6zFJmUi3E+BkOIY6hiQLgV5k49mByrfRLURXeaa5vGh8t3CRonv7/tTkgrqzZg32a0a2m2ELgccFCJaffFkDMyG5MgSWaDb2CKJx8k38tVSM/E6IC+fHeMTBzR022FqSG1/PYgQW7rvacau+yCCD1MkbSS8dW+v+WH8TZfC+8v+cc+yw8dqHFvg== 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=z3W2UxE8ALTlorkfptS2aV5ZfGMuwDdKdMWYPxfjK4Y=; b=K0CsScsxYox8d8YR08tAqUr7vp77El8Y47//WTcei5B3Ch86bvdLeOXxBLoXuyKJg8L6HSvFLjyRi/5BHVrT6xWVKKdtc2YIw3BHsIuJFddn1Z5INU+dsv7bPXEdv0fjHNBggd3XvVszR5vPT3W44wEzDZ55VKlznViRzJPcFnU= Received: from BYAPR07CA0100.namprd07.prod.outlook.com (2603:10b6:a03:12b::41) by BY5PR12MB4097.namprd12.prod.outlook.com (2603:10b6:a03:213::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Mon, 28 Oct 2024 19:56:14 +0000 Received: from CO1PEPF000075F4.namprd03.prod.outlook.com (2603:10b6:a03:12b:cafe::b1) by BYAPR07CA0100.outlook.office365.com (2603:10b6:a03:12b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.26 via Frontend Transport; Mon, 28 Oct 2024 19:56:14 +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 CO1PEPF000075F4.mail.protection.outlook.com (10.167.249.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8114.16 via Frontend Transport; Mon, 28 Oct 2024 19:56:14 +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, 28 Oct 2024 14:56:10 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v10 0/6] power: refactor power management library Date: Mon, 28 Oct 2024 19:55:50 +0000 Message-ID: <20241028195556.450033-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023051139.1066426-1-sivaprasad.tummala@amd.com> References: <20241023051139.1066426-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: CO1PEPF000075F4:EE_|BY5PR12MB4097:EE_ X-MS-Office365-Filtering-Correlation-Id: f8aaa705-22bb-4dd4-b1a5-08dcf78a944c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?176Psv7TRDLYGpses2F3VAXGhEHjPFIy22Qiet2eR0ao++2U+L6TWCFK30uY?= =?us-ascii?Q?6uD5ppw3HISz9hBOkwIGtqKmATnicValVpVLM6so734Qbdx9XdphoFBvXsgV?= =?us-ascii?Q?L6vsn5njLpnv40tiaEGrO02+pYM4r6EUcpB8Zsy6d1AKXq9LtPnnWEWFozMU?= =?us-ascii?Q?2d/uuqPtahlyaINtupEdy+3BfOoB3e9aWj5cZ7VzLPNzCSO6jg2RT4IMmc28?= =?us-ascii?Q?0q8VefeQxftPyf9xfqOV+QEO0GYgipYwEH2bwKLDc0ImtXxznJwE9ae56spm?= =?us-ascii?Q?0DpHUd2VpPyi9vTnx2KXEDXg2+ZVmIK3Jx6hfFrjCPnpPGO1n4tLXqA5fw2f?= =?us-ascii?Q?j6hOd+J90ASguby1u86KC1JY0uW5NCIu1jm3fiUe/r9vKakWmHPEee9tzyt4?= =?us-ascii?Q?anY6ZjKpxR42ItluzI8jR66b6PSymmCuXvay1k+gop/dTwHjUxtZqcZhtS7P?= =?us-ascii?Q?OBmMqIB8ytFCHDEIaSze4oyX0mEvMpgXZQjQom472CWSLIK3Mfa4/VJRvBAa?= =?us-ascii?Q?jkrM4tReARDZ17jrSjEaxZAG1ITQrKNIQJZQRgOZpgtyKwmvmBpaizJPP+GE?= =?us-ascii?Q?bZ8nTKc0RS+EtkGQUZ1WHW7y2ShACmGaGgIwrkuZEzfiqYDmZpIqtqQkQG9l?= =?us-ascii?Q?p78oAofaOSQArttEEOcP+AZLl5pzZn5XNKduGBBu/2vJ5NrXIHLqsiQSL3oS?= =?us-ascii?Q?wexdd4nxFJqoPgwu9fh5/m5ELQVbYOmi7xrHVDlsGxTPwuPvfc7PF8yzKfya?= =?us-ascii?Q?/ky5N04FBatr8V/FY3Cx7T2GkV2o5wU8R17xaRAIuPXeTU44TXwe6MM/wle+?= =?us-ascii?Q?lDRMg0VwUdpqMO0Sk+xyN5g4gDSTmJYyIjViDSU1xKHtBk74SuwLBYHX4kuI?= =?us-ascii?Q?Q1vRJJlbXp8JBr/QAq/V1G5a0jRvqngsPq8qeZbCRFBylvBCxLdyBRLGvEPD?= =?us-ascii?Q?NSKrZNDu462FsOMVJSsNecR+OIcWRHt9JAhRsfLMeBCrP9OBqu9y/nXaBt+K?= =?us-ascii?Q?rkz5ih0l2sq4G0S/NQrtoGhOLXT9cFoUbiikcIlBOXsqBsq/0n3b5T3Vjnor?= =?us-ascii?Q?fDTwC/8zveMZ2XyJGn/HM+ODh9iAWQfyL2e9bTMOXxbJqUkozyJLgftt70Sw?= =?us-ascii?Q?BFcK25xdDaDM1qrbGVXyRjsAZYcR8uOQ65V4mY6XryOTRkT0PCU1UBNgeizf?= =?us-ascii?Q?VMxeQHUpEr7QvuthZwsQd1gBF4m1ccTF39lfAOGx0rDfE1CKIk3i9o6EsP/x?= =?us-ascii?Q?ZbOk8Q3iOKDOFHzUOcmu28ei30reljaOUGL11hWWk5t2gij8J8+CgUNDAf8i?= =?us-ascii?Q?usGKNYkBiL0vg/Hy7ty+LYtvgU4csNdy61fWx8kfKYbdXdN4odrcSbpC7m5j?= =?us-ascii?Q?V8vn7S4HNRm4r75QNmw70BwndqDzXai4PXNxU6J20u50NjvoVA=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)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 19:56:14.1775 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8aaa705-22bb-4dd4-b1a5-08dcf78a944c 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: CO1PEPF000075F4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4097 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 | 227 ++++++++++++ .../{rte_power.h => rte_power_cpufreq.h} | 120 ++++--- lib/power/rte_power_pmd_mgmt.h | 2 +- lib/power/rte_power_uncore.c | 259 +++++++------- lib/power/rte_power_uncore.h | 61 ++-- lib/power/version.map | 15 + 51 files changed, 1763 insertions(+), 716 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