[PATCH v3 1/3] cpufreq: mediatek: using global lock avoid race condition
Viresh Kumar
viresh.kumar at linaro.org
Wed Apr 16 01:05:17 PDT 2025
On 14-04-25, 08:42, Chun-Jen Tseng (曾俊仁) wrote:
> Hi Viresh,
>
> The CCI level choose by Max_Level(LCPU & BCPU frequency) in devfreq
> driver.
> without global lock, It may choose wrong CCI level and cause system
> stall.
>
> I hope this flow is serial setting like, BCPU / LCPU set frequency ->
> set CCI level -> BCPU / LCPU set frequency -> set CCI level -> ......
>
> without global lock, it could be LCPU / BCPU set frequency -> set CCI
> level(during this time, it may change BCPU / LCPU frequency and cause
> system stall.
>
> I also can only do global lock on ccifreq_support SoC.
As explained earlier, I don't think there is a race here. May be I am
wrong. And so I need a clear code path example from you, which proves
that there is a race here.
--
viresh
More information about the Linux-mediatek
mailing list