[PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping

Bjorn Andersson posted 1 patch 1 year, 7 months ago
drivers/soc/qcom/pmic_glink.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
Re: [PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping
Posted by Bjorn Andersson 1 year, 7 months ago
On Tue, 30 Apr 2024 20:38:57 -0700, Bjorn Andersson wrote:
> The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
> don't traverse clients list without a lock")' ensured that the clients
> list is not modified while traversed.
> 
> But the callback is made from the GLINK IRQ handler and as such this
> mutual exclusion can not be provided by a (sleepable) mutex.
> 
> [...]

Applied, thanks!

[1/1] soc: qcom: pmic_glink: Make client-lock non-sleeping
      commit: 9329933699b32d467a99befa20415c4b2172389a

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>
Re: [PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping
Posted by Andrew Halaney 1 year, 7 months ago
On Tue, Apr 30, 2024 at 08:38:57PM -0700, Bjorn Andersson wrote:
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
> 
> The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
> don't traverse clients list without a lock")' ensured that the clients
> list is not modified while traversed.
> 
> But the callback is made from the GLINK IRQ handler and as such this
> mutual exclusion can not be provided by a (sleepable) mutex.
> 
> Replace the mutex with a spinlock.
> 
> Fixes: 635ce0db8956 ("soc: qcom: pmic_glink: don't traverse clients list without a lock")
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>

Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Re: [PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping
Posted by Dmitry Baryshkov 1 year, 7 months ago
On Wed, 1 May 2024 at 06:33, Bjorn Andersson <andersson@kernel.org> wrote:
>
> From: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink:
> don't traverse clients list without a lock")' ensured that the clients
> list is not modified while traversed.
>
> But the callback is made from the GLINK IRQ handler and as such this
> mutual exclusion can not be provided by a (sleepable) mutex.
>
> Replace the mutex with a spinlock.
>
> Fixes: 635ce0db8956 ("soc: qcom: pmic_glink: don't traverse clients list without a lock")
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
>  drivers/soc/qcom/pmic_glink.c | 25 +++++++++++++++----------
>  1 file changed, 15 insertions(+), 10 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry