From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383227; b=E+R6vwKnyIkQ39lIuqNTGnDSbCjZGq7Kg0kLwbnKyIxtuk3FUbfD8bD6Stx7kM/Cotw+ li4hn8c52EGB8DEVfbHr5EFnF9RHkK8mDBcBbF0cg30b28TC5cUhWhmj0scEMBUQs1h7A u3h/tP5hL1r5XKwx32tLGSWR4RMUEwcVUef0CA4bp6qfeUPkCvavnX/j3JkV6qsljglL2 +1GIO4cRnfqUg8nIdw7eDOffFta/8Ir3vk9IuVp8VSUmE7TwFADY5KRntVmhQn8aUsL0w YclKSCD4uT5mnNhqaNTn6O5X7mxZMIbJ/BvwK94VYr/8GkQnfXJUbenVDm5j7IqUDgA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383227; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=DY2RuGJrfbBj1PSAQo/k80S5sh1O3/vv8Sdvk8XK11Y=; b=zMt+z1VBdJ4HX7MdnmFIoqrBcOUTK61R8KDPJzDBa2b7CLEXykUZYcg4WUZh3ZQ2sYY3 dqbMnx5eu/4R7tFAFmPVU66pW2Tw/Huy6oMICbZ0XlTWLMWvZUMc6hy43FLFaYgjIGawa hFOcXa/SmHRoynzvL7BXeqRhjFw+XZ9Qjod958pL6cQ2oEnSUULxeDN+whOp6Bkv9V5Jm ELfQYLRI5JMXStU1ax3bY3RzvnCqZW6r+VcbnT2Qz5acf0frf4kte03oBS/pT7CoFmB92 A1UbFG8sYhRgv4qCi6zPN4IdcpAVSW/JkJEL/UUiXWaJP1rXK8ailgSKfBTQb0uAWdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=VrG8+6r+; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20B42606A32F; Fri, 4 Dec 2026 11:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=VrG8+6r+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75ACF1F000CE; Fri, 4 Dec 2026 11:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383226; bh=DY2RuGJrfbBj1PSAQo/k80S5sh1O3/vv8Sdvk8XK11Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VrG8+6r+1EhzGOTByDCQDFvwbiPV9yArswgQt7F9Ex9og7k9w0CBisrUDWINZo5iM OfWPyN1m6BNOWyWjNUijh7KmloIKOLjDW9vSMVeyTNz5UC1aLAaLdGkMbqHNeHpa4l WqhmKqXMig+6KyH/2PVI3NSAircfKgmHMAB63K/c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Viresh Kumar , Sasha Levin Subject: [PATCH 6.12 095/555] cpufreq: Introduce policy->boost_supported flag Date: Fri, 4 Dec 2026 19:02:18 +0900 Message-ID: <20261204100610.876919402@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Viresh Kumar [ Upstream commit 1f7d1bab50e6ae517f8b6699e56d709d61ae13e5 ] It is possible to have a scenario where not all cpufreq policies support boost frequencies. And letting sysfs (or other parts of the kernel) enable boost feature for that policy isn't correct. Add a new flag, boost_supported, which will be set to true by the cpufreq core only if the freq table contains valid boost frequencies. Some cpufreq drivers though don't have boost frequencies in the freq-table, they can set this flag from their ->init() callbacks. Once all the drivers are updated to set the flag correctly, we can check it before enabling boost feature for a policy. Signed-off-by: Viresh Kumar Stable-dep-of: 75120f31aed0 ("cpufreq: Fix updates of cached resolved frequency and index") Signed-off-by: Sasha Levin --- drivers/cpufreq/freq_table.c | 4 ++++ include/linux/cpufreq.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 178e17009a16e..9db21ffc11979 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -367,6 +367,10 @@ int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy) if (ret) return ret; + /* Driver's may have set this field already */ + if (policy_has_boost_freq(policy)) + policy->boost_supported = true; + return set_freq_table_sorted(policy); } diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 5947659a4b9d4..0f83ae7871d1e 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -147,6 +147,9 @@ struct cpufreq_policy { /* Per policy boost enabled flag. */ bool boost_enabled; + /* Per policy boost supported flag. */ + bool boost_supported; + /* The policy has been suspended. */ bool suspended; -- 2.53.0