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 AFB1C43B55; Tue, 20 Feb 2024 16:34:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A392440A67; Tue, 20 Feb 2024 16:33:57 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2053.outbound.protection.outlook.com [40.107.95.53]) by mails.dpdk.org (Postfix) with ESMTP id 499EB40691 for ; Tue, 20 Feb 2024 16:33:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D0moTgZomu9tNXqgDTQpuM3gWne+Z60hpyP/J0ZlzKHemAEcFzhlmhXdHXv8saW0NWJJlLiKBchyYy3VdQdRkW45S7efwmL92Ni1LqsmHLAQuKwcDBCUHgHDqUghNt2L4EqUajj1fJMniGBNf/e5MqI+EA+kssj5aGXUZoScwHFkBbsDMUxlMmyU1/FYpjnH+aoRLneZGwuoCl+zPz0THNEUTgJZ9T3BX7K7PsIBCfuNHfItS22hi2VD1MlBZPKuAQnpTVy3H+FftV67e5r4OosdUAItZE5gqBfCqSfBW5qSsrhSIH0isTAK3WmEJsEVbBzqTT++lJaF9ORAwFrG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ZINv7oL5o96XRma437RwWOg8o/llmpRS29Eje69zAcM=; b=YWg62b1S/SU+I0NJ1SwIqDF2FN2zxkQTAinYxVpAJRHJzIlZ/10Rys9E7pi6Si893gMRpWUmbW0xn8aXzo6/JO6mKyQ8KGb0vgo3ATilPkHr093lKXpJGM2m5kt1mGhmUgLAlF5KVLbTzBtmFvvOyOX7lj1leEB+vBJK6jtRgnVG3sGFLliZc5FfBMnRC14ZjmgRvmwq2C7pTOIG/9eP+1MROTR8pO6YDNFgWXjEqmozZGEyqOlbOnCHomMEdGwg60x+qPGLC36LYCSKEH4jOpfrNus4Mc294/gIyuPXT9yTt6kZrDKWKTC5wLChyNVcxfNh2rx3hOXWHfnSbbJfKQ== 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=ZINv7oL5o96XRma437RwWOg8o/llmpRS29Eje69zAcM=; b=eW+VZA+DRD7/ehbxsXL+Tg1VWJptg2QiWCW50k7Oj+sCuyaaNTdgrMobmeGMip6zK/11yeB3kI3IKMGivH7Kq5LJ6OhAMg4NUi0qY6TilMcHv4nH7SMa5HSqP8eyLXkE3hjUofl2nXjgRxXed6aqQk10aqII1LhO27d8dQPUIuo= Received: from BN9PR03CA0482.namprd03.prod.outlook.com (2603:10b6:408:130::7) by DM4PR12MB6568.namprd12.prod.outlook.com (2603:10b6:8:8f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.19; Tue, 20 Feb 2024 15:33:46 +0000 Received: from BN1PEPF00004687.namprd05.prod.outlook.com (2603:10b6:408:130:cafe::55) by BN9PR03CA0482.outlook.office365.com (2603:10b6:408:130::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39 via Frontend Transport; Tue, 20 Feb 2024 15:33:46 +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 BN1PEPF00004687.mail.protection.outlook.com (10.167.243.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Tue, 20 Feb 2024 15:33:46 +0000 Received: from ubuntu2004.linuxvmimages.local (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.35; Tue, 20 Feb 2024 09:33:42 -0600 From: Sivaprasad Tummala To: , , , , , , , CC: Subject: [RFC PATCH 0/2] power: refactor power management library Date: Tue, 20 Feb 2024 16:33:24 +0100 Message-ID: <20240220153326.6236-2-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240220153326.6236-1-sivaprasad.tummala@amd.com> References: <20240220153326.6236-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: BN1PEPF00004687:EE_|DM4PR12MB6568:EE_ X-MS-Office365-Filtering-Correlation-Id: a8182bbc-62f3-41e5-d0a9-08dc322953d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Iu5ufNikiUky7du31RvaxmU3M+zbZ/ZMhWtkoyHuetHpjhsrXclN4E5/huh3FLzKBHU6ySIzXR6tTEg+YMymULBYCiDvwPGyHVM9cWlJxhaA+nAIhLQ0AWmoJXES+Hz6KDsdrvCIRCKv2lU/KVVgCQr6BXr15WbCtr32vi/u29bdiockU/sk5AxpRFukugyQ9QKPLlUfhS7K38bXIRAigkN7hbyzlSCFSwGP1m0nmUABEzjiPu2+8qUM3FH0e8taa4R6VxT1PdmlAEyM4hfWdmtUho8F3YmaUqkZnh1vibgP3I1wfVhiJIbqA162u+rShfp9VE7brwkZx/QEBpyb6nS1x+x0Jk8SCCHha51kJH4HLgM4nCW1zpcb+rnxhcRqt6T1LRaNlbZwxXKnghLA1QksoIL6qBgEus/2LLv1SkWM6vC9FXcUM1dXaL3UV/aRQOoAh/kd2HZB2UjOsYsAq0XVSWCEbt8LnQFgmVm7wrrtdPd8IZZESjhas4CbGA49eMdw4n1Ysx58nKZI0XjQLqbUZYrCd6uTY97SGWQskMO6Z8FisYJewVrqGPdYE1EVplkPqJb8QRf8W8ax0hM4k9RozI49G60oCjNqgyGuoz/V0oWrxoq67ZlgG55OdLrmb+heU4o0R5oMMNxGdmm0+UHRY5Nbm2F+OI5ZMr4jq4E= 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:(13230031)(36860700004)(40470700004)(46966006); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 15:33:46.0349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8182bbc-62f3-41e5-d0a9-08dc322953d9 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: BN1PEPF00004687.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6568 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. Please note that this RFC patch is currently in its initial phase and is primarily intended for soliciting feedback and comments. As of now, it has not undergone testing for build or functional issues. Signed-off-by: Sivaprasad Tummala --- power: refactor core power management library power: refactor uncore power management library drivers/meson.build | 1 + drivers/power/core/acpi/meson.build | 8 + .../power/core/acpi}/power_acpi_cpufreq.c | 19 ++ .../power/core/acpi}/power_acpi_cpufreq.h | 0 drivers/power/core/amd-pstate/meson.build | 8 + .../amd-pstate}/power_amd_pstate_cpufreq.c | 19 ++ .../amd-pstate}/power_amd_pstate_cpufreq.h | 0 drivers/power/core/cppc/meson.build | 8 + .../power/core/cppc}/power_cppc_cpufreq.c | 19 ++ .../power/core/cppc}/power_cppc_cpufreq.h | 0 .../power/core/kvm-vm}/guest_channel.c | 0 .../power/core/kvm-vm}/guest_channel.h | 0 drivers/power/core/kvm-vm/meson.build | 20 ++ .../power/core/kvm-vm}/power_kvm_vm.c | 19 ++ .../power/core/kvm-vm}/power_kvm_vm.h | 0 drivers/power/core/meson.build | 12 + drivers/power/core/pstate/meson.build | 8 + .../power/core/pstate}/power_pstate_cpufreq.c | 19 ++ .../power/core/pstate}/power_pstate_cpufreq.h | 0 drivers/power/meson.build | 9 + drivers/power/uncore/intel/meson.build | 9 + .../power/uncore/intel}/power_intel_uncore.c | 15 + .../power/uncore/intel}/power_intel_uncore.h | 0 drivers/power/uncore/meson.build | 8 + lib/power/meson.build | 7 - lib/power/power_common.h | 11 + lib/power/rte_power.c | 305 ++++++++---------- lib/power/rte_power.h | 207 ++++++++++-- lib/power/rte_power_uncore.c | 163 ++++------ lib/power/rte_power_uncore.h | 150 ++++++++- lib/power/version.map | 13 + 31 files changed, 742 insertions(+), 315 deletions(-) create mode 100644 drivers/power/core/acpi/meson.build rename {lib/power => drivers/power/core/acpi}/power_acpi_cpufreq.c (95%) rename {lib/power => drivers/power/core/acpi}/power_acpi_cpufreq.h (100%) create mode 100644 drivers/power/core/amd-pstate/meson.build rename {lib/power => drivers/power/core/amd-pstate}/power_amd_pstate_cpufreq.c (95%) rename {lib/power => drivers/power/core/amd-pstate}/power_amd_pstate_cpufreq.h (100%) create mode 100644 drivers/power/core/cppc/meson.build rename {lib/power => drivers/power/core/cppc}/power_cppc_cpufreq.c (96%) rename {lib/power => drivers/power/core/cppc}/power_cppc_cpufreq.h (100%) rename {lib/power => drivers/power/core/kvm-vm}/guest_channel.c (100%) rename {lib/power => drivers/power/core/kvm-vm}/guest_channel.h (100%) create mode 100644 drivers/power/core/kvm-vm/meson.build rename {lib/power => drivers/power/core/kvm-vm}/power_kvm_vm.c (83%) rename {lib/power => drivers/power/core/kvm-vm}/power_kvm_vm.h (100%) create mode 100644 drivers/power/core/meson.build create mode 100644 drivers/power/core/pstate/meson.build rename {lib/power => drivers/power/core/pstate}/power_pstate_cpufreq.c (96%) rename {lib/power => drivers/power/core/pstate}/power_pstate_cpufreq.h (100%) create mode 100644 drivers/power/meson.build create mode 100644 drivers/power/uncore/intel/meson.build rename {lib/power => drivers/power/uncore/intel}/power_intel_uncore.c (95%) rename {lib/power => drivers/power/uncore/intel}/power_intel_uncore.h (100%) create mode 100644 drivers/power/uncore/meson.build -- 2.25.1