From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796292828; b=Y6z3DWvRW+YXnAzeT5BSIFrGbYzJ3N2KMXHUR2UrCvDFQNhhCmhBNesOlOfzK2xMHF6Z E6QSogEcoplnccle1SVVI9irDTBfg/dcSgk8ngCJud53sixGdCvlKBexTZR6Ge0xMYkpN S+nL89DoK0e1G8dm+FKee2LceUfRa8/ouUFP/e1YQzdMmqlfDEI2O8Fi7Z6QpYNbGa1Dv BKwn0cwVey5twrm+n8XzjBmr5Su7vlrGDd+aNgOrwa0zGWdh+C2r8v9vS+oT6/kCA/BJs nCaFM8ixb1dhnyzw5HIkOAwVJAZAFG+HB3VkPH8uGK547/4T0knJSjiCvWQHoA/R4UQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796292828; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:X-Received:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Authority-Analysis:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=llL2K4Fd+iYr2stliqU4I13ne2AgqCD1ZyYFGoNaLQc=; b=jU1VkwU9I4KKmpZYLW/HSVx3uM8zknzDVSMmc/mSd5lE54Yw4WgdO2rmCnqHGVlSryAi MiUSZRW7yohT9Mi8fBUkRyx57ThYmvnbIU8l7brK1xJPj6E0Kx07tOiC8IUFOcVxH8G+1 9MpTu6qZJWlTPuoM7GfDcb64lnxN6CSKBTK3fjv7JBTgTDnb1jTH3Xzm4HhiZ8z4r5aJm LeK1NesG6CJqUyr7TQkcuXOsIxZXvJL6Sh5YI++rst45QG8xEydmyzEHMs1I/T6rSvSXA 7ytgjzhNmE4gDOq1YFLE/COe0Q7i33FysEWE43T16bzHE6i2lYvK3O7K+Fld2lAKD0A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b="fG/CzSco"; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=ULdBAdyz; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1610C606A322 for ; Thu, 3 Dec 2026 10:13:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1610C606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=fG/CzSco; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=ULdBAdyz Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B36kbUJ1388703 for ; Thu, 3 Dec 2026 10:13:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= llL2K4Fd+iYr2stliqU4I13ne2AgqCD1ZyYFGoNaLQc=; b=fG/CzScobhmm73gG R90Dbt9KzhBwOW8BJaH8ZPdXf2vYtGc0AdoA75KSeH1k65Iq7jzFbmmQbpSVyRCk J5IVfOCPPRzfk/lgZPmv+eusOokbpNI5YGGzLdyFNFduTzsxONLZi5aEWkZi5UJP wvtgPmRE1L7zlnn7t9wmKfx0m7oORanxGEJ8LD8NJ5KwlqkWJzaYYfI/kIhSV0ul 6asckEb9iourZFC8/nm1J+pkXJG3zLt6EM2BDLwtUTKY/T7bNur1YC8tVJH3UaF/ c1jw3OsLwd9fLNsXI7eiXDGIHLePrwpeMQEzBmcIxR1ur1oiKmJeoY0cBVHELicE kvlSHA== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jb3f28v7w-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 03 Dec 2026 10:13:47 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-cde6bb2c56dso7647990a12.0 for ; Thu, 03 Dec 2026 02:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796292826; x=1796897626; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=llL2K4Fd+iYr2stliqU4I13ne2AgqCD1ZyYFGoNaLQc=; b=ULdBAdyzZmLlNwITrhBSeQBNsKU+wpVc7nLH2T99u8OqYalOtlECRVkfyZqMFvLU55 ybQ+k4s3pCGrvJswSuM6pKVL77koJ2FYrLkbjwvIwEkTWzpeSoUWvSFsS/J1XGzjyFoi UwUVErtrpWlRCbO/7wiWxkDM9WPYncK/45YKBIR1ydcqGzmA2qj4WRNjkQ1UnDTDZXY6 ZBRAme7dwGT4wV/RtyKu+mqbSiIO8HoaJjZe17IVqLVsgM71sVIDZSoZlTEDgR0HPbgV VpPC5nN8c2RNNp7fK340uYzyhziKJbZAJdDTB+ulI/Izqx1pYazP8/SMG/9PAy5DtN0s 513A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796292826; x=1796897626; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=llL2K4Fd+iYr2stliqU4I13ne2AgqCD1ZyYFGoNaLQc=; b=kNsbSFpk7PD3a8l+KeVRrBi+PlwjyfXnmRSZ6/3gU9LXy0QZup1YI2iqBy2adKirMy wS4/uCthbiu3Pp4ooaomyMn6rBj79ZCl+3W40JW4/yxxHO8joVFZmEFhCrAOMDPOJl0E QLkAJqPaD2HJ8IfnxTGWDPIwcN2uGjcylqI/jKlsOvpUEedRnED5VRK6obR9rsb8xW5A qRL2hc4ZAX6RLAAN1EfkDJQy3OfCJpWQWuo7W53416PaBX6YVRVogDetDzbsNhiF+bTq HdnL4+N6eYPztuD7V9qyvrefb8xxNbfRAbozEHoHkvzwPwCN/s4rMAZofAS8GoHoj/AG fHEw== X-Gm-Message-State: APuU4Z+E1ms0uE57SQDdylXREG2OznyDVGbbMXSMmZgLGr84ie8rn377 7XaSv6Yo17YpwgzmoqHeKY3UjVbNTESM0QZyvnvUr5+wJZUoe6IrRmfgKj2lnGfFL+rVWrdy+ao oQPY9qjtI87JjKUj99IC5LV8KcdlP1oL9yNyTMq7rY6CCFFbz4MtUZX6yx+WDKg== X-Gm-Gg: AZFdTZecar1eHDT+cBfosJs9LMyVwwiXKcem1x81VleJHVDCLdb16OFf+Kq5p4rw3Ra 3ffhlcjKUAA54BrV2EsfxeQpQ4dIPLbixK3o3CugX3ZrduzrKy6uhbX5GHsomvb3GxA5ktPEmXP 9FNhCrcF6TxtMjAb1fpc6gI6wDI+Mlc+jucaz2Ib1Fjad6DfOM5MoRIJW6CeVcHHimgYjbKz5vq qK04poW1UwidAq2U2y73iw1u7+R8whFlkJ0qJ5L/vwF4xTOE48LtyVNN52/uDJsUX+wbUjI7nW8 mezRmqPdWcD7MMW7speEBm4SDBlBeFAt8EhBucdwsvCoIJgCjWPVWXCleJqG8zc0imUPnybYrK3 pMcoo6c1lObq+5yxmFfOznf44jkqOnzYMgK+wqVrvLLZDITZUCv3rG4WQsVjzRwGvlQiTT22H3O 8lYUajs1iLs71LOmq82qdLncpQHv5j/awZh7kpkA735+Q= X-Received: by 2002:a17:903:22cf:b0:2f0:6055:33e8 with SMTP id d9443c01a7336-2f060553672mr367963805ad.64.1796292826545; Thu, 03 Dec 2026 02:13:46 -0800 (PST) X-Received: by 2002:a17:903:22cf:b0:2f0:6055:33e8 with SMTP id d9443c01a7336-2f060553672mr367963615ad.64.1796292825971; Thu, 03 Dec 2026 02:13:45 -0800 (PST) Received: from [10.133.33.245] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f04ed9620esm213964915ad.26.2026.12.03.02.13.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 02:13:45 -0800 (PST) Message-ID: <2ec0d77a-ca23-46d2-bc28-436762c3fb88@oss.qualcomm.com> Date: Thu, 3 Dec 2026 18:13:40 +0800 X-Mailing-List: linux-pm@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, christian.loehle@arm.com, ananthu.cv@oss.qualcomm.com, pierre.gondois@arm.com, zhangpengjie2@huawei.com, zhenglifeng1@huawei.com, zhanjie9@hisilicon.com, Zhongqiu Han References: <20261201023001.1131130-1-jiangtianfeng@linux.alibaba.com> <20261201023001.1131130-2-jiangtianfeng@linux.alibaba.com> Content-Language: en-US From: Zhongqiu Han In-Reply-To: <20261201023001.1131130-2-jiangtianfeng@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDA0MCBTYWx0ZWRfX1VqivvTFao2i zuQeSIROE7GsDSm1jot5gq1sMd5FKn9XBtL8dFyhC8uFRhArZLpYNep0X3TVOlg0dLrjD/taEJN mwiI+wS7qXhIFxhZuZf8phnKOrIYBIKFOOdpdAvMBVFGcwVLdJCMfN5ffGyFle2TpaSrTFiNA4p 5M1ZgMBPjnD7KxWd8Ep5W7DrIk1Qr5dAnJlgg6mnBBaF+tIQGZ2M6Qko/66N6VaViPwQKPMvH7o okZrWV3nwtTFW1r96g+7+lUrUdbOoFAxkfG8324hcQnA9BPVfOAwFushmifmKiiBgIC1hGUtHX/ ykTZvx8AO3g8OooB8SDGpjO9zKw059rwxYFKKABvjlWXgeRaq+LkEG+DDnPZ6QFSX5dB0flqbu1 QPujybfECIjZdCe+nhh4+IqMEgtilLAUKInH2pKvV9klrEGVnu2C3wrOQJs2uFqIgtvsSPY0Xcd kyfoVYt4f0HmPXfsw3g== X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDA0MCBTYWx0ZWRfX6P+ghj+sqRsL 2AyrRaCa2tkoY2eDrSqlcKwS6Wn+Tg0M5ZyISC5hI2/M4Silt6MTyf0lWO9LG9ahC673uU9+bR4 7+Xp/p6i3aRfT/37uQ1/ngTcPIE4d60= X-Proofpoint-ORIG-GUID: tiahrJC49DL2a0kCFK3WnxioF1Q5QUMx X-Proofpoint-GUID: tiahrJC49DL2a0kCFK3WnxioF1Q5QUMx X-Authority-Analysis: v=2.4 cv=QYPzLcbv c=1 sm=1 tr=0 ts=6b1140db cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=i0EeH86SAAAA:8 a=SRrdq9N9AAAA:8 a=EUspDBNiAAAA:8 a=b43NIY8U4yL6dscd7ngA:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-03_02,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612030040 On 12/1/2026 10:30 AM, 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 Reviewed-by: Zhongqiu Han > --- > 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); > -- Thx and BRs, Zhongqiu Han