From patchwork Thu Aug 8 12:36:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dhananjay Ugwekar X-Patchwork-Id: 13757377 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2067.outbound.protection.outlook.com [40.107.243.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE75663D; Thu, 8 Aug 2024 12:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723120674; cv=fail; b=e0h7teSqitaTewh1mR6DWevMmQATG+fYEn1+Jixqi2AFH4o5S1zklxMgcLpSPFzeR9Sb28ToKa9eaK9qA55TesuPH7TYKTD9/WsqMGQajvojjWZiumcAV5GDPv8+5+B2TPJFdZAGJ3xhKvdjanTu1J7Ls2p25MHNU+jrTKd+NLc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723120674; c=relaxed/simple; bh=znFBPoJLnQzgpAyU1LEd4K36b29KXw/px+Gr6XIzC+I=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=p9Tw3SC1od1GmkBR+5yK4e7qThgT6FgqhDuu9jYFgSQH3NtYcWk9POZ746aKyeev/hyfq4eAnzb38lR5sEUR9gYDidOzFc6fSSBRnIlf+8ZByQACvqzLmUCsfRyowPbk1kri9sD58JlyCdPwClWpNhmN+mV7+LV8hm+Iyg1Ootg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=YIgJuwTH; arc=fail smtp.client-ip=40.107.243.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="YIgJuwTH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HA/vLRrO1lYgsZ8vgdZZK0ijK1MgV22nE7euqtbxDDTdHvHKiikJaakuAGIX31IQH0ZJKyMIvyuKNIGm5368oVOhb5AKAAmknZ1UDT+BgbdNt0SGQ529SNi6PXsCc+FHIsVR5LnPcSatvV4z/kC9KIakF8X3pQIXgBf/NXGoL8Ej1cfUpKx8ireo8TpxaYUMgqsKAxmaTckLU0WHPjtt6utZKy0gU6Wu1WM/KDUyfW4M947+GBJ26AiG1cnVfgVFXN7DpRSXTeTsffmZAJ/OEU9ZaMzDHTYVjfQtOfFoZ53FHoZ2Ra0HYshLTD+j5bT0BHKkUF50PmWzd7AsOd/mRw== 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=ez011FTiXme6+4NfsNAKOh53eo4p4Mn0gtq4skhxTvU=; b=m8riO3ywJaCNlroJWB3KbX77EWFrz6lXSAze/8QMIkrrIw7dWh05tRK4YByOkNOjSGaiLqxrKEMTG/arvjsxrowRKf8XheYMYb89mzlNjmPFJH25EKgzyI9AKHA/lEdKxlm0p76uQJqQuoQJMIteua2FoKKcrOZQ9USSCPcvMTiS2Cxvs9jwsAI6EjMYqcveCcxde/0WcxmYgoexPy/CYLtjAliFHNGlGA3PGYFLmn9VrRKCuiatVoP0wNxqXLAidVoyNJt7AwyVU6CXU76LZtI4OVFxR9KNitgFV7cIUfL0XgKH2y+TJaRLWRoWF+8ImAWkOP4/EQLd0yIuSMG6Ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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=ez011FTiXme6+4NfsNAKOh53eo4p4Mn0gtq4skhxTvU=; b=YIgJuwTHCEKqaosKzu1/0onWrXmiw7oWsYotc6lLatyFe9NzN5tb+3QCEhdMxpSZkEvRHHOdRQo2Z8ov33Mj+aLlXUf9ktE8O3z6tg8xEnjfjM7KVMsoZk1sxWW6PSpTL24oEhTaGQuUaEnsZqWEK2vsrdXJMIzQSCAO3/zLVFg= Received: from DS7PR05CA0058.namprd05.prod.outlook.com (2603:10b6:8:2f::11) by IA0PR12MB7507.namprd12.prod.outlook.com (2603:10b6:208:441::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13; Thu, 8 Aug 2024 12:37:49 +0000 Received: from CY4PEPF0000FCC0.namprd03.prod.outlook.com (2603:10b6:8:2f:cafe::31) by DS7PR05CA0058.outlook.office365.com (2603:10b6:8:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13 via Frontend Transport; Thu, 8 Aug 2024 12:37:49 +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 CY4PEPF0000FCC0.mail.protection.outlook.com (10.167.242.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Thu, 8 Aug 2024 12:37:49 +0000 Received: from shatadru.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; Thu, 8 Aug 2024 07:37:44 -0500 From: Dhananjay Ugwekar To: , , , , , , CC: , , "Dhananjay Ugwekar" Subject: [PATCH v2] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put() Date: Thu, 8 Aug 2024 12:36:52 +0000 Message-ID: <20240808123651.3741-1-Dhananjay.Ugwekar@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: CY4PEPF0000FCC0:EE_|IA0PR12MB7507:EE_ X-MS-Office365-Filtering-Correlation-Id: b2e356ee-844a-4fdd-884b-08dcb7a6e9a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: FvJbgUoRrcrLqitF18BHXg7GeZQCbgjZd8JW2Ca2XLKihSIEHv4tkemLypi2e1UrKmNeHvCHW3SLNH95PE++nc0avTmzxUnJiih1n4MAcEtOxfbZOMtXRMMqPe0yEr9jyHUhg+p5WVk7My/WNH69NvgH9wf1NAwaWdAOlC8aZPw/5T5asb4Hr+Pn1hdj9t8bH/4HAa9ZxTcxl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L9o3jivks2w5I9om0iyj1ZRShkK3r7UC0stwW3lZz6bKEY2aYMqgGv/k4vO0W7pI6VoABU5m9bM4/VWS6nWDF6VXndx4oY6y+ZatQGiTrCwHkOCpUaJW8koz5WpRIjIS1hWii3CVTKbGhflLUtJma/gnmh9vVpGIZSYJPVd1Flcf2SG2ddl3HxwP0sQ9U3KIsoK6jWD8BDhpmz1 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)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2024 12:37:49.0704 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2e356ee-844a-4fdd-884b-08dcb7a6e9a9 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: CY4PEPF0000FCC0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7507 Fix the reference counting of cpufreq_policy object in amd_pstate_update() function by adding the missing cpufreq_cpu_put(). Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current frequency value") Signed-off-by: Dhananjay Ugwekar Reviewed-by: Perry Yuan --- drivers/cpufreq/amd-pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 804fab4ebb26..36edae40db1a 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, amd_pstate_update_perf(cpudata, min_perf, des_perf, max_perf, fast_switch); + + cpufreq_cpu_put(policy); } static int amd_pstate_verify(struct cpufreq_policy_data *policy)