73100deb | 29-May-2024 |
Richard Maina <quic_rmaina@quicinc.com> |
hwspinlock: qcom: implement bust operation
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-of
hwspinlock: qcom: implement bust operation
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 <quic_rmaina@quicinc.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Chris Lew <quic_clew@quicinc.com> Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
cebaa386 | 08-Feb-2024 |
Andrew Davis <afd@ti.com> |
hwspinlock: omap: Use index to get hwspinlock pointer
For loops with multiple initializers and increments are hard to read and reason about, simplify this by using the looping index to index into th
hwspinlock: omap: Use index to get hwspinlock pointer
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 <afd@ti.com> Link: https://lore.kernel.org/r/20240208165114.63148-4-afd@ti.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
8781ec87 | 08-Feb-2024 |
Andrew Davis <afd@ti.com> |
hwspinlock: omap: Use devm_hwspin_lock_register() helper
This will unregister the HW spinlock on module exit automatically for us, currently we manually unregister which can be error-prone if not do
hwspinlock: omap: Use devm_hwspin_lock_register() helper
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 <afd@ti.com> Link: https://lore.kernel.org/r/20240208165114.63148-3-afd@ti.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
25f7d74d | 08-Feb-2024 |
Andrew Davis <afd@ti.com> |
hwspinlock: omap: Use devm_pm_runtime_enable() helper
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 t
hwspinlock: omap: Use devm_pm_runtime_enable() helper
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 <afd@ti.com> Link: https://lore.kernel.org/r/20240208165114.63148-2-afd@ti.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
bcd0f5d1 | 06-Dec-2023 |
Randy Dunlap <rdunlap@infradead.org> |
hwspinlock/core: fix kernel-doc warnings
Correct function comments to prevent kernel-doc warnings found when using "W=1".
hwspinlock_core.c:208: warning: Excess function parameter 'timeout' descrip
hwspinlock/core: fix kernel-doc warnings
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 <rdunlap@infradead.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <andersson@kernel.org> Cc: Baolin Wang <baolin.wang7@gmail.com> Cc: linux-remoteproc@vger.kernel.org Link: https://lore.kernel.org/r/20231206055439.671-1-rdunlap@infradead.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
23316be8 | 16-Jul-2023 |
Christian Marangi <ansuelsmth@gmail.com> |
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") introduced and made regmap_config mandatory in t
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
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 <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20230716022804.21239-1-ansuelsmth@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
9519793b | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: u8500: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do e
hwspinlock: u8500: Convert to platform remove callback returning void
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 <u.kleine-koenig@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180241.2865888-1-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
4cf16b6b | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: omap: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do er
hwspinlock: omap: Convert to platform remove callback returning void
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 <u.kleine-koenig@pengutronix.de> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180100.2865801-2-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
72a3a509 | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: omap: Emit only one error message for errors in .remove()
If a remove callback of a platform driver returns a non-zero value, the driver core emits an error message, otherwise ignores th
hwspinlock: omap: Emit only one error message for errors in .remove()
If a remove callback of a platform driver returns a non-zero value, the driver core emits an error message, otherwise ignores the value and completes unbinding the device.
As omap_hwspinlock_remove() already emits an error message, suppress the core's error message by returning zero.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180100.2865801-1-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
5d4753f7 | 09-Sep-2022 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
hwspinlock: qcom: add support for MMIO on older SoCs
Older Qualcomm SoCs have TCSR mutex registers with 0x80 stride, instead of 0x1000. Add dedicated compatibles and regmap for such case.
Signed-o
hwspinlock: qcom: add support for MMIO on older SoCs
Older Qualcomm SoCs have TCSR mutex registers with 0x80 stride, instead of 0x1000. Add dedicated compatibles and regmap for such case.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20220909092035.223915-5-krzysztof.kozlowski@linaro.org
show more ...
|
cdab30b4 | 07-Jul-2022 |
Christian Marangi <ansuelsmth@gmail.com> |
hwspinlock: qcom: Add support for mmio usage to sfpb-mutex
Allow sfpb-mutex to use mmio in addition to syscon.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Bjorn Andersson <
hwspinlock: qcom: Add support for mmio usage to sfpb-mutex
Allow sfpb-mutex to use mmio in addition to syscon.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220707102040.1859-1-ansuelsmth@gmail.com
show more ...
|
9a413589 | 25-Jan-2022 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows
hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows.
Also, address the following sparse warnings: drivers/hwspinlock/sprd_hwspinlock.c:96:36: warning: using sizeof on a flexible structure
Link: https://github.com/KSPP/linux/issues/174 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220125225723.GA78256@embeddedor
show more ...
|