From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796229288; b=p2X0p0paQhI7codg8R07Txtnd3gAh+U7xZOY6k51mEK+kYYmb3YVnC3uftgIZRmJPb0C ceOA55K1gwwVoBwwMBcrbkYriWnHxGQAVPvI+5jiEMINOQXKjeQJaPPTlWeTHR2cZCpKd gMFDsulF6EbEo1mmqwunR9n+XKAZZOkEkoNK3QKf4ftRd85UL9X0PgkurnT0KlS/6eflm MOg771GPdWWVtW6NdYJiAPaGSbsTa6+41AoA0FBHQFPgAr4LiVbkCfnrA2kFTsimR03Ul 2LYS+JrP3Dd1fc1QBWYoKRnPYCjRt4+NWYxQ0hLLxsbw7Nvl2dvT7S0j8XhSF5OF1OQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796229288; h=DMARC-Filter:Received:Received:DKIM-Signature:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=zhZ2j1OT5tHx+ibo5p76ZrG0jvNoLNYY8cRnF3k679I=; b=y9uEye+QSMGqZXWM/r0FrMqGXS+CRW5xoFwxvOTiUi9CJzRTFCwrZQ79L36wQbKiAyqD sOLcZ3BYlgkmJtB+0rkMVL4xUot5h0grB0ujptYq2+uWGavlqj/mW//icFQUn6cyYA03i F2yPe/5H+crJlIuKUBzTNS3wlRE4ds787hXECEdk6Xtn6YgkU90O4GxW2Y9p/ImPhtHkZ WGFp/zmA1q3Zt/qROtt+c8N94kuHItO08pgUgj4Pc5kd55HT+FixAkLrXV5ZVU9CT4ynl X+/scxfvvt6OlhTumhF+ALz3ZcigbWv9CzsMauuwouKOQSMXR2CkodhKROOKGbtB4dQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=tiFYyfDJ; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51FAA606A32F; Wed, 2 Dec 2026 16:34:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 51FAA606A32F 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=tiFYyfDJ 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 4265D1570; Wed, 2 Dec 2026 08:34:43 -0800 (PST) Received: from [10.0.130.226] (e127648.arm.com [10.0.130.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B9F053F86F; Wed, 2 Dec 2026 08:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796229286; bh=YYtv30HArpNbKEEIWd2HwfhvDFj9wCU/KpXYdcawVl4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tiFYyfDJLhujCp8IFjEMjonvRJajghaj0qZgZyCfLfCBH6cg3RccvPcvHiqFQ1XyO IVWbL/vHi8JGmk/83ocpEV9xd5cu1QUccN9P6s54Hp8wVuXawG4gB3Lq0zeG2mK8GE cd1sf+3nBvip+gRIQQuZDc3WtEV1b24NQcmOKbns= Message-ID: <9eae9067-4dfa-4d2e-a5c8-c6d5a6ac989a@arm.com> Date: Wed, 2 Dec 2026 16:34:41 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] cpufreq: Allow global boost updates without active capable policies To: Jiangtian Feng , rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, zhongqiu.han@oss.qualcomm.com, ananthu.cv@oss.qualcomm.com, pierre.gondois@arm.com, zhangpengjie2@huawei.com, zhenglifeng1@huawei.com, zhanjie9@hisilicon.com References: <20261201023001.1131130-1-jiangtianfeng@linux.alibaba.com> <20261201023001.1131130-2-jiangtianfeng@linux.alibaba.com> From: Christian Loehle Content-Language: en-US In-Reply-To: <20261201023001.1131130-2-jiangtianfeng@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/1/26 02:30, Jiangtian Feng wrote: > Global boost grants permission to use boost; it does not require boost to > be active on every policy. Saving that permission should not depend on at > least one boost-capable policy being active when the global knob is > written. > > Since commit 77cf053b041f ("cpufreq: Return -EOPNOTSUPP if no policy > supports boost"), cpufreq_boost_trigger_state() returns -EOPNOTSUPP when > the active-policy loop has no boost-capable policy, and store_boost() maps > that error to -EINVAL for the global sysfs write. Besides rejecting an > otherwise valid preconfiguration, this prevents users from disabling boost > before a capable policy becomes active when a driver starts with boost > enabled by default. > > Initialize ret to 0 so the no-active-capable-policy case saves the > requested global state and returns success. Continue to call > policy_set_boost() for every active, boost-capable policy and preserve > all real callback failures. This intentionally changes the no-policy > result introduced by 77cf053b041f. > > Link: https://lore.kernel.org/all/467b9ef5-1fc3-4771-9895-363e815670c7@huawei.com/ > > Qoder, an AI coding assistant, helped analyze the default-enabled case, > review the active-policy/error semantics and draft this change and > description. Runtime hardware and hotplug behavior remain subject to > final review and validation. > > Signed-off-by: Jiangtian Feng > --- > drivers/cpufreq/cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 4332cb114070..e97838e40a54 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2887,7 +2887,7 @@ static int cpufreq_boost_trigger_state(int state) > struct cpufreq_policy *policy; > unsigned long flags; > bool boost_enabled; > - int ret = -EOPNOTSUPP; > + int ret = 0; > > guard(mutex)(&cpufreq_boost_mutex); > Reviewed-by: Christian Loehle