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=1796387303; b=HBDhwfqVwJxwkebWHO7/dlnubnqHGXBIdRZc4AtW+CnyUrhm7s9+ndF+dcX61M36hZQZ xt5oJoR/zBh4WGfLoCAUdwhd+SN3lSHGD2dSR8O8dWKWXld863DgDGBtKmmuG35LwBcoP 5t0Ohs/Fl4PvlcSxi6YjRijE4ZBfnoinR8ftEsaq6zFc5jt661TkAzJw7A7OxaZ5B+ht6 JUne9nqChj61qg1JNpYGq3Z8DaGnTX3wqUy7PEs4PGiOZbX3NVxCheNj9iR5m1Hx8rthN OoLSFs8PAx3ZRpVOSpA6lQKNuvU6dgbe0xmgNSIH5Zeje9DcRkPtADNlqki1FN+QGxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387303; 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=y4LzRpvO2W+Pu9+HHkyntG2y4s+Jtvmav6cFg1p5BYg=; b=yvkNPD+earnRF79Qd5fl+Mj/kkbJVQm9s5xvOdEW+RS8q04drFUwIYwEcUEOTADeh6j9 2Lh75KweiEMq98X1inBbhb9WzHufQe5k4xyEe1t1k8rX5aQFq15R31gFDCARVP+5pXKMz PHwtvBRiAE7R3i5ANfG/hQXdKLsVpLUzrP1Nu/LKmHx0x8w5wQ0cJJKNEd3KsZwqQnKe/ U+SM4cCsMFzEwn8tMpzCpZMsPiESMPm4yO2owLGx4rlSlIeoI6YJavw4AB2nMrIxazXge R5GX+lo50n6vWVgoxaeQAfmRtgtU5mpF1fcxpgdYQUR4vfg7HGUrv5sJrXSnGOtnn0w== 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=WLWJ0vvg; 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 6B931606A322; Fri, 4 Dec 2026 12:28:23 +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=WLWJ0vvg Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5AD21F00897; Fri, 4 Dec 2026 12:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387303; bh=y4LzRpvO2W+Pu9+HHkyntG2y4s+Jtvmav6cFg1p5BYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WLWJ0vvgyXy/FW+5tgWLPtoenzerSVyCqMaRgSu+QSbcyZ+94iTRChL5wJ64Njb6M Av24kbLPLFJ8vq0LHbeCxMma/pryNjhTmnudZfPGS62GzApHuPpSDplMo2effSWifM YH3vH9zP3peYFXryDrlaqT6cyd7gonLOAogB1qUc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lifeng Zheng , Viresh Kumar , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 6.1 0149/1059] cpufreq: Force sync policy boost with global boost on sysfs update Date: Fri, 4 Dec 2026 18:54:40 +0900 Message-ID: <20261204100648.072559498@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Viresh Kumar [ Upstream commit 121baab7b88ed865532dadb7ef1aee6e2bea86f5 ] If the global boost flag is enabled and policy boost flag is disabled, a call to `cpufreq_boost_trigger_state(true)` must enable the policy's boost state. The current code misses that because of an optimization. Fix it. Suggested-by: Lifeng Zheng Reviewed-by: Lifeng Zheng Signed-off-by: Viresh Kumar Link: https://patch.msgid.link/852ff11c589e6300730d207baac195b2d9d8b95f.1745511526.git.viresh.kumar@linaro.org Signed-off-by: Rafael J. Wysocki Stable-dep-of: 3d5720dff09f ("cpufreq: Serialize global boost updates") Signed-off-by: Sasha Levin --- drivers/cpufreq/cpufreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2746,8 +2746,10 @@ int cpufreq_boost_trigger_state(int stat unsigned long flags; int ret = 0; - if (cpufreq_driver->boost_enabled == state) - return 0; + /* + * Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to + * make sure all policies are in sync with global boost flag. + */ write_lock_irqsave(&cpufreq_driver_lock, flags); cpufreq_driver->boost_enabled = state;