[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77b01a97-de2d-4e10-91f6-915ec414eede@linaro.org>
Date: Fri, 17 May 2024 10:07:50 +0200
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Chris Lew <quic_clew@...cinc.com>, Bjorn Andersson
<andersson@...nel.org>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Will Deacon <will@...nel.org>, Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>, Jonathan Corbet <corbet@....net>,
Mathieu Poirier <mathieu.poirier@...aro.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, Richard Maina <quic_rmaina@...cinc.com>
Subject: Re: [PATCH 3/7] hwspinlock: Introduce hwspin_lock_bust()
On 17/05/2024 00:58, Chris Lew wrote:
> From: Richard Maina <quic_rmaina@...cinc.com>
>
> When a remoteproc crashes or goes down unexpectedly this can result in
> a state where locks held by the remoteproc will remain locked possibly
> resulting in deadlock. This new API hwspin_lock_bust() allows
> hwspinlock implementers to define a bust operation for freeing previously
> acquired hwspinlocks after verifying ownership of the acquired lock.
>
> Signed-off-by: Richard Maina <quic_rmaina@...cinc.com>
> Signed-off-by: Chris Lew <quic_clew@...cinc.com>
> ---
> Documentation/locking/hwspinlock.rst | 11 +++++++++++
> drivers/hwspinlock/hwspinlock_core.c | 30 +++++++++++++++++++++++++++++-
Shouldn't this be added to drivers/hwspinlock/qcom_hwspinlock.c ?
> drivers/hwspinlock/hwspinlock_internal.h | 3 +++
> include/linux/hwspinlock.h | 6 ++++++
> 4 files changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/locking/hwspinlock.rst b/Documentation/locking/hwspinlock.rst
> index c1c2c827b575..6ee94cc6d3b7 100644
> --- a/Documentation/locking/hwspinlock.rst
> +++ b/Documentation/locking/hwspinlock.rst
> @@ -85,6 +85,17 @@ is already free).
>
> Should be called from a process context (might sleep).
>
> +::
> +
> + int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id);
I don't think this is a geat name "bust" looks alot like "burst" and I
don't think aligns well with the established namespace.
Why not simply qcom_hwspinlock_unlock_force() - which is what you are
doing - forcing the hw spinlock to unlock.
---
bod
Powered by blists - more mailing lists