[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240306095357736-0800.eberman@hu-eberman-lv.qualcomm.com>
Date: Wed, 6 Mar 2024 10:01:34 -0800
From: Elliot Berman <quic_eberman@...cinc.com>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
CC: Gabor Juhos <j4g8y7@...il.com>, Bjorn Andersson <andersson@...nel.org>,
Sibi Sankar <quic_sibis@...cinc.com>, <linux-arm-msm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: Re: [PATCH] firmware: qcom_scm: disable clocks if
qcom_scm_bw_enable() fails
On Wed, Mar 06, 2024 at 05:02:37PM +0100, Konrad Dybcio wrote:
> On 3/6/24 05:10, Elliot Berman wrote:
> > On Tue, Mar 05, 2024 at 10:15:19PM +0100, Konrad Dybcio wrote:
> > > On 3/4/24 14:14, Gabor Juhos wrote:
> > > > There are several functions which are calling qcom_scm_bw_enable()
> > > > then returns immediately if the call fails and leaves the clocks
> > > > enabled.
> > > >
> > > > Change the code of these functions to disable clocks when the
> > > > qcom_scm_bw_enable() call fails. This also fixes a possible dma
> > > > buffer leak in the qcom_scm_pas_init_image() function.
> > > >
> > > > Compile tested only due to lack of hardware with interconnect
> > > > support.
> > > >
> > > > Cc: stable@...r.kernel.org
> > > > Fixes: 65b7ebda5028 ("firmware: qcom_scm: Add bw voting support to the SCM interface")
> > > > Signed-off-by: Gabor Juhos <j4g8y7@...il.com>
> > > > ---
> > >
> > > Taking a closer look, is there any argument against simply
> > > putting the clk/bw en/dis calls in qcom_scm_call()?
> >
> > We shouldn't do this because the clk/bw en/dis calls are only needed in
> > few SCM calls.
>
> Then the argument list could be expanded with `bool require_resources`,
> or so still saving us a lot of boilerplate
If we want to go that route, I'd vote to add it to qcom_scm_desc in a
new field.
Powered by blists - more mailing lists