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=N/BC2tjGItZOLF9Mm9HyvyDnbRBUEWC7Yp+gHqDGWN+EkNC00GagyRjqt1u/nus6Ws+G a3MXhH/zMkphUmUfajRLvsvRrrl9MDor9FpVMcDEqtr3cgpq3erxhBg5iQb17pl27IhJD j1/LB3x2ZlT56tg9EuCanvJjOLLxhungKRU1ywZeKW/u86UGewAUBaJFn/9scWGYuQAbE BEIN5eT0FCLnMy6CRaPwcZFKOeSzG+/5IMKm3SZR2Dbc8yr8gQbnI/TiYTHwyIEzXJ73T MjX9HIRLzA3AwcJjt/GF+vAZJa4RSLgSyCu5AmdHwAnTD9pbNacebGptupFf7jlJEEg== 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-Forwarded-Encrypted: 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=ZUW5DhdlYUsASJU2yuF/Ori0GoVZf1P296nYRTIzY1sGweyhU1Qkt0DYVPIYmfDt3Yik pXnYD7f/WJ3zq/GTlCLAXTQjWNCHzAS6mSBD1o2NhsniFQBqOJdAkQZ52FhZ2DBS9671i 23DMIyvC6znmIhXGDS5nGnwlE4Cpj1UqthpMY//CWzkm5O5MUmwf7fPbqYQeSAFVL9pC3 p9fwHro0LdOXgjJ6b/8nUZu++byq4T92AyjAhNbz6Y/RDj0jZp2gsh9omDt0dQCXX9BbO fGYrOsFmO6sz1aez3rNeFfg/Skfz3x+5JB4xBw6aXdjYZtoYJvEmvPCG0WpWp/ZFVPQ== 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=NwINI3Iq; 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 2BC66606A32C for ; Thu, 3 Dec 2026 10:13:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2BC66606A32C 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=NwINI3Iq 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 6B36ka251388678 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 4jb3f28v7x-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-cdebc913d7cso5135318a12.1 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=1796292827; x=1796897627; 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=NwINI3Iql0ZiJeUZ7XU4AwR8FiMASkzh22kLBAtWhnGFRdT/qiHsZrTbwwSrLbaUNU Lg6UfpWklycUB7vDoTh6FLwYW8R25LK3jlh1x0FsdC5kgH7Tob7qdWyAHfjo3K611JuC 2YBLbfnKVw8fKP+8VrOGSjtJ9+FxtF9bFI7QAI0uLM2pCBK3riIpVLm7SY9qD5UoBucg GQE2wjkRy6nIQDBbGkMo0n8x20OcCpd2OvAK0LHnneELBqm3q29y2e2ndE20T4dXlcVL CYixfmwykd0ag7GnWMu3DSIXHEaJoeD/wixZyV1QQtZXtv0iQwSdXDDO4aHnEAN2Y4bf u1XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796292827; x=1796897627; 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=xUvfqBHp2F7NE3BnBGaec1wa5yo+sEIToqlq9C2hDA/Dy4GTDv/wQEczoDohPtqCnK kKiesRx7eyKQGFNRoKFN12WauPsFJMMERWUjDjFsoJ+iipYV0DBejnbWCiI0nk0cTH1c yfOkrLFFxi8Qdm7sfrABbsgHivbqjm0R+Zo1jBAl5LeqcMrW4hsH3ZIgfLFcEiowl2HH ZEPnS7YSdiahDL1NpwtEO1izinS5H+ozF8s8cu1Oh40/Tolsbiwp9YU5L6hYA9Qr93zb B4D90BkrNOa8F9K5B+k1ffd5n5ikq8fiDj4lOhx1WLp7XGdodYAeqNIZvu5a+lkxzUfo EBjQ== X-Forwarded-Encrypted: i=1; AL+hErFTie0cis6kihh8rDb4TJr70ytvwMhUuDkCt6+MgAqYVYNzoixxB5nIAQNgIQk1kSoCgvLZqP7oDcC7fBw=@vger.kernel.org X-Gm-Message-State: APuU4Z9tTJtoExjRO/f+Z/RJMI7mfJ45eRBpC/rx8MER0+ak2OPfYsji jjIi+sATWHuKZ7Lf1/J/kJ7x/VXe2smUvQQXbHuzEYEDAqZFKqd4h8AoVks/oN7cW6SaeajQYZH o1FD1QrUdCc56BADvHjqQXCP2/FTBF8BLZPQus3hKSdLDFWvWi4varvP3L6hVyAr1N2A= X-Gm-Gg: AZFdTZfpxw4p73sdDXydoOafWw2T/e4eGvFCx0gi/knhmzywKhgnHMXIOHxGKF6ls7D lmXzli2biMx3FbexlMBWGdHY6eAfmkex7B/xEjGBjbiaRxl02XWNfo+sBY6y2+uDBRhEAVzgZ0T niHX7nA5s7TwWxxezU/Vobm1mP+glqtxKrvQVi6i5SmXRYr19FEyfGKcUIsyuI93I4gyTLBku1o 7G2M30/J0U71yh7nVqHIORnE488htrDUYlTSG9hTJeyitXl5BWur1g4SMMSJ3S4aM0ClI5rqr8D w/PbFGxWO85833tXLbhFg09TzUYPKpwv3keMgfoFW0n6T5vcrJP0/BlFbAJFPLgSkaQsmWzIBwe xY2w7J/rtT85cBHRxjL6mfLkYrSAKBsXSc/YTyEvn9VKD00usehG1lhlbnan7DIRQID8V01zkc6 SO4sgJEdVotBWZ+PBa7uAWKBs2DmXltDPNfs3aTlBuack= X-Received: by 2002:a17:903:22cf:b0:2f0:6055:33e8 with SMTP id d9443c01a7336-2f060553672mr367963815ad.64.1796292826548; 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-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, 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: AW1haW4tMjYxMjAzMDA0MCBTYWx0ZWRfXxW8HZSXXQlAh ez+CkQMgL1YMRp3frtGyuiusg4F8OikpkbTHXwNZTuoc83K+FrDDxsYuUlBU+MyQLxeov4/kLgM u8zHffYTSBcv20FFZZ1zqSelUaYYJXBuaWf08XafYx+TQHAPFS6umTYe46x80uexp5Z8fixev0f V1W6h6vNKcE0mKPc05gIdarWGOH8ZxUcpjaNG02RmWKidXUiDMGpZhCRTV1sHt46ylkWGsmpJO4 I7B28YVnta96ZPEx0ZT8st1Pu+cu+KgQj0aIzBTWpBULX5Q2bGLaOij9zdoynEm4RHcSbrVgzuX ykNXkwT6NnKP9h9kjvJLRcj5eVMCnrp0cKY600SxTiJDBS5bU4e6SvAY8r3ZUj3YimDRlD9bs4Y kSGGy85cpvgvh+m3CsGOhSDZIh6Zsgv3O/DXb0v3FEvZzgbeflKFO7GO0QZ0pgv/e+2bwvmyHq9 SnthrZwcc5zg0vx6oUA== X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDA0MCBTYWx0ZWRfX73m9cIk72RKa 2YB6rmv+9v0gQjDrxcL7UgkLb962QOSp/oC0LM5kBD1bvctPYQT5WKBpBLzikXL89LMF5YiYU9V W4AfMINsxuFpoEnAu5eFFDrFEy1E+j4= X-Proofpoint-ORIG-GUID: LZTcwDHbAsGN-YsUlfsumohpqQzgyw-7 X-Proofpoint-GUID: LZTcwDHbAsGN-YsUlfsumohpqQzgyw-7 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