From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7974E27A935; Tue, 27 May 2025 17:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748366993; cv=none; b=u5nIxWNF79jNHNXwthfdK2XSt7VxCVJ7DmtNDvlYe13VRu+R1xiEiSxcA8/VWyaY5/ODnHMLj3vqGMP0igUCm9HXQdyybbp5swIxxgySTCWznofAWujeqR69X7l1yDx3Cf4HAYt4zHgMGdhOHcVinuW8VNaBX9SdMiRG7IVcsmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748366993; c=relaxed/simple; bh=wAScx7CVPSmiVeNL0EXwHR6RlihjTOxTqaOEVhei0AE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QNwtzIPCAQeT13vr7wsX/I/EgLschgwcDc/Kv4MPW5p1ysofEpxE46pVxw+sOMS1mSqftA3wjHom1Qgl0fftg7IWm4WgVis0KhoPOGOZsRqmno4jhFh2gIM6XGV4ZYFgIFO2YHfrYuI9sWohtgf68D4YwY9LgVPeYey+0mBy1is= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WCAslPC1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WCAslPC1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0602DC4CEE9; Tue, 27 May 2025 17:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748366993; bh=wAScx7CVPSmiVeNL0EXwHR6RlihjTOxTqaOEVhei0AE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WCAslPC1TGhNFrOV7y8Tg7jR/1YXYWL1Y0KHOeIv9goD6p/Bcwt4ufST89IWFDy9o fYEnmFKupst09GDZI/Kartyp9Shvw9rdx6Qql1szHtsGU7hJ2ZFhI63zBiwhaPtwyX eVWBuJ4b/x4PZNyR1w3OE8P1HkC3zdItgDVJ1/rw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sumit Gupta , Thierry Reding , Aaron Kling , Viresh Kumar , Sasha Levin Subject: [PATCH 6.14 243/783] cpufreq: tegra186: Share policy per cluster Date: Tue, 27 May 2025 18:20:40 +0200 Message-ID: <20250527162523.005285225@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aaron Kling [ Upstream commit be4ae8c19492cd6d5de61ccb34ffb3f5ede5eec8 ] This functionally brings tegra186 in line with tegra210 and tegra194, sharing a cpufreq policy between all cores in a cluster. Reviewed-by: Sumit Gupta Acked-by: Thierry Reding Signed-off-by: Aaron Kling Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/tegra186-cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index c7761eb99f3cc..92aa50f016660 100644 --- a/drivers/cpufreq/tegra186-cpufreq.c +++ b/drivers/cpufreq/tegra186-cpufreq.c @@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy) { struct tegra186_cpufreq_data *data = cpufreq_get_driver_data(); unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id; + u32 cpu; policy->freq_table = data->clusters[cluster].table; policy->cpuinfo.transition_latency = 300 * 1000; policy->driver_data = NULL; + /* set same policy for all cpus in a cluster */ + for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) { + if (data->cpus[cpu].bpmp_cluster_id == cluster) + cpumask_set_cpu(cpu, policy->cpus); + } + return 0; } -- 2.39.5