Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8267023rwi; Tue, 25 Oct 2022 04:46:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5QyNq6aKznhBYh/QbokoOtUnQx6mITsnOgKQYvXKj51BMq8+hU0IwnP738H84ZL3i3K0DM X-Received: by 2002:a17:902:dac3:b0:186:a437:f4b8 with SMTP id q3-20020a170902dac300b00186a437f4b8mr10762781plx.70.1666698404745; Tue, 25 Oct 2022 04:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666698404; cv=none; d=google.com; s=arc-20160816; b=ZUza4nICJyGouVDD1jPEG9Z+novM4IIohRFDHecJZmVqWj0K8B14xT+SBqP1Dq7kHK 5/scSTvyqeGGjTymknZRC0gWMx97V0/L+q5XytQ56GFVA7Csen1TANk8rAR9S0gHJudG awZVMpes0PZ9qT5t1H6/ZXCaHMWbgXjJ7WUkDl2XP2ZsHHhQyT9EEKHBJqJb+WjBH8nA +aslBInzygy7yFMVa/sDwqZXjCTUO8ds3pIO4/RTb8n3dSBZxtKKqFvotVUpYncfYr5o ydvLfFHtLeng7s92hzniiDHKUXUQh6nM81kjEIqLs8O1vU2DjHxbsQqm5HmAswZfmfzM he0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ogvOahPNmhpggqBTZ5QbvTn84Q49yePxZeXFmnUqiLs=; b=uABA89ynZ23WcEmrt+ttZ4I22qTZWnaPNa6XhTxJTr5wx/lEapG3BFKMvXB2uj6Fjj Ewtys5RbhqWSVlSmM5olfH1AUb3shVS3XHwmr/2AFhWaAOtc8/ZXwIERZBbCIIXNDiOF w/yphGneDiTrywG3Z5FmdfCJqduv8OZglGGmsp+rP0dpFroZ7zIfMYXCCj+odjfgh6pK qV2oNCB+bTp/CZgI4iW8ZCjCglPGYM1ktKCgXphx1MSFChj2w70MMPxj44p/YJCeJFOh qVErSza1o07jYLSzh0dFtzrZethC/IAYNOrCtydhFP59ne3jViScd75wX73/GMQwgcWF Bbbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jutuwQxL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jf1-20020a170903268100b0017a0c17e47bsi2658516plb.78.2022.10.25.04.46.32; Tue, 25 Oct 2022 04:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jutuwQxL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiJYLYc (ORCPT + 99 others); Tue, 25 Oct 2022 07:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231282AbiJYLYa (ORCPT ); Tue, 25 Oct 2022 07:24:30 -0400 Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F25C21E17 for ; Tue, 25 Oct 2022 04:24:29 -0700 (PDT) Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-13bd2aea61bso4330590fac.0 for ; Tue, 25 Oct 2022 04:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ogvOahPNmhpggqBTZ5QbvTn84Q49yePxZeXFmnUqiLs=; b=jutuwQxLvlEtjl08GBEDEUQLUX0ZptKv2K4eZi72W8GM7Qc2yUpxRsr+hXwVtu+diN ot8DN8Gnd4YFEI/dymIexaiz9CTLFPWzIzIBSFialYercjlsjhqfVBsin1yzJS/QfPXY DsqtLyLFDuIE8pg4D5N1ubpMaMp7Jee8dXMncrAAhnYYtVWppvc6lKdxvghxhjb2VrzR bE791M9x6DSiICRPPnF8+zvQqI2uSNjPbC3gbnJlMRQnIdgHYdtMteK1hlQI1c4IVmt5 U2eRg34zVbfoRXm4XnPRpLuMrnnxA8AGxmkhyBhHeNApBLp2GVt8H8duYlxMnS8IBilf eSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ogvOahPNmhpggqBTZ5QbvTn84Q49yePxZeXFmnUqiLs=; b=xzy4qEIE3Ndi7MY4dDIy7+1XPkmG6vW+lnNL6+zWSjxQ43YySXxeWJ+6zYgEX1Bflh Cme1wmtvOYHniY29Z2BeFl0bbMJaniJyWvHGy0amYrNlPpwsLv0/wP1tfkNyM5fc7KA4 Sdqc+imL/F7XXlPU8fxRiREK2+XdcdegH4mbZLYlHGsaMMkfQf6VH6glh0K21OKht26X jdpYh1VEuANkkpbPUzls7kZTxli05s9+58fWcIbDy0nzc6YjZX1haPe6BrmQg0HLR2Bz 2xkV/e0KoZeRZRHv8TOIx10nT/xz8UiWp3ipjk1LD1/yrH+ObriU79JYhExpPb1lXqcV 67Wg== X-Gm-Message-State: ACrzQf2xseR2IRc+U1YBGLTL29xnwER61wxnfD0l75JO9EJkXgvaRXqA AbJWPM3TIiTh3Tj+mUV5cUOgfjv8hYDpxUugbR5q6g== X-Received: by 2002:a05:6871:7a1:b0:131:946a:7b30 with SMTP id o33-20020a05687107a100b00131946a7b30mr40030282oap.67.1666697068405; Tue, 25 Oct 2022 04:24:28 -0700 (PDT) MIME-Version: 1.0 References: <20221018145348.4051809-1-amit.pundir@linaro.org> <20221020093057.zrrvxlgghn27bpes@bogus> <20221020161628.nyimwuni4zboasjo@bogus> In-Reply-To: From: Amit Pundir Date: Tue, 25 Oct 2022 16:53:51 +0530 Message-ID: Subject: Re: [PATCH] arm64: dts: qcom: qrb5165-rb5: Disable cpuidle states To: Sudeep Holla , Ulf Hansson Cc: Bjorn Andersson , Andy Gross , Maulik Shah , Dmitry Baryshkov , Rob Herring , Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm , dt , lkml Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Oct 2022 at 18:33, Ulf Hansson wrote: > > On Thu, 20 Oct 2022 at 18:16, Sudeep Holla wrote: > > > > On Thu, Oct 20, 2022 at 04:40:15PM +0200, Ulf Hansson wrote: > > > On Thu, 20 Oct 2022 at 16:09, Amit Pundir wrote: > > > > > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla wrote: > > > > > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir wrote: > > > > > > > > > > > > > > Disable cpuidle states for RB5. These cpuidle states > > > > > > > made the device highly unstable and it runs into the > > > > > > > following crash frequently: > > > > > > > > > > > > > > [ T1] vreg_l11c_3p3: failed to enable: -ETIMEDOUT > > > > > > > [ T1] qcom-rpmh-regulator 18200000.rsc:pm8150l-rpmh-regulators: ldo11: devm_regulator_register() failed, ret=-110 > > > > > > > [ T1] qcom-rpmh-regulator: probe of 18200000.rsc:pm8150l-rpmh-regulators failed with error -110 > > > > > > > > > > > > > > Fixes: 32bc936d7321 ("arm64: dts: qcom: sm8250: Add cpuidle states") > > > > > > > Signed-off-by: Amit Pundir > > > > > > > --- > > > > > > > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 8 ++++++++ > > > > > > > 1 file changed, 8 insertions(+) > > > > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > > > > > > > index cc003535a3c5..f936c41bfbea 100644 > > > > > > > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > > > > > > > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > > > > > > > @@ -251,6 +251,14 @@ qca639x: qca639x { > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > +&LITTLE_CPU_SLEEP_0 { > > > > > > > + status = "disabled"; > > > > > > > +}; > > > > > > > + > > > > > > > +&BIG_CPU_SLEEP_0 { > > > > > > > + status = "disabled"; > > > > > > > +}; > > > > > > > + > > > > > > > &adsp { > > > > > > > status = "okay"; > > > > > > > firmware-name = "qcom/sm8250/adsp.mbn"; > > > > > > > -- > > > > > > > 2.25.1 > > > > > > > > > > > > Disabling the CPU idlestates, will revert us back to using only the WFI state. > > > > > > > > > > > > An option that probably works too is to just drop the idlestate for > > > > > > the CPU cluster. Would you mind trying the below and see if that works > > > > > > too? > > > > > > > > > > > > > > > > Indeed this is was I suggested to check initially. But I was surprised to > > > > > see IIUC, Amit just disabled CPU states with above change and got it working. > > > > > So it is not cluster state alone causing the issue, is it somehow presence > > > > > of both cpu and cluster states ? Am I missing something here. > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi > > > > > > b/arch/arm64/boot/dts/qcom/sm8250.dtsi > > > > > > index c32227ea40f9..c707a49e8001 100644 > > > > > > --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi > > > > > > +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi > > > > > > @@ -700,7 +700,6 @@ CPU_PD7: cpu7 { > > > > > > > > > > > > CLUSTER_PD: cpu-cluster0 { > > > > > > #power-domain-cells = <0>; > > > > > > - domain-idle-states = <&CLUSTER_SLEEP_0>; > > > > > > > > > > How about just marking CLUSTER_SLEEP_0 state disabled ? That looks cleaner > > > > > than deleting this domain-idle-states property here. Also not sure if DTS > > > > > warnings will appear if you delete this ? > > > > > > > > Hi, I did try disabling CLUSTER_SLEEP_0: cluster-sleep-0 {} in > > > > domain-idle-states {} but that didn't help. That's why I end up > > > > disabling individual cpu states in idle-states {}. > > > > > > Yep, this boils down to the fact that genpd doesn't check whether the > > > domain-idle-state is disabled by using of_device_is_available(). See > > > genpd_iterate_idle_states(). > > > > > > > Yes I found that but can't that be fixed with a simple patch like below ? > > Sure, yes it can. > > Although, it does complicate things a bit, as we would need two > patches instead of one, to get things working. > > > > > > That said, I suggest we go with the above one-line change. It may not > > > be as clean as it could be, but certainly easy to revert when the > > > support for it has been added in a newer kernel. > > > > > > > I don't like removing the state. It means it doesn't have the state rather > > than i"it has state but is not working and hence disabled". > > > > Will handling the availability of the state cause any issues ? > > No, this works fine. It's already been proven by Amit's test. > > > > > Regards, > > Sudeep > > > > -->8 > > > > diff --git i/drivers/base/power/domain.c w/drivers/base/power/domain.c > > index ead135c7044c..6471b559230e 100644 > > --- i/drivers/base/power/domain.c > > +++ w/drivers/base/power/domain.c > > @@ -2952,6 +2952,10 @@ static int genpd_iterate_idle_states(struct device_node *dn, > > np = it.node; > > if (!of_match_node(idle_state_match, np)) > > continue; > > + > > + if (!of_device_is_available(np)) > > + continue; > > + > > if (states) { > > ret = genpd_parse_state(&states[i], np); > > if (ret) { > > > > The above code looks correct to me. Anyone that wants to submit the > patches? Otherwise I can try to manage it... Just out of curiosity, I gave this patch a test run and, as Ulf also mentioned above, this patch alone is not enough to fix the boot regression I see on RB5. Regards, Amit Pundir > > Kind regards > Uffe