From nobody Fri Dec 19 11:50:39 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3B8714A8E; Mon, 8 Dec 2025 10:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765191593; cv=none; b=mGPjKvd+FLlcJ5na30e5qM4b/UAe4OnTsqGyE52OM7JgrBp6yBM9hU/p1Av9Po1R1qeA3I5hTeuOoDtMORPekEF5+SPY0xS1HHDTrcnjwxiFgWmFhfd5Aud7zG6SMJ2e0NLn2vliIsxEAImi303a5LEK/JKjV2oiCvHokUHJWvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765191593; c=relaxed/simple; bh=FsB8Y8Hvs1X3OlpqQ37vcZpAElV+amsN8Ck2Zrldxto=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YVNsuP/O0CcUWcqain2MuKEbi9rIxg+mFJ0V4/wCDqz2inHavDWPNEg/gCALTSruTlC6QmoTvwmou6cgI4E7SPo8b5RHB7lqt9YbxZlOppa8o+Pizka0iMHvU4i6I8xn8Z/mmGfotpcYBkpcJU1hgdyyinAZjCBu7LCKbtSDUK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E14F21691; Mon, 8 Dec 2025 02:59:43 -0800 (PST) Received: from e135073.arm.com (unknown [10.57.88.207]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0A6C23F762; Mon, 8 Dec 2025 02:59:47 -0800 (PST) From: Pierre Gondois To: linux-kernel@vger.kernel.org Cc: Christian Loehle , Ionela Voinescu , zhenglifeng1@huawei.com, Jie Zhan , Pierre Gondois , Huang Rui , "Gautham R. Shenoy" , Mario Limonciello , Perry Yuan , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 2/3] cpufreq: Centralize boost freq QoS requests Date: Mon, 8 Dec 2025 11:59:27 +0100 Message-ID: <20251208105933.1369125-3-pierre.gondois@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251208105933.1369125-1-pierre.gondois@arm.com> References: <20251208105933.1369125-1-pierre.gondois@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" policy_set_boost() calls the cpufreq set_boost callback. Update the newly added boost_freq_req request from there: - whenever boost is toggled - to cover all possible paths Signed-off-by: Pierre Gondois --- drivers/cpufreq/cpufreq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 942416f2741b0..65ef0fa70c388 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -603,10 +603,18 @@ static int policy_set_boost(struct cpufreq_policy *po= licy, bool enable) policy->boost_enabled =3D enable; =20 ret =3D cpufreq_driver->set_boost(policy, enable); - if (ret) + if (ret) { policy->boost_enabled =3D !policy->boost_enabled; + return ret; + } =20 - return ret; + ret =3D freq_qos_update_request(policy->boost_freq_req, policy->cpuinfo.m= ax_freq); + if (ret < 0) { + policy->boost_enabled =3D !policy->boost_enabled; + return ret; + } + + return 0; } =20 static ssize_t store_local_boost(struct cpufreq_policy *policy, --=20 2.43.0