[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210713031848.sp5fpjg36uthnmuq@vireshk-i7>
Date: Tue, 13 Jul 2021 08:48:48 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Thara Gopinath <thara.gopinath@...aro.org>
Cc: agross@...nel.org, bjorn.andersson@...aro.org, rui.zhang@...el.com,
daniel.lezcano@...aro.org, rjw@...ysocki.net, robh+dt@...nel.org,
tdas@...eaurora.org, mka@...omium.org,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [Patch v3 3/6] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt
support
On 12-07-21, 21:18, Thara Gopinath wrote:
> So I really need the interrupt to fire and then the timer to kick in and
> take up the monitoring. I can think of introducing a variable is_disabled
> which is updated and read under a spinlock. qcom_cpufreq_hw_cpu_exit can
> hold the spinlock and set is_disabled to true prior to cancelling the work
> queue or disabling the interrupt. Before re-enabling the interrupt or
> re-queuing the work in qcom_lmh_dcvs_notify, is_disabled can be read and
> checked.
Or you can make the lmh_dcvs_poll_work item a pointer and mark it NULL in exit,
with proper locking etc.
> But does this problem not exist in target_index , fast_switch etc also ? One
> cpu can be disabling and the other one can be updating the target right?
The race doesn't happen there as cpufreq_unregister_driver() takes care of
stopping everything before removing the policy. To be more precise, governor's
->stop() function is responsible for making sure that frequency won't be updated
any further.
--
viresh
Powered by blists - more mailing lists