[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMzd5OEhG4PYYv+E@builder.lan>
Date: Fri, 18 Jun 2021 12:54:44 -0500
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Thara Gopinath <thara.gopinath@...aro.org>
Cc: agross@...nel.org, rui.zhang@...el.com, daniel.lezcano@...aro.org,
viresh.kumar@...aro.org, rjw@...ysocki.net, robh+dt@...nel.org,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 2/5] thermal: qcom: Add support for LMh driver
On Mon 14 Jun 20:38 CDT 2021, Thara Gopinath wrote:
> On 6/14/21 4:53 PM, Bjorn Andersson wrote:
> > On Tue 08 Jun 17:29 CDT 2021, Thara Gopinath wrote:
> > > diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile
[..]
> > > +static irqreturn_t lmh_handle_irq(int hw_irq, void *data)
> > > +{
> > > + struct lmh_hw_data *lmh_data = data;
> > > + int irq = irq_find_mapping(lmh_data->domain, 0);
> > > +
> > > + /*
> > > + * Disable interrupt and call the cpufreq driver to handle the interrupt
> > > + * cpufreq will enable the interrupt once finished processing.
> > > + */
> > > + disable_irq_nosync(lmh_data->irq);
> >
> > The contract between this driver's disabling of the IRQ and the
> > cpufreq-hw driver's enabling it when we're done polling does worry me.
> >
> > In the case of EPSS, don't we disable the interrupt during the polling
> > there as well? If that's the case wouldn't it be better to implement
> > irq_chip->irq_disable and have the cpufreq-hw driver do the disable in
> > both cases?
>
> Yes. You are right. In case of EPSS, the cpufreq-hw will have to disable the
> interrupt. I did think of the approach you suggested here. My only issue is
> that we will dispatch the interrupt to cpufreq-hw without it disabling it
> and hence the interrupt could fire again, right ?
>
Does it fire again before you INTR_CLK it?
Regards,
Bjorn
Powered by blists - more mailing lists