Re: [PATCH v3 1/3] cpufreq: mediatek: using global lock avoid race condition
From: Viresh Kumar
Date: Fri Mar 21 2025 - 02:02:03 EST
On 21-03-25, 05:32, Chun-Jen Tseng (曾俊仁) wrote:
> I add a global lock related to the CCI driver.
>
> This is because the CCI needs to obtain the frequencies of policy-0 and
> policy-6 to determine its own frequency.
>
> If policy-0 and policy-6 are set simultaneously, it may cause the CCI
> to select the wrong frequency.
>
> Therefore, I hope to change the setting flow to the following:
> policy-0 or policy-6 -> set frequency -> CCI receives notification -
> set CCI frequency
Can you please point to the code where this race exists ? I am not
sure I fully understand it as of now. If the race is present in
another driver, CCI ?, then shouldn't it be fixed there instead ?
--
viresh