[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321045624.mwm2mnkqeow5uids@vireshk-i7>
Date: Fri, 21 Mar 2025 10:26:24 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Chun-Jen Tseng (曾俊仁) <Chun-Jen.Tseng@...iatek.com>
Cc: "cw00.choi@...sung.com" <cw00.choi@...sung.com>,
"rafael@...nel.org" <rafael@...nel.org>,
Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@...iatek.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
"myungjoo.ham@...sung.com" <myungjoo.ham@...sung.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kyungmin.park@...sung.com" <kyungmin.park@...sung.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v3 1/3] cpufreq: mediatek: using global lock avoid race
condition
On 20-03-25, 08:22, Chun-Jen Tseng (曾俊仁) wrote:
> The struct mtk_cpu_dvfs_info instance is per-policy and the reg_lock is
> also in this structure. when I have two "policy-0" and "policy-6" use
> the same mtk_cpufreq_set_target() function but the info->reg_lock
> is from 2 instance(policy-0 and policy-6). when the policy-0 and
> policy-6 call set_target target, the mutex_lock is locked by per-
> policy. So, I change to global lock avoid per-policy lock.
Yes, that's what you are doing. I am asking why a global lock is required here ?
I think the per-policy lock is all you need.
--
viresh
Powered by blists - more mailing lists