linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
@ 2024-01-11  2:01 Dmitry Baryshkov
  2024-01-11  4:45 ` Manivannan Sadhasivam
  2024-01-11 13:09 ` Konrad Dybcio
  0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2024-01-11  2:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dmitry Baryshkov

If cluster domain idle state is enabled on the RB1, the board becomes
significantly less responsive. Under certain circumstances (if some of
the devices are disabled in kernel config) the board can even lock up.

It seems this is caused by the MPM not being pinged during CPU idle (in
the same way the RPMh is pinged when cluster idle is entered).

Disable cluster domain idle for the RB1 board until MPM driver is fixed
to cooperate with the CPU idle states.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index aa53b6af6d9c..9a0308ef8b0f 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -177,6 +177,24 @@ vph_pwr: regulator-vph-pwr {
 	};
 };
 
+&CPU_PD0 {
+	/delete-property/ power-domains;
+};
+
+&CPU_PD1 {
+	/delete-property/ power-domains;
+};
+
+&CPU_PD2 {
+	/delete-property/ power-domains;
+};
+
+&CPU_PD3 {
+	/delete-property/ power-domains;
+};
+
+/delete-node/ &CLUSTER_PD;
+
 &gpi_dma0 {
 	status = "okay";
 };

---
base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
change-id: 20240111-qrb2210-rb1-no-cluster-idle-7bf43b3a0452

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
  2024-01-11  2:01 [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains Dmitry Baryshkov
@ 2024-01-11  4:45 ` Manivannan Sadhasivam
  2024-01-11  6:02   ` Dmitry Baryshkov
  2024-01-11 13:09 ` Konrad Dybcio
  1 sibling, 1 reply; 6+ messages in thread
From: Manivannan Sadhasivam @ 2024-01-11  4:45 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Thu, Jan 11, 2024 at 04:01:14AM +0200, Dmitry Baryshkov wrote:
> If cluster domain idle state is enabled on the RB1, the board becomes
> significantly less responsive. Under certain circumstances (if some of
> the devices are disabled in kernel config) the board can even lock up.
> 
> It seems this is caused by the MPM not being pinged during CPU idle (in
> the same way the RPMh is pinged when cluster idle is entered).
> 

What does "ping" mean here? Please be more specific.

- Mani

> Disable cluster domain idle for the RB1 board until MPM driver is fixed
> to cooperate with the CPU idle states.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> index aa53b6af6d9c..9a0308ef8b0f 100644
> --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> @@ -177,6 +177,24 @@ vph_pwr: regulator-vph-pwr {
>  	};
>  };
>  
> +&CPU_PD0 {
> +	/delete-property/ power-domains;
> +};
> +
> +&CPU_PD1 {
> +	/delete-property/ power-domains;
> +};
> +
> +&CPU_PD2 {
> +	/delete-property/ power-domains;
> +};
> +
> +&CPU_PD3 {
> +	/delete-property/ power-domains;
> +};
> +
> +/delete-node/ &CLUSTER_PD;
> +
>  &gpi_dma0 {
>  	status = "okay";
>  };
> 
> ---
> base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
> change-id: 20240111-qrb2210-rb1-no-cluster-idle-7bf43b3a0452
> 
> Best regards,
> -- 
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> 
> 

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
  2024-01-11  4:45 ` Manivannan Sadhasivam
@ 2024-01-11  6:02   ` Dmitry Baryshkov
  2024-01-11 12:44     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2024-01-11  6:02 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Thu, 11 Jan 2024 at 06:45, Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> On Thu, Jan 11, 2024 at 04:01:14AM +0200, Dmitry Baryshkov wrote:
> > If cluster domain idle state is enabled on the RB1, the board becomes
> > significantly less responsive. Under certain circumstances (if some of
> > the devices are disabled in kernel config) the board can even lock up.
> >
> > It seems this is caused by the MPM not being pinged during CPU idle (in
> > the same way the RPMh is pinged when cluster idle is entered).
> >
>
> What does "ping" mean here? Please be more specific.

See rpmh_rsc_pd_callback(), rpmh_flush() and rpmh_rsc_write_next_wakeup().

RPMh driver (among other things) on entering the idle writes the next
wake up time to the RPMh. The MPM driver in the vendor kernel does the
same, see msm_mpm_timer_write() in msm-4.19

>
> - Mani
>
> > Disable cluster domain idle for the RB1 board until MPM driver is fixed
> > to cooperate with the CPU idle states.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > index aa53b6af6d9c..9a0308ef8b0f 100644
> > --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > @@ -177,6 +177,24 @@ vph_pwr: regulator-vph-pwr {
> >       };
> >  };
> >
> > +&CPU_PD0 {
> > +     /delete-property/ power-domains;
> > +};
> > +
> > +&CPU_PD1 {
> > +     /delete-property/ power-domains;
> > +};
> > +
> > +&CPU_PD2 {
> > +     /delete-property/ power-domains;
> > +};
> > +
> > +&CPU_PD3 {
> > +     /delete-property/ power-domains;
> > +};
> > +
> > +/delete-node/ &CLUSTER_PD;
> > +
> >  &gpi_dma0 {
> >       status = "okay";
> >  };
> >
> > ---
> > base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
> > change-id: 20240111-qrb2210-rb1-no-cluster-idle-7bf43b3a0452
> >
> > Best regards,
> > --
> > Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >
> >
>
> --
> மணிவண்ணன் சதாசிவம்



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
  2024-01-11  6:02   ` Dmitry Baryshkov
@ 2024-01-11 12:44     ` Manivannan Sadhasivam
  0 siblings, 0 replies; 6+ messages in thread
From: Manivannan Sadhasivam @ 2024-01-11 12:44 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Thu, Jan 11, 2024 at 08:02:32AM +0200, Dmitry Baryshkov wrote:
> On Thu, 11 Jan 2024 at 06:45, Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > On Thu, Jan 11, 2024 at 04:01:14AM +0200, Dmitry Baryshkov wrote:
> > > If cluster domain idle state is enabled on the RB1, the board becomes
> > > significantly less responsive. Under certain circumstances (if some of
> > > the devices are disabled in kernel config) the board can even lock up.
> > >
> > > It seems this is caused by the MPM not being pinged during CPU idle (in
> > > the same way the RPMh is pinged when cluster idle is entered).
> > >
> >
> > What does "ping" mean here? Please be more specific.
> 
> See rpmh_rsc_pd_callback(), rpmh_flush() and rpmh_rsc_write_next_wakeup().
> 
> RPMh driver (among other things) on entering the idle writes the next
> wake up time to the RPMh. The MPM driver in the vendor kernel does the
> same, see msm_mpm_timer_write() in msm-4.19
> 

Okay, thanks for the explanation. It'd be good if you have mentioned this in the
commit message as it is not obvious for one to understand what "ping" means.

- Mani

> >
> > - Mani
> >
> > > Disable cluster domain idle for the RB1 board until MPM driver is fixed
> > > to cooperate with the CPU idle states.
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 18 ++++++++++++++++++
> > >  1 file changed, 18 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > > index aa53b6af6d9c..9a0308ef8b0f 100644
> > > --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > > +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
> > > @@ -177,6 +177,24 @@ vph_pwr: regulator-vph-pwr {
> > >       };
> > >  };
> > >
> > > +&CPU_PD0 {
> > > +     /delete-property/ power-domains;
> > > +};
> > > +
> > > +&CPU_PD1 {
> > > +     /delete-property/ power-domains;
> > > +};
> > > +
> > > +&CPU_PD2 {
> > > +     /delete-property/ power-domains;
> > > +};
> > > +
> > > +&CPU_PD3 {
> > > +     /delete-property/ power-domains;
> > > +};
> > > +
> > > +/delete-node/ &CLUSTER_PD;
> > > +
> > >  &gpi_dma0 {
> > >       status = "okay";
> > >  };
> > >
> > > ---
> > > base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
> > > change-id: 20240111-qrb2210-rb1-no-cluster-idle-7bf43b3a0452
> > >
> > > Best regards,
> > > --
> > > Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > >
> > >
> >
> > --
> > மணிவண்ணன் சதாசிவம்
> 
> 
> 
> -- 
> With best wishes
> Dmitry

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
  2024-01-11  2:01 [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains Dmitry Baryshkov
  2024-01-11  4:45 ` Manivannan Sadhasivam
@ 2024-01-11 13:09 ` Konrad Dybcio
  2024-01-11 13:31   ` Dmitry Baryshkov
  1 sibling, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2024-01-11 13:09 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel



On 1/11/24 03:01, Dmitry Baryshkov wrote:
> If cluster domain idle state is enabled on the RB1, the board becomes
> significantly less responsive. Under certain circumstances (if some of
> the devices are disabled in kernel config) the board can even lock up.

I got that $sometime ago, but can't repro now.. which devices being
disabled would cause the hang?

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains
  2024-01-11 13:09 ` Konrad Dybcio
@ 2024-01-11 13:31   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2024-01-11 13:31 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel

On Thu, 11 Jan 2024 at 15:09, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> On 1/11/24 03:01, Dmitry Baryshkov wrote:
> > If cluster domain idle state is enabled on the RB1, the board becomes
> > significantly less responsive. Under certain circumstances (if some of
> > the devices are disabled in kernel config) the board can even lock up.
>
> I got that $sometime ago, but can't repro now.. which devices being
> disabled would cause the hang?

It was reproducible with 6.4. without this patch. With 6.6 I can not
easily reproduce the hang, but the delays / responsiveness is easy to
reproduce. Compare for example 'ps' output with and without this
patch.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-11 13:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11  2:01 [PATCH] arm64: dts: qcom: qrb2210-rb1: disable cluster power domains Dmitry Baryshkov
2024-01-11  4:45 ` Manivannan Sadhasivam
2024-01-11  6:02   ` Dmitry Baryshkov
2024-01-11 12:44     ` Manivannan Sadhasivam
2024-01-11 13:09 ` Konrad Dybcio
2024-01-11 13:31   ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).