Message ID | 20221018145348.4051809-1-amit.pundir@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2003943wrs; Tue, 18 Oct 2022 07:58:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5567m6GJ0hN2vcfSUsnzgKrjtkMOgc85qv1uYNC+dD8ptj1BjXHbIfXermr9Gj0rKwEnaB X-Received: by 2002:a17:907:6e24:b0:791:905f:7881 with SMTP id sd36-20020a1709076e2400b00791905f7881mr2773222ejc.120.1666105117614; Tue, 18 Oct 2022 07:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666105117; cv=none; d=google.com; s=arc-20160816; b=SfYnatkvj9RI5Lku2lImRT1NskkO2BmvdQ0txrOTWu9A0q4LjcqZnGrUKmEuQgp9f1 lQfhbm/21n8B4u1kPg7EurRUfXcaEW7Af5gAYpBqfFKtkxE3iDzKIxnBoQlCWnqjHvgi JMmFn5vcTeG3TacJOba1bFUQaO95o2JyWKng2rpCRfSTJc+5gZG6yDme2sHmGRkIwXIR H5uxVCNU+/+z2Y0n7+KX8ZALrPji48uSScmqKSe2lnhGAPQIh4v3ShMj/yCP1BTso92S 8pRH8AsLlDtNt0YWhICuAdKVSYtg2kOQfWRDJdEGXi605dxEuD8300wgtmcyghxPfzRx 896A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:author:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ats1U1GKP5ySkCQcFs4Bt8DbrtP8aKLYh292IozDhn8=; b=c4b2evMcyaJCSGU2LDxF7V32OjetooWxROFG5rxPG2OId7/2dLKGTVB8Sxu2CR4px9 PbiOKq6/DQKVnXKoNODefKD8YDMW73A1ptiMhnjAgDE2Vg31pJs2ieXMyEkqKz7tEisq CLX4BNodJKac6dgKWaMYu90RaCbvz5uLiE3fTE4SjaxMO0a/hxiebknTJGKligpjVhLR guGjWEPN/a1U69LFOk+35TMlhGrD9zIlJd5vNrDTyXSRpdBQ9V/VB2InAzLfid6qyvNE 4Z8u8F7IjJIYbEqpyI2iuEH3JaxT8z5qNeKwo9Nb3oite/mLKkUdh4I/dbMDTGm9PZjH YlCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZrAC8O0z; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt19-20020a170907729300b00732fcbcfedesi12504786ejc.623.2022.10.18.07.58.12; Tue, 18 Oct 2022 07:58:37 -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=ZrAC8O0z; 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 S229816AbiJROyI (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 10:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbiJROx6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 10:53:58 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE55DD9944 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 07:53:56 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id 70so14204909pjo.4 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 07:53:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:author:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ats1U1GKP5ySkCQcFs4Bt8DbrtP8aKLYh292IozDhn8=; b=ZrAC8O0zV5XMJISD0nU0tmntzsIrWrAzLhnfv5ntWDNrY7cSWrniEMtWh+1pQO10RM uNRQ+npKwnQKBo6GzbbSHzgC0vJuS+JkQ/7nRUmu4JiVvUqvHwyrzQyqYt4/Zkc+/e5G Jynopflmt053WmFJqqnt4OTJXn22409fjaW4nMlJwKyGWhj3CHH5Mrb6Q1h0lqQYmJva JCqhXJ/2iWzCOVVykBWZrEvrAFJRToY2tRA5XZtREZlT35McytzE0zUW75YUjbU5AmnS BN5j14tVCdMht0slkxfFokS/XUjlDgjb/GOQlFqq68LYccaTFjRrloWE8ZQ2zFFe3L/9 T/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:author:mime-version:message-id:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ats1U1GKP5ySkCQcFs4Bt8DbrtP8aKLYh292IozDhn8=; b=XIFe53n7wx78hX8rohjpTnASnjt7KIGIl5MTBKaPb7kcHr3xgUwNkwI8+ahdNWyZFL xSY0DJCoqfT73GuuCdZdqKFAZC0Jf4xlg1xEmTZDTKWj54t6H4KjbUsnSYsqmnr03i+q a9baudLc2ROlqw5ORrxc5nPd48NdmlyMIrm5sKqDmjKbhSzR+ZEhR6Q9loa39IbxvQGF sFl9yaVrTe1jDLM9+lJ2YCaCqZQSuINDdwbYz3DClDhgM81F8ygHN+mA9BX/InGqroBX MBGjwEPBypqBwUQgqfzpE2mo9oFl8TpuARsQwM9a1lPELhILtH3TD9BTu1fjg7SChv96 9/+w== X-Gm-Message-State: ACrzQf22DLCUY1lfI0imaY5QMmxNFKi4gKAfFl+HvqckX5WFFXR8GXBN gMKXXimnMPJHmKfjyRNkPK+YTg== X-Received: by 2002:a17:90a:2bcb:b0:20a:ea55:32ef with SMTP id n11-20020a17090a2bcb00b0020aea5532efmr39655500pje.59.1666104836204; Tue, 18 Oct 2022 07:53:56 -0700 (PDT) Received: from localhost.localdomain ([122.171.23.186]) by smtp.gmail.com with ESMTPSA id q3-20020a170902a3c300b001784a45511asm8775248plb.79.2022.10.18.07.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 07:53:55 -0700 (PDT) From: Amit Pundir <amit.pundir@linaro.org> To: Sudeep Holla <sudeep.holla@arm.com>, Ulf Hansson <ulf.hansson@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Maulik Shah <quic_mkshah@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Rob Herring <robh+dt@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: linux-arm-msm <linux-arm-msm@vger.kernel.org>, dt <devicetree@vger.kernel.org>, lkml <linux-kernel@vger.kernel.org> Subject: [PATCH] arm64: dts: qcom: qrb5165-rb5: Disable cpuidle states Date: Tue, 18 Oct 2022 20:23:48 +0530 Message-Id: <20221018145348.4051809-1-amit.pundir@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Author: Amit Pundir <amit.pundir@linaro.org> Content-Transfer-Encoding: 8bit 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 autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747037839775293592?= X-GMAIL-MSGID: =?utf-8?q?1747037839775293592?= |
Series |
arm64: dts: qcom: qrb5165-rb5: Disable cpuidle states
|
|
Commit Message
Amit Pundir
Oct. 18, 2022, 2:53 p.m. UTC
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 <amit.pundir@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > --- > 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? 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>; }; }; Kind regards Uffe
On Wed, 19 Oct 2022 at 17:28, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > --- > > 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? Following change works too for my RB5 setup. I didn't see any obvious regression in my limited (~10) test runs so far. Regards, Amit Pundir > > 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>; > }; > }; > > Kind regards > Uffe
On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > --- > > 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 ?
On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > --- > > > 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 {}. Regards, Amit Pundir > > -- > Regards, > Sudeep
On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > --- > > > > 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(). 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. Amit, do you want me to post a new patch or do you prefer to re-spin your patch? It doesn't matter to me. Kind regards Uffe
On Thu, 20 Oct 2022 at 20:10, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > > --- > > > > > 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(). > > 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. > > Amit, do you want me to post a new patch or do you prefer to re-spin > your patch? It doesn't matter to me. Sent. Thanks. Regards, Amit Pundir > > Kind regards > Uffe
On Thu, Oct 20, 2022 at 04:40:15PM +0200, Ulf Hansson wrote: > On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > > --- > > > > > 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 ? > 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 ? 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) {
On Thu, 20 Oct 2022 at 18:16, Sudeep Holla <sudeep.holla@arm.com> wrote: > > On Thu, Oct 20, 2022 at 04:40:15PM +0200, Ulf Hansson wrote: > > On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > > > --- > > > > > > 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... Kind regards Uffe
On Fri, 21 Oct 2022 at 18:33, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Thu, 20 Oct 2022 at 18:16, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > On Thu, Oct 20, 2022 at 04:40:15PM +0200, Ulf Hansson wrote: > > > On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > > > > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > > > > --- > > > > > > > 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
On Tue, Oct 25, 2022 at 04:53:51PM +0530, Amit Pundir wrote: > On Fri, 21 Oct 2022 at 18:33, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > > > On Thu, 20 Oct 2022 at 18:16, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > On Thu, Oct 20, 2022 at 04:40:15PM +0200, Ulf Hansson wrote: > > > > On Thu, 20 Oct 2022 at 16:09, Amit Pundir <amit.pundir@linaro.org> wrote: > > > > > > > > > > On Thu, 20 Oct 2022 at 15:01, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > > > > > > > > > On Wed, Oct 19, 2022 at 01:57:34PM +0200, Ulf Hansson wrote: > > > > > > > On Tue, 18 Oct 2022 at 16:53, Amit Pundir <amit.pundir@linaro.org> 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 <amit.pundir@linaro.org> > > > > > > > > --- > > > > > > > > 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. > Indeed, Ulf has posted the other changes needed and I have reviewed it just now. I can post this one. I agree it is multiple change but I think it is right set as we need to fix all these anyways, why not at once. Though they are multiple changes, the delta is not too much in my opinion.
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";