From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEF6130C156 for ; Wed, 5 Aug 2026 04:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785905558; cv=none; b=rYSiBM+87GYeD11IaSCrFQ/Im9rMmUrB6d8Lyr7RMRxfTRs6ICPBwjBE1e+aR2Ky9wx6nAqflRZFLfJd3ePVFAOORNUdKcLM6Csc3/alDq1/s9mSOcoUXvQCbXsMx07Svno+F4nS7OPn/wq90usgqdMHfZaZdY3+nfjAIhRHas0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785905558; c=relaxed/simple; bh=1JtHhocoebZrFTJvALnvfNyMzljsrMzzzAnR9dePObY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IyLI76nzETcPyUAciq7CNUu4mhdMOABG78lKKtFpQ7AWoK4YemcafjXVtr5+E6hyWyPU5qza0rMgQE8Le34O367XRVOHtJELM7WZmVkcsS+/HsXFg40o1oD0/YxNgdpIgBLHEk3mQDIZVo8Wp2z3v0KP1Uu4WfdkJdkie+RJqLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=mm6NVZEx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hXPVIOJA; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.b="mm6NVZEx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hXPVIOJA" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6752bGgI1524370 for ; Wed, 5 Aug 2026 04:52:35 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= Hy3gD/hWNpj5QmMEer9j4z3dhHyI6Fp27IAWNLW3gwg=; b=mm6NVZExLyiYM3HA OxUB9LbBVxc5bLF41vlaWFWfUVpdXNqfEI8fZwayGWQnSWH2AZpwMhCNCqUQL3nj +uAW+efqLKqU/4zzoJkEHIigu2wAD/ZDieB2kWMcIZyuFFvp6hqfIYdLi+GhzUs6 T+HdnX8OMnA0QpvjMAb8ydHaTMg0feiwhcY0paXE30dRiBgBMMzslutEGN9dQBEK wVBgqQrB2lgjMfgoi41r5yyWU3OewSfxS98siIhgjL4lQIg0bth+D+P1XThBkXq1 gvXD+clWyffFZurqo8km5SKCKIE+znp11mr32WmX+m5g39BLioe6w+iNmSJzuBJf mm+eqQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fum3ntma4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 05 Aug 2026 04:52:35 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-38f283baf1fso564527a91.3 for ; Tue, 04 Aug 2026 21:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785905554; x=1786510354; 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=Hy3gD/hWNpj5QmMEer9j4z3dhHyI6Fp27IAWNLW3gwg=; b=hXPVIOJAkPWjEllXUqTZMYQPr/x8ZGrWgYuz6xH6q8K+j551jP/zvDAc/zNhZZbwkP O4eucvnb4KA5vNbjEomayF9UBR20V55lkAr10eNnzhzwf+cw4rnw3pXtAvZjvBKF+qTW mkNZjhvX8KI5/p+GoWGgkmm7KSnzcNxbKuHE9LwJtQ+Wu+MoD8z8jDO2cNn6VK3aM0M5 Vl+pEnr8EXl+GrBKHya/Pjyd5vLfMU5VnQ1KvjMxJmfcI6pqyI5cZUAzOqbfbwK9byO1 rhq/4MdTMj8lcX1h1Wo05eeTXOPc1UlP6YO8/iywDfNMzyFov/Ut+eLOy6p1cIKJ5CX5 8qsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785905554; x=1786510354; 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=Hy3gD/hWNpj5QmMEer9j4z3dhHyI6Fp27IAWNLW3gwg=; b=IAXDs/RsU0Q5FDq364tlgmPGhe/nLC0ZOPPSAaSEFFpmw1PLwLS8nnFmntZZFu4vKd VNmYPaT6geeGUB8cyI5gEE1Ndb4qqL/QiOZY2jT9vKeZWiYI+S0n5i3oOsG1Gc+/nwg0 W8IboC9lyk1jmWFp0EbdOyQyTCpo7vEZFWVTx/jKtziTFBSevQt24pBp42l7A19VNGh5 24NXs7USLEqc+WDr4u0MwRmOdNV6GUaQsKgqPly+KPcYi313Rkk0FDfYwg2Ek/bpVdnW FhoJNcriFdO9Z8AYcqEzzhpabtLLddlH9w/5ufnS8Jc+NrnF3MCdGJXUgsUAb0Ez9/mv WCNQ== X-Forwarded-Encrypted: i=1; AHgh+RrBXR8sD0PuyPgoWbFVLC+8LWA1gQ6rVMs4gDOEinik4f4yHBZuijPqoDVl3MyC5nyd/MBoQWzlAWH712A=@vger.kernel.org X-Gm-Message-State: AOJu0Yxu6goHgCb7SvOeHeBPtLqBZI2PE3A4zbfw8utIV+1dlO44h5Uz nF9LmpUu9CJuguTBbZBKHvKV+JxrngkAGaTFUe4Gbem0WgudxHbJuoECjvecDdGqvnPCKWSGUGM +mX70e/Z0X1ogU6mqLH4yeAAtvTWhwi6JeAwgGDf8KVNjkrbVPBRQo3fmJ+zbGNbOTcg= X-Gm-Gg: AR+sD105/g8eyuY0Pnd1Ow9Q4EeTdzlGjl/UT0JyQrtSwM92kYTKgc9ZZMgv3JBzRjc H/S06oHykwKvIYw+wvzrsSuDDX8rRVJF8tuvptLxxEOMtDj30ud0CVFc7R7g9l/k+l1xHZnuQqp KiXdLJwQAwfLjEkCAm/26/l40wkBYmqNt0Wj87R5kSN0gqAua4b4AaOxYxZv/jWrpDIicdWaWzB ZEqFYoHJNnghc/lBCQJ8vRlweU8LOzzyFnkJ18YF/QlL6Gc0HozXawHUyA3XUApz1POoHjUwVBy JcMmoZZZejS2NzhlSfSfI0abCF3PnM73VOFebL/oweSRTLzfU7F89wBkbWfTDZycawY154HCWWt p/AsZSIjmkWz87GHqghFbXG6LtRCwvhfoWL6qBQYiLCaiwJjwYRMGm3r8gN6vRkLLTg== X-Received: by 2002:a17:90b:1e53:b0:37f:a915:1c29 with SMTP id 98e67ed59e1d1-3903c5f34c9mr3217748a91.19.1785905554176; Tue, 04 Aug 2026 21:52:34 -0700 (PDT) X-Received: by 2002:a17:90b:1e53:b0:37f:a915:1c29 with SMTP id 98e67ed59e1d1-3903c5f34c9mr3217722a91.19.1785905553703; Tue, 04 Aug 2026 21:52:33 -0700 (PDT) Received: from [10.133.33.161] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-390392aef87sm1652224a91.13.2026.08.04.21.52.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Aug 2026 21:52:32 -0700 (PDT) Message-ID: <1dc44e5e-7787-47f7-938f-1ac0676d96d2@oss.qualcomm.com> Date: Wed, 5 Aug 2026 12:52:26 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] clk: qcom: ipq-cmn-pll: keep the CMN block bus clocks enabled To: Stanislaw Pal Cc: Bjorn Andersson , Stephen Boyd , Michael Turquette , Mieczyslaw Nalewaj , Brian Masney , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <8af46926-fecc-4396-973e-2290ae285998@oss.qualcomm.com> <20260804115817.16886-1-kuncy7@gmail.com> Content-Language: en-US From: Jie Luo In-Reply-To: <20260804115817.16886-1-kuncy7@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA1MDAzNCBTYWx0ZWRfXzsBoY3FJvRZt X0lSY3Us739zZwVY9pC3ixKTwdiot5rM3NwZgIBhKUJceO7lfRGjI/Aq9zBwCpG6duckfO3d9jH vz7kwa/djS3MAxrbijqiTUoInx8yRhOEbHNwtfq+x3UVK53FlsIYv3s6Q9EL5a0dPHeNF8K0GUn 5k9pl5I4755d4h2dqLKJniFBb+hyKZSsuZ4KwMP88Fc3KVxWZ5TgHqKaFQfiAyBGk2NcQE4O4qz svWkRtnxEi5htpmiygK5w0a/TTYzN4fpPqafCOuUchtg/o7bdh5d6aUwyWqVF1Za+WCjCDFRzUd cZbc3lJhvOsl9ErbutltVziLYTAUDGgAtLd+8h+0+jZzbA4XMmkpgBM0EEUmFbCxaLVBzQE/KTa jA9MifvhXIdgSu1g9X6bDtTbUjc7TeWGvit9dV/hHMS17vF3CTFL5N8uVH53R8U3ZubUZdX6n+D 3wQrBI/ryKaLu4aqMyA== X-Authority-Analysis: v=2.4 cv=AZqB2XXG c=1 sm=1 tr=0 ts=6a72c193 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=BeYBAa9Oa5wRmjjIsxoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: 4wyM650f_91MYM57Cnwn3o7iLszPJBSF X-Proofpoint-Spam-Info: AW1haW4tMjYwODA1MDAzNCBTYWx0ZWRfX7VbGaTIbxzgB 4j+QoWabMuBAeIdvjsGN5MYVZbh+S5T9TWiRr2lAuWUZWQX9NJOQPQ/WinyWkch0u5qkJEJk1Zj v5Y5H2LDMQNn+NDsuLbDj+GbiinVAuQ= X-Proofpoint-GUID: 4wyM650f_91MYM57Cnwn3o7iLszPJBSF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-05_01,2026-08-04_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 spamscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608050034 On 8/4/2026 7:58 PM, Stanislaw Pal wrote: > On 8/4/2026 Jie Luo wrote: >> The CMN PLL output clocks do not depend on the AHB or SYS clocks. They >> continue to operate correctly at the fixed rates even when the AHB >> and SYS clocks are disabled. Therefore, once the CMN PLL module is >> loaded, its output clocks are expected to operate at the correct >> frequencies. >> >> The downstream consumer is used to keep the AHB and SYS clocks enabled, >> allowing the CMN PLL registers to be accessed. > > Agreed on both points, and they match what I measured: with the bus > clocks gated the PLL outputs keep running (ethernet and wifi stay > clocked), only register access dies. > > But I think these two points together are exactly the argument for the > patch. The register accesses do not stop when there is no consumer: the > CCF invokes the driver's ops regardless. clk_cmn_pll_recalc_rate() does > two regmap_read()s and runs on any clk_get_rate() of the PLL and on > every debugfs clk_summary read - the latter user-triggerable at an > arbitrary time. clk_cmn_pll_set_rate() likewise accesses registers > whenever a rate is set. On IPQ5018, where no DT consumer exists at all, > every one of those calls after probe touches the block with AHB/SYS > gated, and that is the measured hang - the boards died during boot with > no userspace involved, so an in-kernel path hits it too. > > And note the consumer mechanism only guarantees access "while the > consumer is active": on the SoCs that do have a DT consumer, a > runtime-suspended consumer plus a clk_summary read is the same > access-with-gated-clocks situation, just harder to hit. So having the > provider hold the reference for as long as it can be asked to service > clk ops - i.e. while bound - seems like the robust shape regardless of > platform. > > I have just posted v2 which does exactly that, in a cleaner form: > devm_pm_runtime_get_noresume() in probe, so the reference is dropped > automatically on unbind and the existing put in the error path stays > untouched. Is there any use case that requires accessing the CMN PLL registers when no downstream consumer is active? If not, I don’t think a fix is needed here. As you may have observed, debugfs clk_summary can still display the clock rate correctly even when there is no downstream consumer and the AHB and SYS clocks are disabled. > > Thanks, > Stanislaw