From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECD97C77B7A for ; Thu, 20 Apr 2023 08:28:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234038AbjDTI2Z (ORCPT ); Thu, 20 Apr 2023 04:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233960AbjDTI2Y (ORCPT ); Thu, 20 Apr 2023 04:28:24 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14E9D3AAF for ; Thu, 20 Apr 2023 01:28:22 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-63b4e5fdb1eso975476b3a.1 for ; Thu, 20 Apr 2023 01:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681979301; x=1684571301; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=zMHkc4ddxtiZDR/vOhmkpTYUjNc5FBHmkFEOL3O5eEI=; b=nY87j4ncBYV8Afs/V05HISSZlKNEMmYjThXCGm+F6KttBojRYQ5N5hQdAsjE1vBrc8 TGCt2pgjC8AXgYN62q8Dl4spXMAvwsYeklhz6EIP3kLFlZSjWECd6LX8Z7aIv9Yc3Ah8 ueiZwqaAFjLjT/Gk9a/0K0cItsTmGBsF768/AW7fPJsic0xufVWg5A7leHR7+QKdCTeL RzhWetGOAZK0qrq8qQD3SDqOYq+KBVqKtq6eYMSH8JNF/LKC9QjPB7lsSCE94hkLjNyI 5tWfcUtlNbN0y+0HjFb6a9f+YE9SDAOJo+7RaFPBcj+FrsAawSqShedRhiEYQBPsg84b dpUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681979301; x=1684571301; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zMHkc4ddxtiZDR/vOhmkpTYUjNc5FBHmkFEOL3O5eEI=; b=LNlpmCeS+JiZpQaCstjaVEjv8YNstidmrl8KWjovM59fgB1OYQfOqMHyXGMDkYx0Fg hnP8kcywpWdj8xWwcYgPCsv8r6rF7KIyldguS878UoU8kCePfj2cfOKDO/WbSp5Idhmh 23H5OVLSH/iugCw1cxsVDfW+dS+0vlvhYjzUnu/bmvZrggYCE6ULOMzQe+G6q93NoJoO IDT6cwHe/ByIZLKpspv/PM6m1JrlU4lipNXx9DcMYI4oaqzEORe9haZ8O3g6lhuxvNFJ Ayy+plqVKfYSSdEtONFdZ6xhgwHrOQlS4aORA5IiErnzdpEoA3hgCx743Luk3dC9xJuc xx2g== X-Gm-Message-State: AAQBX9eZtiAJkiHJTb+KL8s13ote+8feGGUAMeeORYz3pGHiqomMZ7SH kzqkOSSA+gedN1BGXOepNtmd X-Google-Smtp-Source: AKy350YfTe+XSl06gctWCjJwT+JzE2EjX7cwndeGei8fwbiqk9lB3+gCjl3ILwy6bQ1KDlmAM2Lplw== X-Received: by 2002:a05:6a20:734c:b0:ec:9d9c:4a05 with SMTP id v12-20020a056a20734c00b000ec9d9c4a05mr1371094pzc.13.1681979301536; Thu, 20 Apr 2023 01:28:21 -0700 (PDT) Received: from thinkpad ([117.207.29.62]) by smtp.gmail.com with ESMTPSA id m24-20020a62a218000000b0063d5fa9fb66sm712056pff.49.2023.04.20.01.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 01:28:21 -0700 (PDT) Date: Thu, 20 Apr 2023 13:58:11 +0530 From: Manivannan Sadhasivam To: Konrad Dybcio Cc: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: Re: [PATCH RFT v2 01/14] dt-bindings: clock: qcom,rpmcc: Add a way to enable unused clock cleanup Message-ID: <20230420082811.GA6308@thinkpad> References: <20230303-topic-rpmcc_sleep-v2-0-ae80a325fe94@linaro.org> <20230303-topic-rpmcc_sleep-v2-1-ae80a325fe94@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230303-topic-rpmcc_sleep-v2-1-ae80a325fe94@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Mar 08, 2023 at 10:35:17PM +0100, Konrad Dybcio wrote: > Disabling RPMCC clocks can be a bit touchy. If we can't guarantee all > (or at least most) of the oneline peripherals ask the interconnect > framework to keep their buses online and guarantee enough bandwidth, > we're relying on bootloader defaults to keep the said buses alive through > RPM requests and rate setting on RPM clocks. > > Without that in place, the RPM clocks are never enabled in the CCF, which > qualifies them to be cleaned up, since - as far as Linux is concerned - > nobody's using them and they're just wasting power. Doing so will end > tragically, as within miliseconds we'll get *some* access attempt on an > unlocked bus which will cause a platform crash. > > On the other hand, if we want to save power and put well-supported > platforms to sleep, we should be shutting off at least some of these > clocks (this time with a clear distinction of which ones are *actually* > not in use, coming from the interconnect driver). > > To differentiate between these two cases while not breaking older DTs, > introduce an opt-in property to correctly mark RPM clocks as enabled > after handoff (the initial max freq vote) and hence qualify them for the > common unused clock cleanup. > My 2 cents here... First, this property doesn't belong in DT at all as it is OS specific handling. This leaves us with the option of using a cmdline or module params for rmpcc. But we already have one (clk_ignore_unused), so the platforms making use of old DTB's should use that instead. And that get's rid of the debate that when you start disabling rpmcc clocks, old platforms will break. I don't see a valid point to keep the old platforms alive since their DTB (firmware) is broken already. So either they have to fix the DTB or use a cmdline option. - Mani > Signed-off-by: Konrad Dybcio > --- > Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml > index 2a95bf8664f9..386153f61971 100644 > --- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml > +++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.yaml > @@ -58,6 +58,12 @@ properties: > minItems: 1 > maxItems: 2 > > + qcom,clk-disable-unused: > + type: boolean > + description: > + Indicates whether unused RPM clocks can be shut down with the common > + unused clock cleanup. Requires a functional interconnect driver. > + > required: > - compatible > - '#clock-cells' > > -- > 2.39.2 > -- மணிவண்ணன் சதாசிவம்