<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/hwspinlock, branch master</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>hwspinlock: qcom: implement bust operation</title>
<updated>2024-05-29T19:52:26+00:00</updated>
<author>
<name>Richard Maina</name>
<email>quic_rmaina@quicinc.com</email>
</author>
<published>2024-05-29T18:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=73100deb59c3892e280234fcc0171a5376c71788'/>
<id>73100deb59c3892e280234fcc0171a5376c71788</id>
<content type='text'>
Implement a new operation qcom_hwspinlock_bust() which can be invoked
to bust any locks that are in use when a remoteproc is stopped or
crashed.

Signed-off-by: Richard Maina &lt;quic_rmaina@quicinc.com&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Chris Lew &lt;quic_clew@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement a new operation qcom_hwspinlock_bust() which can be invoked
to bust any locks that are in use when a remoteproc is stopped or
crashed.

Signed-off-by: Richard Maina &lt;quic_rmaina@quicinc.com&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Chris Lew &lt;quic_clew@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: Introduce hwspin_lock_bust()</title>
<updated>2024-05-29T19:52:26+00:00</updated>
<author>
<name>Richard Maina</name>
<email>quic_rmaina@quicinc.com</email>
</author>
<published>2024-05-29T18:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=7c327d56597d8de1680cf24e956b704270d3d84a'/>
<id>7c327d56597d8de1680cf24e956b704270d3d84a</id>
<content type='text'>
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 &lt;quic_rmaina@quicinc.com&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Chris Lew &lt;quic_clew@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-1-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;quic_rmaina@quicinc.com&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Chris Lew &lt;quic_clew@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-1-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: omap: Use index to get hwspinlock pointer</title>
<updated>2024-03-06T04:01:14+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2024-02-08T16:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=cebaa386d5ee1a44a58c12f1d220f62cc567fdb0'/>
<id>cebaa386d5ee1a44a58c12f1d220f62cc567fdb0</id>
<content type='text'>
For loops with multiple initializers and increments are hard to read
and reason about, simplify this by using the looping index to index
into the hwspinlock array.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-4-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For loops with multiple initializers and increments are hard to read
and reason about, simplify this by using the looping index to index
into the hwspinlock array.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-4-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: omap: Use devm_hwspin_lock_register() helper</title>
<updated>2024-03-06T04:01:14+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2024-02-08T16:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8781ec87795a8812b22579ba7ccdc0fdc16ba003'/>
<id>8781ec87795a8812b22579ba7ccdc0fdc16ba003</id>
<content type='text'>
This will unregister the HW spinlock on module exit automatically for us,
currently we manually unregister which can be error-prone if not done in
the right order. This also allows us to remove the remove callback.
Do that here.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-3-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will unregister the HW spinlock on module exit automatically for us,
currently we manually unregister which can be error-prone if not done in
the right order. This also allows us to remove the remove callback.
Do that here.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-3-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: omap: Use devm_pm_runtime_enable() helper</title>
<updated>2024-03-06T04:01:14+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2024-02-08T16:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=25f7d74d451484fc09772fc276b161d1a6bc64b6'/>
<id>25f7d74d451484fc09772fc276b161d1a6bc64b6</id>
<content type='text'>
This disables runtime PM on module exit automatically for us, currently
we manually disable runtime PM which can be error-prone if not done
in the right order or missed in some exit path. This also allows us
to simplify the probe exit path and remove callbacks. Do that here.

While here, as we can now return right after registering our hwspinlock,
simply return directly and remove the extra debug message.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-2-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This disables runtime PM on module exit automatically for us, currently
we manually disable runtime PM which can be error-prone if not done
in the right order or missed in some exit path. This also allows us
to simplify the probe exit path and remove callbacks. Do that here.

While here, as we can now return right after registering our hwspinlock,
simply return directly and remove the extra debug message.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-2-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: omap: Remove unneeded check for OF node</title>
<updated>2024-03-06T04:01:14+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2024-02-08T16:51:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=19856a07e5fd25821084b6b8d9ef177d21909483'/>
<id>19856a07e5fd25821084b6b8d9ef177d21909483</id>
<content type='text'>
We do not use the OF node anymore, nor does it matter how
we got to probe, so remove the check for of_node.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-1-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We do not use the OF node anymore, nor does it matter how
we got to probe, so remove the check for of_node.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20240208165114.63148-1-afd@ti.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock/core: fix kernel-doc warnings</title>
<updated>2023-12-07T22:51:38+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-12-06T05:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=bcd0f5d18b0b1134ccf9ef68e7a0cf637aab380d'/>
<id>bcd0f5d18b0b1134ccf9ef68e7a0cf637aab380d</id>
<content type='text'>
Correct function comments to prevent kernel-doc warnings
found when using "W=1".

hwspinlock_core.c:208: warning: Excess function parameter 'timeout' description in '__hwspin_lock_timeout'
hwspinlock_core.c:318: warning: Excess function parameter 'bank' description in 'of_hwspin_lock_simple_xlate'
hwspinlock_core.c:647: warning: Function parameter or member 'hwlock' not described in '__hwspin_lock_request'

and 17 warnings like:
hwspinlock_core.c:487: warning: No description found for return value of 'hwspin_lock_register'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: Bjorn Andersson &lt;andersson@kernel.org&gt;
Cc: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Cc: linux-remoteproc@vger.kernel.org
Link: https://lore.kernel.org/r/20231206055439.671-1-rdunlap@infradead.org
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct function comments to prevent kernel-doc warnings
found when using "W=1".

hwspinlock_core.c:208: warning: Excess function parameter 'timeout' description in '__hwspin_lock_timeout'
hwspinlock_core.c:318: warning: Excess function parameter 'bank' description in 'of_hwspin_lock_simple_xlate'
hwspinlock_core.c:647: warning: Function parameter or member 'hwlock' not described in '__hwspin_lock_request'

and 17 warnings like:
hwspinlock_core.c:487: warning: No description found for return value of 'hwspin_lock_register'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Cc: Bjorn Andersson &lt;andersson@kernel.org&gt;
Cc: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Cc: linux-remoteproc@vger.kernel.org
Link: https://lore.kernel.org/r/20231206055439.671-1-rdunlap@infradead.org
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: qcom: Remove IPQ6018 SOC specific compatible</title>
<updated>2023-12-07T22:42:01+00:00</updated>
<author>
<name>Vignesh Viswanathan</name>
<email>quic_viswanat@quicinc.com</email>
</author>
<published>2023-09-05T09:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c3dc3d079d191c9149496b3c7fe1ece909386d93'/>
<id>c3dc3d079d191c9149496b3c7fe1ece909386d93</id>
<content type='text'>
IPQ6018 has 32 tcsr_mutex hwlock registers with stride 0x1000.
The compatible string qcom,ipq6018-tcsr-mutex is mapped to
of_msm8226_tcsr_mutex which has 32 locks configured with stride of 0x80
and doesn't match the HW present in IPQ6018.

Remove IPQ6018 specific compatible string so that it fallsback to
of_tcsr_mutex data which maps to the correct configuration for IPQ6018.

Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs")
Signed-off-by: Vignesh Viswanathan &lt;quic_viswanat@quicinc.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20230905095535.1263113-3-quic_viswanat@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IPQ6018 has 32 tcsr_mutex hwlock registers with stride 0x1000.
The compatible string qcom,ipq6018-tcsr-mutex is mapped to
of_msm8226_tcsr_mutex which has 32 locks configured with stride of 0x80
and doesn't match the HW present in IPQ6018.

Remove IPQ6018 specific compatible string so that it fallsback to
of_tcsr_mutex data which maps to the correct configuration for IPQ6018.

Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs")
Signed-off-by: Vignesh Viswanathan &lt;quic_viswanat@quicinc.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20230905095535.1263113-3-quic_viswanat@quicinc.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation</title>
<updated>2023-07-17T18:49:18+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2023-07-16T02:28:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=23316be8a9d450f33a21f1efe7d89570becbec58'/>
<id>23316be8a9d450f33a21f1efe7d89570becbec58</id>
<content type='text'>
Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older
SoCs") introduced and made regmap_config mandatory in the of_data struct
but didn't add the regmap_config for sfpb based devices.

SFPB based devices can both use the legacy syscon way to probe or the
new MMIO way and currently device that use the MMIO way are broken as
they lack the definition of the now required regmap_config and always
return -EINVAL (and indirectly makes fail probing everything that
depends on it, smem, nandc with smem-parser...)

Fix this by correctly adding the missing regmap_config and restore
function of hwspinlock on SFPB based devices with MMIO implementation.

Cc: stable@vger.kernel.org
Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Link: https://lore.kernel.org/r/20230716022804.21239-1-ansuelsmth@gmail.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older
SoCs") introduced and made regmap_config mandatory in the of_data struct
but didn't add the regmap_config for sfpb based devices.

SFPB based devices can both use the legacy syscon way to probe or the
new MMIO way and currently device that use the MMIO way are broken as
they lack the definition of the now required regmap_config and always
return -EINVAL (and indirectly makes fail probing everything that
depends on it, smem, nandc with smem-parser...)

Fix this by correctly adding the missing regmap_config and restore
function of hwspinlock on SFPB based devices with MMIO implementation.

Cc: stable@vger.kernel.org
Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Link: https://lore.kernel.org/r/20230716022804.21239-1-ansuelsmth@gmail.com
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: u8500: Convert to platform remove callback returning void</title>
<updated>2023-07-15T20:04:25+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-14T18:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9519793bb6a731a3dd2453ad8515e8866e84c48e'/>
<id>9519793bb6a731a3dd2453ad8515e8866e84c48e</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20230314180241.2865888-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20230314180241.2865888-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
