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 CAA894586C; Mon, 26 Aug 2024 15:08:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B31684066A; Mon, 26 Aug 2024 15:07:35 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2065.outbound.protection.outlook.com [40.107.93.65]) by mails.dpdk.org (Postfix) with ESMTP id 2722240662 for ; Mon, 26 Aug 2024 15:07:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pUykh6vl2tR3/p6ZkqbfCosaJVflfhdyFO6P/lKStPq/9/T+CWB+vl2HvQan/c9De7yYEe3oCWjq7MJN/sbIQJJJ3q7NSKnNJ+AleNsqOVw7CR07mqSldl0wDQRw41t+4nwPmJ4NDR5ZSqUlA4NIcswnHZkDAI1FLT5/aE5iArERhTjpbTORCBYeQSeI4gaX0PmPfzRX0mTGdm4vDM4dQiJTHkT90B0NXbBt4oIcL5d/ikKNk4m4sHNwYvJRNuGGDKUZe0XIVk0+Qtc94TCFEv0gKoxW+hY2wJG5+Z2mayULKSiIhlSaNCC5bqMF3e/U70C0RnJZCQ3f5alkUtieww== 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=OsuvbLnZ5b3Xs9AP4r+nsliiprJ3IQQkVQKl9i6SesA=; b=R4txPgC4KcqbfQEga9dR9fiNOQ9Oe28tAWg4fYKS6KWbp+m+p9E4qPT58+FKNUX0VxnI9eoh/1n2ZOyFFkam7wH6bV+PuTRkEiDmrsDiMb/tkM2vJfH6fxyk2sm3CESRmgeKEfOW6W9sCY7gXv058vj7WkKa5hqRp/keyTlLHB3bbmf7lTKOqQ4EwlDwKAGnqB+hRzsf9jhsoAOEpKJuNKm7BerybGyeiBOyLp4iolU+TXPsKUC9LYN6vfkR3faf5hkiNDToryjBJWW/mX0unPEsFcktav0k12LEHLaXIf7Rb04KpFfFyp+Zk2r6BzpEaeDuojLPesB5mVRSoY5dLQ== 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=OsuvbLnZ5b3Xs9AP4r+nsliiprJ3IQQkVQKl9i6SesA=; b=L7FMdLeIDWuYJQa9P1+gF0HfJX0sb3JSC1046bRa/p5m9zGnzS74joYjQf6xTLZmLwMOikQrpcMZhMIB9EwWGgPJPuKtKuW11RgVQ3RUEJkLi2O6ypPYmp8R5KZbCwhvWBH/LZeytMeAArLIGWYK5kPGpW3sAnY54alvmzvRi5M= Received: from BN9PR03CA0438.namprd03.prod.outlook.com (2603:10b6:408:113::23) by PH7PR12MB5902.namprd12.prod.outlook.com (2603:10b6:510:1d6::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Mon, 26 Aug 2024 13:07:29 +0000 Received: from BL6PEPF0001AB74.namprd02.prod.outlook.com (2603:10b6:408:113:cafe::c4) by BN9PR03CA0438.outlook.office365.com (2603:10b6:408:113::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24 via Frontend Transport; Mon, 26 Aug 2024 13:07:29 +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 BL6PEPF0001AB74.mail.protection.outlook.com (10.167.242.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Mon, 26 Aug 2024 13:07:29 +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, 26 Aug 2024 08:07:26 -0500 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [PATCH v2 0/4] power: refactor power management library Date: Mon, 26 Aug 2024 13:06:50 +0000 Message-ID: <20240826130650.320130-6-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826130650.320130-1-sivaprasad.tummala@amd.com> References: <20240720165030.246294-1-sivaprasad.tummala@amd.com> <20240826130650.320130-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: BL6PEPF0001AB74:EE_|PH7PR12MB5902:EE_ X-MS-Office365-Filtering-Correlation-Id: 21208d7e-d36c-490f-f549-08dcc5d00a52 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fEBRiC/B8JCw4vCt9igE/KfQLjGFNHA3RhuYPo3EGriuRHdWH3YAHKjsmsH2?= =?us-ascii?Q?vJzaC6tAB9IO5tgyVJLA6+WKIP+cpK8Dqq8rOqONR/t2EhkFdUun0YEjMrnq?= =?us-ascii?Q?jmWq0go4cIbkkywPoSJnhVOo10aE1huGpCVKSWTwAwoEYxko1atqqQehhHh9?= =?us-ascii?Q?bqmKoQYgB2DmuGsxPd736gQMYve++rxwB/YVH179+PDBbHQYguWR9TAzacki?= =?us-ascii?Q?H5zGMETUuOYIXw7zNM1fd5Iwz5DUkTYXROiNyFJoXtVocFKdp3QV4k6zta37?= =?us-ascii?Q?31RhZ2x5kZAKZTXU+8lQhRJI+VkHm6bXyoWMjxeNt8ueNoGA6j5PZakveTkH?= =?us-ascii?Q?9HrkyY7A9BTLSlnHvHKWQfHYyj9hbHmddDcZu3nykMhxhO+uiMnY3s1Bp/+K?= =?us-ascii?Q?kmThgV9uT69CqgGmwypcjiTCTVqwmuFplCuvzodt11UBdcqKK2dlcN/fdAid?= =?us-ascii?Q?IflTislnQmWrvKX63tk/XDyrswjrRgUTSzVWAwEKz6drvY7W7nvSfiK9cdCm?= =?us-ascii?Q?OChKdgOgY0o9xS0o5cUVFVkSy4jWPCexAWqHMCnMk+UV/bhLaspc0vO722sc?= =?us-ascii?Q?N8/odVUT2lgNGgT0iYQBBFYhiCH/F1UwOC/NLArLRye4y1e4hFQ1qrWMhtfQ?= =?us-ascii?Q?0Z5q4IGtvf6rAPPNRV7dfFbUpZFYD8dELW6zK7OZb/V+vmOVu3hXW39zCvqI?= =?us-ascii?Q?3dn+qBSyeaeBNSduFQeu7pHeYntoEo4JldvP1UFjutXxbCYQickg4GcfC/n8?= =?us-ascii?Q?JJrToulqgazQJCgrnP7SuJDiLAtfz0dbRSpPR5l/PaUvV37NC90mbanrvX70?= =?us-ascii?Q?JSuCiSUIh6+3H6DOS4DdN5Gq55CdIZanBXwhoJ/dRBBQDkdxm9dXVgZtaJzv?= =?us-ascii?Q?b1Wy51E6+1KVRUxZJO5QqarurMzfF11bKjaGbXyUOqKEzB5QLBOjBwiRufFX?= =?us-ascii?Q?ztpoC4QLz8Y9suIhXRamVAlumxXidIlQ5i1GuBx4+k92osFqVdHOnnL7Jd09?= =?us-ascii?Q?N859LhfP2F+VQBhNLtzmNUGX5A/DxI+/awc85X+hjCL+rSwjl9FiH9d9RS3f?= =?us-ascii?Q?rxfea8m8gX1oLf+9G4keHfdkl6x3A6xam9z/lXUQIimDvXR+ecSzd3trJMJv?= =?us-ascii?Q?/08xM801mQGSWZA1axuuGIK/NsKa4jVfOWtrlV+1ejP1BGdMRTjWK/PN2YnQ?= =?us-ascii?Q?XO3BVjm75JcR3aWReMy+0X6W6XnHdmCMEuTLoSZpmjZTPkmfdsNzswIKx+E7?= =?us-ascii?Q?UQQ5SrVQtLMf4E2dTfUzLFmOi1Mz36Gq6mTUXVZKVn239mYaBCgn+dsIPmSh?= =?us-ascii?Q?Mew5i+Czz9cfhw9IPxz5HWH54Vqw6JiL4r9NRb7W7Z1XbOcFtEqVpIHcehMi?= =?us-ascii?Q?+sWNq/eBH9TWK+ItL03m7+IG/lAsjxHLd4buJWyI+s6rFUsqzhF9oC5rAkQo?= =?us-ascii?Q?C323JjU3BVwm0Y93pio0FhLuZmxUTB/c?= 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)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 13:07:29.6064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21208d7e-d36c-490f-f549-08dcc5d00a52 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: BL6PEPF0001AB74.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5902 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 (4): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations power/amd_uncore: uncore power management support for AMD EPYC processors 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 | 328 ++++++++++++++++++ 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 | 291 ++++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_core_ops.h | 208 +++++++++++ lib/power/rte_power_uncore.c | 205 +++++------ lib/power/rte_power_uncore.h | 87 +++-- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 39 files changed, 1604 insertions(+), 625 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_core_ops.h create mode 100644 lib/power/rte_power_uncore_ops.h -- 2.34.1