* [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver
@ 2025-09-17 13:19 Peng Fan
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
` (6 more replies)
0 siblings, 7 replies; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
This is the 2nd series to cleanup the driver.
Patch 1:
Fix the runtime usage. This is not critical bug fix, so it could be
defered to 6.18.
Patch 2-6:
Use devres managed API to cleanup the error handling path and remove path.
Tested on
i.MX8MP-EVK, i.MX8MM-EVK, i.MX93-11x11-EVK, i.MX8QXP-MEK, and i.MX8ULP-EVK.
There is still a 3rd patchset to do further cleanup. After this patchset
get reviewed, the 3rd patchset will be posted out to list.
Thanks to Daniel and Frank for the internal reviewing.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (6):
remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling
remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup
remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup
remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup
remoteproc: imx_rproc: Use devm_rproc_add() helper
drivers/remoteproc/imx_rproc.c | 128 ++++++++++++++++++-----------------------
1 file changed, 57 insertions(+), 71 deletions(-)
---
base-commit: c3067c2c38316c3ef013636c93daa285ee6aaa2e
change-id: 20250916-imx_rproc_c2-2b9ad7882f4d
Best regards,
--
Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:34 ` Frank Li
2025-09-22 16:07 ` Mathieu Poirier
2025-09-17 13:19 ` [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup Peng Fan
` (5 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
The order of runtime PM API calls in the remove path is wrong.
pm_runtime_put() should be called before pm_runtime_disable(), per the
runtime PM guidelines. Calling pm_runtime_disable() prematurely can
lead to incorrect reference counting and improper device suspend behavior.
Additionally, proper cleanup should be done when rproc_add() fails by
invoking both pm_runtime_put() and pm_runtime_disable() to avoid leaving
the device in an inconsistent power state.
With using devm_pm_runtime_enable() for automatic resource management and
introducing a devres-managed cleanup action imx_rproc_pm_runtime_put() to
enforce correct PM API usage and simplify error paths, the upper two
issues could be fixed. Also print out error log in case of error.
Fixes: a876a3aacc43 ("remoteproc: imx_rproc: detect and attach to pre-booted remote cores")
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Hiago De Franco <hiago.franco@toradex.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index bb25221a4a8987ff427d68e2a5535f0e156b0097..12305f36552fb5265b0953a099ea0d561880e3ff 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1046,6 +1046,13 @@ static int imx_rproc_sys_off_handler(struct sys_off_data *data)
return NOTIFY_DONE;
}
+static void imx_rproc_pm_runtime_put(void *data)
+{
+ struct device *dev = data;
+
+ pm_runtime_put(dev);
+}
+
static int imx_rproc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -1125,12 +1132,23 @@ static int imx_rproc_probe(struct platform_device *pdev)
}
if (dcfg->method == IMX_RPROC_SCU_API) {
- pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret) {
+ dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
+ goto err_put_clk;
+ }
+
ret = pm_runtime_resume_and_get(dev);
if (ret) {
dev_err(dev, "pm_runtime get failed: %d\n", ret);
goto err_put_clk;
}
+
+ ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
+ if (ret) {
+ dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
+ goto err_put_clk;
+ }
}
ret = rproc_add(rproc);
@@ -1158,10 +1176,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
struct rproc *rproc = platform_get_drvdata(pdev);
struct imx_rproc *priv = rproc->priv;
- if (priv->dcfg->method == IMX_RPROC_SCU_API) {
- pm_runtime_disable(priv->dev);
- pm_runtime_put(priv->dev);
- }
clk_disable_unprepare(priv->clk);
rproc_del(rproc);
imx_rproc_put_scu(rproc);
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:34 ` Frank Li
2025-09-17 13:19 ` [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup Peng Fan
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
Replace manual destroy_workqueue() calls in error and remove paths with a
devm_add_action_or_reset() helper. Ensure the workqueue is properly
cleaned up with the device lifecycle, and simplify error handling in probe
by removing now-unnecessary labels and cleanup steps.
No functional changes.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 12305f36552fb5265b0953a099ea0d561880e3ff..cc776f5d75f1f614943c05250877f17537837068 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1046,6 +1046,13 @@ static int imx_rproc_sys_off_handler(struct sys_off_data *data)
return NOTIFY_DONE;
}
+static void imx_rproc_destroy_workqueue(void *data)
+{
+ struct workqueue_struct *workqueue = data;
+
+ destroy_workqueue(workqueue);
+}
+
static void imx_rproc_pm_runtime_put(void *data)
{
struct device *dev = data;
@@ -1084,11 +1091,15 @@ static int imx_rproc_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ ret = devm_add_action_or_reset(dev, imx_rproc_destroy_workqueue, priv->workqueue);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to add devm destroy workqueue action\n");
+
INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
ret = imx_rproc_xtr_mbox_init(rproc, true);
if (ret)
- goto err_put_wkq;
+ return ret;
ret = imx_rproc_addr_init(priv, pdev);
if (ret) {
@@ -1165,8 +1176,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
imx_rproc_put_scu(rproc);
err_put_mbox:
imx_rproc_free_mbox(rproc);
-err_put_wkq:
- destroy_workqueue(priv->workqueue);
return ret;
}
@@ -1180,7 +1189,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
rproc_del(rproc);
imx_rproc_put_scu(rproc);
imx_rproc_free_mbox(rproc);
- destroy_workqueue(priv->workqueue);
}
static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
2025-09-17 13:19 ` [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:35 ` Frank Li
2025-09-17 13:19 ` [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup Peng Fan
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
Convert imx_rproc_free_mbox() to a devm-managed cleanup action using
devm_add_action_or_reset(). Ensure the mailbox resources are freed
automatically with the device lifecycle, simplify error handling and
removing the need for manual cleanup in probe and remove paths.
Also improve error reporting by using dev_err_probe() for consistency and
clarity.
No functional changes.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index cc776f5d75f1f614943c05250877f17537837068..e30b61ee39dacc88f9e938f8c6ffe61fef63dbda 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -93,7 +93,7 @@ struct imx_rproc_mem {
#define ATT_CORE(I) BIT((I))
static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block);
-static void imx_rproc_free_mbox(struct rproc *rproc);
+static void imx_rproc_free_mbox(void *data);
struct imx_rproc {
struct device *dev;
@@ -780,8 +780,9 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block)
return 0;
}
-static void imx_rproc_free_mbox(struct rproc *rproc)
+static void imx_rproc_free_mbox(void *data)
{
+ struct rproc *rproc = data;
struct imx_rproc *priv = rproc->priv;
if (priv->tx_ch) {
@@ -1101,15 +1102,18 @@ static int imx_rproc_probe(struct platform_device *pdev)
if (ret)
return ret;
+ ret = devm_add_action_or_reset(dev, imx_rproc_free_mbox, rproc);
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "Failed to add devm free mbox action: %d\n", ret);
+
ret = imx_rproc_addr_init(priv, pdev);
- if (ret) {
- dev_err(dev, "failed on imx_rproc_addr_init\n");
- goto err_put_mbox;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "failed on imx_rproc_addr_init\n");
ret = imx_rproc_detect_mode(priv);
if (ret)
- goto err_put_mbox;
+ return dev_err_probe(dev, ret, "failed on detect mode\n");
ret = imx_rproc_clk_enable(priv);
if (ret)
@@ -1174,8 +1178,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
clk_disable_unprepare(priv->clk);
err_put_scu:
imx_rproc_put_scu(rproc);
-err_put_mbox:
- imx_rproc_free_mbox(rproc);
return ret;
}
@@ -1188,7 +1190,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->clk);
rproc_del(rproc);
imx_rproc_put_scu(rproc);
- imx_rproc_free_mbox(rproc);
}
static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
` (2 preceding siblings ...)
2025-09-17 13:19 ` [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:36 ` Frank Li
2025-09-22 16:40 ` Mathieu Poirier
2025-09-17 13:19 ` [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup Peng Fan
` (2 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
Replace separate calls to devm_clk_get() and clk_prepare_enable() with
devm_clk_get_enabled(), which combines clock acquisition and enabling
into a single managed step. Simplify the probe logic and remove the need
for manual clock disable in error and remove paths.
Also, update error handling to eliminate redundant cleanup steps and use
return-based error propagation where appropriate. Improve code clarity and
reduce the chance of resource leaks or incorrect ordering in cleanup paths.
No functional changes.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index e30b61ee39dacc88f9e938f8c6ffe61fef63dbda..c6cfb308ddb376f370fd4492f8a84f734602bac8 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1006,26 +1006,19 @@ static int imx_rproc_clk_enable(struct imx_rproc *priv)
{
const struct imx_rproc_dcfg *dcfg = priv->dcfg;
struct device *dev = priv->dev;
- int ret;
/* Remote core is not under control of Linux or it is managed by SCU API */
if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_SCU_API)
return 0;
- priv->clk = devm_clk_get(dev, NULL);
- if (IS_ERR(priv->clk)) {
- dev_err(dev, "Failed to get clock\n");
- return PTR_ERR(priv->clk);
- }
-
/*
* clk for M4 block including memory. Should be
* enabled before .start for FW transfer.
*/
- ret = clk_prepare_enable(priv->clk);
- if (ret) {
+ priv->clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(priv->clk)) {
dev_err(dev, "Failed to enable clock\n");
- return ret;
+ return PTR_ERR(priv->clk);
}
return 0;
@@ -1134,7 +1127,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
imx_rproc_sys_off_handler, rproc);
if (ret) {
dev_err(dev, "register power off handler failure\n");
- goto err_put_clk;
+ goto err_put_scu;
}
ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE,
@@ -1142,7 +1135,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
imx_rproc_sys_off_handler, rproc);
if (ret) {
dev_err(dev, "register restart handler failure\n");
- goto err_put_clk;
+ goto err_put_scu;
}
}
@@ -1150,32 +1143,30 @@ static int imx_rproc_probe(struct platform_device *pdev)
ret = devm_pm_runtime_enable(dev);
if (ret) {
dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
- goto err_put_clk;
+ goto err_put_scu;
}
ret = pm_runtime_resume_and_get(dev);
if (ret) {
dev_err(dev, "pm_runtime get failed: %d\n", ret);
- goto err_put_clk;
+ goto err_put_scu;
}
ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
if (ret) {
dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
- goto err_put_clk;
+ goto err_put_scu;
}
}
ret = rproc_add(rproc);
if (ret) {
dev_err(dev, "rproc_add failed\n");
- goto err_put_clk;
+ goto err_put_scu;
}
return 0;
-err_put_clk:
- clk_disable_unprepare(priv->clk);
err_put_scu:
imx_rproc_put_scu(rproc);
@@ -1187,7 +1178,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
struct rproc *rproc = platform_get_drvdata(pdev);
struct imx_rproc *priv = rproc->priv;
- clk_disable_unprepare(priv->clk);
rproc_del(rproc);
imx_rproc_put_scu(rproc);
}
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
` (3 preceding siblings ...)
2025-09-17 13:19 ` [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:38 ` Frank Li
2025-09-17 13:19 ` [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper Peng Fan
2025-09-18 6:43 ` [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Daniel Baluta
6 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
Replace the explicit call to imx_rproc_put_scu() in the remove path with
devm_add_action_or_reset(). Ensure proper cleanup of scu resources and
simplify the code by leveraging the device-managed resource framework.
Additionally:
- Remove the IMX_RPROC_SCU_API check from imx_rproc_put_scu(), as
devm_add_action_or_reset() now exclusively handles SCU cleanup.
- Improve error reporting by using dev_err_probe() for consistency and
clarity.
- Drop the err_put_scu label, as it is now redundant due to the updated
error handling approach.
No functional changes.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 57 ++++++++++++++----------------------------
1 file changed, 19 insertions(+), 38 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index c6cfb308ddb376f370fd4492f8a84f734602bac8..a53ff186d218f54123e1ce740b0277a6fe95a902 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -796,13 +796,9 @@ static void imx_rproc_free_mbox(void *data)
}
}
-static void imx_rproc_put_scu(struct rproc *rproc)
+static void imx_rproc_put_scu(void *data)
{
- struct imx_rproc *priv = rproc->priv;
- const struct imx_rproc_dcfg *dcfg = priv->dcfg;
-
- if (dcfg->method != IMX_RPROC_SCU_API)
- return;
+ struct imx_rproc *priv = data;
if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) {
dev_pm_domain_detach_list(priv->pd_list);
@@ -944,6 +940,10 @@ static int imx_rproc_scu_api_detect_mode(struct rproc *rproc)
else
priv->core_index = 0;
+ ret = devm_add_action_or_reset(dev, imx_rproc_put_scu, priv);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to add action for put scu\n");
+
/*
* If Mcore resource is not owned by Acore partition, It is kicked by ROM,
* and Linux could only do IPC with Mcore and nothing else.
@@ -1110,7 +1110,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
ret = imx_rproc_clk_enable(priv);
if (ret)
- goto err_put_scu;
+ return dev_err_probe(dev, ret, "failed to enable clks\n");
if (rproc->state != RPROC_DETACHED)
rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot");
@@ -1125,61 +1125,42 @@ static int imx_rproc_probe(struct platform_device *pdev)
ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF_PREPARE,
SYS_OFF_PRIO_DEFAULT,
imx_rproc_sys_off_handler, rproc);
- if (ret) {
- dev_err(dev, "register power off handler failure\n");
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "register power off handler failure\n");
ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE,
SYS_OFF_PRIO_DEFAULT,
imx_rproc_sys_off_handler, rproc);
- if (ret) {
- dev_err(dev, "register restart handler failure\n");
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "register restart handler failure\n");
}
if (dcfg->method == IMX_RPROC_SCU_API) {
ret = devm_pm_runtime_enable(dev);
- if (ret) {
- dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
ret = pm_runtime_resume_and_get(dev);
- if (ret) {
- dev_err(dev, "pm_runtime get failed: %d\n", ret);
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "pm_runtime get failed\n");
ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
- if (ret) {
- dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to add devm disable pm action\n");
}
ret = rproc_add(rproc);
- if (ret) {
- dev_err(dev, "rproc_add failed\n");
- goto err_put_scu;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "rproc_add failed\n");
return 0;
-
-err_put_scu:
- imx_rproc_put_scu(rproc);
-
- return ret;
}
static void imx_rproc_remove(struct platform_device *pdev)
{
struct rproc *rproc = platform_get_drvdata(pdev);
- struct imx_rproc *priv = rproc->priv;
rproc_del(rproc);
- imx_rproc_put_scu(rproc);
}
static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
` (4 preceding siblings ...)
2025-09-17 13:19 ` [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup Peng Fan
@ 2025-09-17 13:19 ` Peng Fan
2025-09-17 14:38 ` Frank Li
2025-09-18 6:43 ` [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Daniel Baluta
6 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2025-09-17 13:19 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco
Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan
Replace manual rproc_add() and cleanup logic with devm_rproc_add(), which
ties the remoteproc lifecycle to the device's lifecycle. This simplifies
error handling and ensures proper cleanup.
With no need to invoke rproc_del(), the remove() ops could be removed.
No functional changes.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index a53ff186d218f54123e1ce740b0277a6fe95a902..694fbbb2f34061de22a3a815f8a6114159585f9e 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1149,20 +1149,13 @@ static int imx_rproc_probe(struct platform_device *pdev)
return dev_err_probe(dev, ret, "Failed to add devm disable pm action\n");
}
- ret = rproc_add(rproc);
+ ret = devm_rproc_add(dev, rproc);
if (ret)
return dev_err_probe(dev, ret, "rproc_add failed\n");
return 0;
}
-static void imx_rproc_remove(struct platform_device *pdev)
-{
- struct rproc *rproc = platform_get_drvdata(pdev);
-
- rproc_del(rproc);
-}
-
static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
.start = imx_rproc_arm_smc_start,
.stop = imx_rproc_arm_smc_stop,
@@ -1288,7 +1281,6 @@ MODULE_DEVICE_TABLE(of, imx_rproc_of_match);
static struct platform_driver imx_rproc_driver = {
.probe = imx_rproc_probe,
- .remove = imx_rproc_remove,
.driver = {
.name = "imx-rproc",
.of_match_table = imx_rproc_of_match,
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
@ 2025-09-17 14:34 ` Frank Li
2025-09-22 16:07 ` Mathieu Poirier
1 sibling, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:34 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:13PM +0800, Peng Fan wrote:
> The order of runtime PM API calls in the remove path is wrong.
> pm_runtime_put() should be called before pm_runtime_disable(), per the
> runtime PM guidelines. Calling pm_runtime_disable() prematurely can
> lead to incorrect reference counting and improper device suspend behavior.
>
> Additionally, proper cleanup should be done when rproc_add() fails by
> invoking both pm_runtime_put() and pm_runtime_disable() to avoid leaving
> the device in an inconsistent power state.
>
> With using devm_pm_runtime_enable() for automatic resource management and
> introducing a devres-managed cleanup action imx_rproc_pm_runtime_put() to
> enforce correct PM API usage and simplify error paths, the upper two
> issues could be fixed. Also print out error log in case of error.
>
> Fixes: a876a3aacc43 ("remoteproc: imx_rproc: detect and attach to pre-booted remote cores")
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Hiago De Franco <hiago.franco@toradex.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index bb25221a4a8987ff427d68e2a5535f0e156b0097..12305f36552fb5265b0953a099ea0d561880e3ff 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1046,6 +1046,13 @@ static int imx_rproc_sys_off_handler(struct sys_off_data *data)
> return NOTIFY_DONE;
> }
>
> +static void imx_rproc_pm_runtime_put(void *data)
> +{
> + struct device *dev = data;
> +
> + pm_runtime_put(dev);
> +}
> +
> static int imx_rproc_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -1125,12 +1132,23 @@ static int imx_rproc_probe(struct platform_device *pdev)
> }
>
> if (dcfg->method == IMX_RPROC_SCU_API) {
> - pm_runtime_enable(dev);
> + ret = devm_pm_runtime_enable(dev);
> + if (ret) {
> + dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
> + goto err_put_clk;
> + }
> +
> ret = pm_runtime_resume_and_get(dev);
> if (ret) {
> dev_err(dev, "pm_runtime get failed: %d\n", ret);
> goto err_put_clk;
> }
> +
> + ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
> + if (ret) {
> + dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
> + goto err_put_clk;
> + }
> }
>
> ret = rproc_add(rproc);
> @@ -1158,10 +1176,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> struct rproc *rproc = platform_get_drvdata(pdev);
> struct imx_rproc *priv = rproc->priv;
>
> - if (priv->dcfg->method == IMX_RPROC_SCU_API) {
> - pm_runtime_disable(priv->dev);
> - pm_runtime_put(priv->dev);
> - }
> clk_disable_unprepare(priv->clk);
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup
2025-09-17 13:19 ` [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup Peng Fan
@ 2025-09-17 14:34 ` Frank Li
0 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:34 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:14PM +0800, Peng Fan wrote:
> Replace manual destroy_workqueue() calls in error and remove paths with a
> devm_add_action_or_reset() helper. Ensure the workqueue is properly
> cleaned up with the device lifecycle, and simplify error handling in probe
> by removing now-unnecessary labels and cleanup steps.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 12305f36552fb5265b0953a099ea0d561880e3ff..cc776f5d75f1f614943c05250877f17537837068 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1046,6 +1046,13 @@ static int imx_rproc_sys_off_handler(struct sys_off_data *data)
> return NOTIFY_DONE;
> }
>
> +static void imx_rproc_destroy_workqueue(void *data)
> +{
> + struct workqueue_struct *workqueue = data;
> +
> + destroy_workqueue(workqueue);
> +}
> +
> static void imx_rproc_pm_runtime_put(void *data)
> {
> struct device *dev = data;
> @@ -1084,11 +1091,15 @@ static int imx_rproc_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> + ret = devm_add_action_or_reset(dev, imx_rproc_destroy_workqueue, priv->workqueue);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to add devm destroy workqueue action\n");
> +
> INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
>
> ret = imx_rproc_xtr_mbox_init(rproc, true);
> if (ret)
> - goto err_put_wkq;
> + return ret;
>
> ret = imx_rproc_addr_init(priv, pdev);
> if (ret) {
> @@ -1165,8 +1176,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
> imx_rproc_put_scu(rproc);
> err_put_mbox:
> imx_rproc_free_mbox(rproc);
> -err_put_wkq:
> - destroy_workqueue(priv->workqueue);
>
> return ret;
> }
> @@ -1180,7 +1189,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
> imx_rproc_free_mbox(rproc);
> - destroy_workqueue(priv->workqueue);
> }
>
> static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup
2025-09-17 13:19 ` [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup Peng Fan
@ 2025-09-17 14:35 ` Frank Li
0 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:35 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:15PM +0800, Peng Fan wrote:
> Convert imx_rproc_free_mbox() to a devm-managed cleanup action using
> devm_add_action_or_reset(). Ensure the mailbox resources are freed
> automatically with the device lifecycle, simplify error handling and
> removing the need for manual cleanup in probe and remove paths.
>
> Also improve error reporting by using dev_err_probe() for consistency and
> clarity.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 21 +++++++++++----------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index cc776f5d75f1f614943c05250877f17537837068..e30b61ee39dacc88f9e938f8c6ffe61fef63dbda 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -93,7 +93,7 @@ struct imx_rproc_mem {
> #define ATT_CORE(I) BIT((I))
>
> static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block);
> -static void imx_rproc_free_mbox(struct rproc *rproc);
> +static void imx_rproc_free_mbox(void *data);
>
> struct imx_rproc {
> struct device *dev;
> @@ -780,8 +780,9 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block)
> return 0;
> }
>
> -static void imx_rproc_free_mbox(struct rproc *rproc)
> +static void imx_rproc_free_mbox(void *data)
> {
> + struct rproc *rproc = data;
> struct imx_rproc *priv = rproc->priv;
>
> if (priv->tx_ch) {
> @@ -1101,15 +1102,18 @@ static int imx_rproc_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> + ret = devm_add_action_or_reset(dev, imx_rproc_free_mbox, rproc);
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "Failed to add devm free mbox action: %d\n", ret);
> +
> ret = imx_rproc_addr_init(priv, pdev);
> - if (ret) {
> - dev_err(dev, "failed on imx_rproc_addr_init\n");
> - goto err_put_mbox;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "failed on imx_rproc_addr_init\n");
>
> ret = imx_rproc_detect_mode(priv);
> if (ret)
> - goto err_put_mbox;
> + return dev_err_probe(dev, ret, "failed on detect mode\n");
>
> ret = imx_rproc_clk_enable(priv);
> if (ret)
> @@ -1174,8 +1178,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
> clk_disable_unprepare(priv->clk);
> err_put_scu:
> imx_rproc_put_scu(rproc);
> -err_put_mbox:
> - imx_rproc_free_mbox(rproc);
>
> return ret;
> }
> @@ -1188,7 +1190,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> clk_disable_unprepare(priv->clk);
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
> - imx_rproc_free_mbox(rproc);
> }
>
> static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
2025-09-17 13:19 ` [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup Peng Fan
@ 2025-09-17 14:36 ` Frank Li
2025-09-22 16:40 ` Mathieu Poirier
1 sibling, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:36 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:16PM +0800, Peng Fan wrote:
> Replace separate calls to devm_clk_get() and clk_prepare_enable() with
> devm_clk_get_enabled(), which combines clock acquisition and enabling
> into a single managed step. Simplify the probe logic and remove the need
> for manual clock disable in error and remove paths.
>
> Also, update error handling to eliminate redundant cleanup steps and use
> return-based error propagation where appropriate. Improve code clarity and
> reduce the chance of resource leaks or incorrect ordering in cleanup paths.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index e30b61ee39dacc88f9e938f8c6ffe61fef63dbda..c6cfb308ddb376f370fd4492f8a84f734602bac8 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1006,26 +1006,19 @@ static int imx_rproc_clk_enable(struct imx_rproc *priv)
> {
> const struct imx_rproc_dcfg *dcfg = priv->dcfg;
> struct device *dev = priv->dev;
> - int ret;
>
> /* Remote core is not under control of Linux or it is managed by SCU API */
> if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_SCU_API)
> return 0;
>
> - priv->clk = devm_clk_get(dev, NULL);
> - if (IS_ERR(priv->clk)) {
> - dev_err(dev, "Failed to get clock\n");
> - return PTR_ERR(priv->clk);
> - }
> -
> /*
> * clk for M4 block including memory. Should be
> * enabled before .start for FW transfer.
> */
> - ret = clk_prepare_enable(priv->clk);
> - if (ret) {
> + priv->clk = devm_clk_get_enabled(dev, NULL);
> + if (IS_ERR(priv->clk)) {
> dev_err(dev, "Failed to enable clock\n");
> - return ret;
> + return PTR_ERR(priv->clk);
> }
>
> return 0;
> @@ -1134,7 +1127,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
> imx_rproc_sys_off_handler, rproc);
> if (ret) {
> dev_err(dev, "register power off handler failure\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE,
> @@ -1142,7 +1135,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
> imx_rproc_sys_off_handler, rproc);
> if (ret) {
> dev_err(dev, "register restart handler failure\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
> }
>
> @@ -1150,32 +1143,30 @@ static int imx_rproc_probe(struct platform_device *pdev)
> ret = devm_pm_runtime_enable(dev);
> if (ret) {
> dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = pm_runtime_resume_and_get(dev);
> if (ret) {
> dev_err(dev, "pm_runtime get failed: %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
> if (ret) {
> dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
> }
>
> ret = rproc_add(rproc);
> if (ret) {
> dev_err(dev, "rproc_add failed\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> return 0;
>
> -err_put_clk:
> - clk_disable_unprepare(priv->clk);
> err_put_scu:
> imx_rproc_put_scu(rproc);
>
> @@ -1187,7 +1178,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> struct rproc *rproc = platform_get_drvdata(pdev);
> struct imx_rproc *priv = rproc->priv;
>
> - clk_disable_unprepare(priv->clk);
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
> }
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup
2025-09-17 13:19 ` [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup Peng Fan
@ 2025-09-17 14:38 ` Frank Li
0 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:38 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:17PM +0800, Peng Fan wrote:
> Replace the explicit call to imx_rproc_put_scu() in the remove path with
> devm_add_action_or_reset(). Ensure proper cleanup of scu resources and
> simplify the code by leveraging the device-managed resource framework.
>
> Additionally:
> - Remove the IMX_RPROC_SCU_API check from imx_rproc_put_scu(), as
> devm_add_action_or_reset() now exclusively handles SCU cleanup.
> - Improve error reporting by using dev_err_probe() for consistency and
> clarity.
> - Drop the err_put_scu label, as it is now redundant due to the updated
> error handling approach.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 57 ++++++++++++++----------------------------
> 1 file changed, 19 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index c6cfb308ddb376f370fd4492f8a84f734602bac8..a53ff186d218f54123e1ce740b0277a6fe95a902 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -796,13 +796,9 @@ static void imx_rproc_free_mbox(void *data)
> }
> }
>
> -static void imx_rproc_put_scu(struct rproc *rproc)
> +static void imx_rproc_put_scu(void *data)
> {
> - struct imx_rproc *priv = rproc->priv;
> - const struct imx_rproc_dcfg *dcfg = priv->dcfg;
> -
> - if (dcfg->method != IMX_RPROC_SCU_API)
> - return;
> + struct imx_rproc *priv = data;
>
> if (imx_sc_rm_is_resource_owned(priv->ipc_handle, priv->rsrc_id)) {
> dev_pm_domain_detach_list(priv->pd_list);
> @@ -944,6 +940,10 @@ static int imx_rproc_scu_api_detect_mode(struct rproc *rproc)
> else
> priv->core_index = 0;
>
> + ret = devm_add_action_or_reset(dev, imx_rproc_put_scu, priv);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to add action for put scu\n");
> +
> /*
> * If Mcore resource is not owned by Acore partition, It is kicked by ROM,
> * and Linux could only do IPC with Mcore and nothing else.
> @@ -1110,7 +1110,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
>
> ret = imx_rproc_clk_enable(priv);
> if (ret)
> - goto err_put_scu;
> + return dev_err_probe(dev, ret, "failed to enable clks\n");
>
> if (rproc->state != RPROC_DETACHED)
> rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot");
> @@ -1125,61 +1125,42 @@ static int imx_rproc_probe(struct platform_device *pdev)
> ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF_PREPARE,
> SYS_OFF_PRIO_DEFAULT,
> imx_rproc_sys_off_handler, rproc);
> - if (ret) {
> - dev_err(dev, "register power off handler failure\n");
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "register power off handler failure\n");
>
> ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE,
> SYS_OFF_PRIO_DEFAULT,
> imx_rproc_sys_off_handler, rproc);
> - if (ret) {
> - dev_err(dev, "register restart handler failure\n");
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "register restart handler failure\n");
> }
>
> if (dcfg->method == IMX_RPROC_SCU_API) {
> ret = devm_pm_runtime_enable(dev);
> - if (ret) {
> - dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
>
> ret = pm_runtime_resume_and_get(dev);
> - if (ret) {
> - dev_err(dev, "pm_runtime get failed: %d\n", ret);
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "pm_runtime get failed\n");
>
> ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
> - if (ret) {
> - dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to add devm disable pm action\n");
> }
>
> ret = rproc_add(rproc);
> - if (ret) {
> - dev_err(dev, "rproc_add failed\n");
> - goto err_put_scu;
> - }
> + if (ret)
> + return dev_err_probe(dev, ret, "rproc_add failed\n");
>
> return 0;
> -
> -err_put_scu:
> - imx_rproc_put_scu(rproc);
> -
> - return ret;
> }
>
> static void imx_rproc_remove(struct platform_device *pdev)
> {
> struct rproc *rproc = platform_get_drvdata(pdev);
> - struct imx_rproc *priv = rproc->priv;
>
> rproc_del(rproc);
> - imx_rproc_put_scu(rproc);
> }
>
> static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper
2025-09-17 13:19 ` [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper Peng Fan
@ 2025-09-17 14:38 ` Frank Li
0 siblings, 0 replies; 18+ messages in thread
From: Frank Li @ 2025-09-17 14:38 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 09:19:18PM +0800, Peng Fan wrote:
> Replace manual rproc_add() and cleanup logic with devm_rproc_add(), which
> ties the remoteproc lifecycle to the device's lifecycle. This simplifies
> error handling and ensures proper cleanup.
>
> With no need to invoke rproc_del(), the remove() ops could be removed.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index a53ff186d218f54123e1ce740b0277a6fe95a902..694fbbb2f34061de22a3a815f8a6114159585f9e 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1149,20 +1149,13 @@ static int imx_rproc_probe(struct platform_device *pdev)
> return dev_err_probe(dev, ret, "Failed to add devm disable pm action\n");
> }
>
> - ret = rproc_add(rproc);
> + ret = devm_rproc_add(dev, rproc);
> if (ret)
> return dev_err_probe(dev, ret, "rproc_add failed\n");
>
> return 0;
> }
>
> -static void imx_rproc_remove(struct platform_device *pdev)
> -{
> - struct rproc *rproc = platform_get_drvdata(pdev);
> -
> - rproc_del(rproc);
> -}
> -
> static const struct imx_rproc_plat_ops imx_rproc_ops_arm_smc = {
> .start = imx_rproc_arm_smc_start,
> .stop = imx_rproc_arm_smc_stop,
> @@ -1288,7 +1281,6 @@ MODULE_DEVICE_TABLE(of, imx_rproc_of_match);
>
> static struct platform_driver imx_rproc_driver = {
> .probe = imx_rproc_probe,
> - .remove = imx_rproc_remove,
> .driver = {
> .name = "imx-rproc",
> .of_match_table = imx_rproc_of_match,
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
` (5 preceding siblings ...)
2025-09-17 13:19 ` [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper Peng Fan
@ 2025-09-18 6:43 ` Daniel Baluta
6 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2025-09-18 6:43 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 17, 2025 at 4:33 PM Peng Fan <peng.fan@nxp.com> wrote:
>
> This is the 2nd series to cleanup the driver.
>
> Patch 1:
> Fix the runtime usage. This is not critical bug fix, so it could be
> defered to 6.18.
>
> Patch 2-6:
> Use devres managed API to cleanup the error handling path and remove path.
>
> Tested on
> i.MX8MP-EVK, i.MX8MM-EVK, i.MX93-11x11-EVK, i.MX8QXP-MEK, and i.MX8ULP-EVK.
>
> There is still a 3rd patchset to do further cleanup. After this patchset
> get reviewed, the 3rd patchset will be posted out to list.
>
> Thanks to Daniel and Frank for the internal reviewing.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
For the entire patchseries:
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
2025-09-17 14:34 ` Frank Li
@ 2025-09-22 16:07 ` Mathieu Poirier
2025-09-23 4:31 ` Peng Fan
1 sibling, 1 reply; 18+ messages in thread
From: Mathieu Poirier @ 2025-09-22 16:07 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Ulf Hansson, Hiago De Franco, linux-remoteproc,
imx, linux-arm-kernel, linux-kernel
On Wed, Sep 17, 2025 at 09:19:13PM +0800, Peng Fan wrote:
> The order of runtime PM API calls in the remove path is wrong.
> pm_runtime_put() should be called before pm_runtime_disable(), per the
> runtime PM guidelines.
Where is this mentioned? I have looked in [1] and couldn't find anything.
[1]. Documentation/power/runtime_pm.rst
> Calling pm_runtime_disable() prematurely can
> lead to incorrect reference counting and improper device suspend behavior.
>
> Additionally, proper cleanup should be done when rproc_add() fails by
> invoking both pm_runtime_put() and pm_runtime_disable() to avoid leaving
> the device in an inconsistent power state.
>
> With using devm_pm_runtime_enable() for automatic resource management and
> introducing a devres-managed cleanup action imx_rproc_pm_runtime_put() to
> enforce correct PM API usage and simplify error paths, the upper two
> issues could be fixed. Also print out error log in case of error.
>
> Fixes: a876a3aacc43 ("remoteproc: imx_rproc: detect and attach to pre-booted remote cores")
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Hiago De Franco <hiago.franco@toradex.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index bb25221a4a8987ff427d68e2a5535f0e156b0097..12305f36552fb5265b0953a099ea0d561880e3ff 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1046,6 +1046,13 @@ static int imx_rproc_sys_off_handler(struct sys_off_data *data)
> return NOTIFY_DONE;
> }
>
> +static void imx_rproc_pm_runtime_put(void *data)
> +{
> + struct device *dev = data;
> +
> + pm_runtime_put(dev);
> +}
> +
> static int imx_rproc_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -1125,12 +1132,23 @@ static int imx_rproc_probe(struct platform_device *pdev)
> }
>
> if (dcfg->method == IMX_RPROC_SCU_API) {
> - pm_runtime_enable(dev);
> + ret = devm_pm_runtime_enable(dev);
> + if (ret) {
> + dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
> + goto err_put_clk;
> + }
> +
> ret = pm_runtime_resume_and_get(dev);
> if (ret) {
> dev_err(dev, "pm_runtime get failed: %d\n", ret);
> goto err_put_clk;
> }
> +
> + ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
> + if (ret) {
> + dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
> + goto err_put_clk;
> + }
> }
>
> ret = rproc_add(rproc);
> @@ -1158,10 +1176,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> struct rproc *rproc = platform_get_drvdata(pdev);
> struct imx_rproc *priv = rproc->priv;
>
> - if (priv->dcfg->method == IMX_RPROC_SCU_API) {
> - pm_runtime_disable(priv->dev);
> - pm_runtime_put(priv->dev);
> - }
> clk_disable_unprepare(priv->clk);
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
2025-09-17 13:19 ` [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup Peng Fan
2025-09-17 14:36 ` Frank Li
@ 2025-09-22 16:40 ` Mathieu Poirier
2025-09-23 4:33 ` Peng Fan
1 sibling, 1 reply; 18+ messages in thread
From: Mathieu Poirier @ 2025-09-22 16:40 UTC (permalink / raw)
To: Peng Fan
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Ulf Hansson, Hiago De Franco, linux-remoteproc,
imx, linux-arm-kernel, linux-kernel
On Wed, Sep 17, 2025 at 09:19:16PM +0800, Peng Fan wrote:
> Replace separate calls to devm_clk_get() and clk_prepare_enable() with
> devm_clk_get_enabled(), which combines clock acquisition and enabling
> into a single managed step. Simplify the probe logic and remove the need
> for manual clock disable in error and remove paths.
>
> Also, update error handling to eliminate redundant cleanup steps and use
> return-based error propagation where appropriate. Improve code clarity and
> reduce the chance of resource leaks or incorrect ordering in cleanup paths.
>
> No functional changes.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index e30b61ee39dacc88f9e938f8c6ffe61fef63dbda..c6cfb308ddb376f370fd4492f8a84f734602bac8 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -1006,26 +1006,19 @@ static int imx_rproc_clk_enable(struct imx_rproc *priv)
> {
> const struct imx_rproc_dcfg *dcfg = priv->dcfg;
> struct device *dev = priv->dev;
> - int ret;
>
> /* Remote core is not under control of Linux or it is managed by SCU API */
> if (dcfg->method == IMX_RPROC_NONE || dcfg->method == IMX_RPROC_SCU_API)
> return 0;
>
> - priv->clk = devm_clk_get(dev, NULL);
> - if (IS_ERR(priv->clk)) {
> - dev_err(dev, "Failed to get clock\n");
> - return PTR_ERR(priv->clk);
> - }
> -
> /*
> * clk for M4 block including memory. Should be
> * enabled before .start for FW transfer.
> */
> - ret = clk_prepare_enable(priv->clk);
> - if (ret) {
> + priv->clk = devm_clk_get_enabled(dev, NULL);
> + if (IS_ERR(priv->clk)) {
> dev_err(dev, "Failed to enable clock\n");
> - return ret;
> + return PTR_ERR(priv->clk);
> }
>
> return 0;
> @@ -1134,7 +1127,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
> imx_rproc_sys_off_handler, rproc);
> if (ret) {
> dev_err(dev, "register power off handler failure\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE,
> @@ -1142,7 +1135,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
> imx_rproc_sys_off_handler, rproc);
> if (ret) {
> dev_err(dev, "register restart handler failure\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
> }
>
> @@ -1150,32 +1143,30 @@ static int imx_rproc_probe(struct platform_device *pdev)
> ret = devm_pm_runtime_enable(dev);
> if (ret) {
> dev_err(dev, "Failed to enable runtime PM, %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = pm_runtime_resume_and_get(dev);
> if (ret) {
> dev_err(dev, "pm_runtime get failed: %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> ret = devm_add_action_or_reset(dev, imx_rproc_pm_runtime_put, dev);
> if (ret) {
> dev_err(dev, "Failed to add devm disable pm action: %d\n", ret);
> - goto err_put_clk;
> + goto err_put_scu;
> }
> }
>
> ret = rproc_add(rproc);
> if (ret) {
> dev_err(dev, "rproc_add failed\n");
> - goto err_put_clk;
> + goto err_put_scu;
> }
>
> return 0;
>
> -err_put_clk:
> - clk_disable_unprepare(priv->clk);
> err_put_scu:
> imx_rproc_put_scu(rproc);
>
> @@ -1187,7 +1178,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
> struct rproc *rproc = platform_get_drvdata(pdev);
> struct imx_rproc *priv = rproc->priv;
>
> - clk_disable_unprepare(priv->clk);
/home/mpoirier/work/remoteproc/kernel/drivers/remoteproc/imx_rproc.c: In
function ‘imx_rproc_remove’:
/home/mpoirier/work/remoteproc/kernel/drivers/remoteproc/imx_rproc.c:1179:27:
warning: unused variable ‘priv’ [-Wunused-variable]
1179 | struct imx_rproc *priv = rproc->priv;
| ^~~~
AR drivers/remoteproc/built-in.a
AR drivers/built-in.a
AR kernel/module/built-in.a
AR kernel/built-in.a
> rproc_del(rproc);
> imx_rproc_put_scu(rproc);
> }
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling
2025-09-22 16:07 ` Mathieu Poirier
@ 2025-09-23 4:31 ` Peng Fan
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2025-09-23 4:31 UTC (permalink / raw)
To: Mathieu Poirier
Cc: Peng Fan, Bjorn Andersson, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Mon, Sep 22, 2025 at 10:07:08AM -0600, Mathieu Poirier wrote:
>On Wed, Sep 17, 2025 at 09:19:13PM +0800, Peng Fan wrote:
>> The order of runtime PM API calls in the remove path is wrong.
>> pm_runtime_put() should be called before pm_runtime_disable(), per the
>> runtime PM guidelines.
>
>Where is this mentioned? I have looked in [1] and couldn't find anything.
>
>[1]. Documentation/power/runtime_pm.rst
>
Per this API says:
int pm_runtime_disable(struct device *dev);`
- increment the device's 'power.disable_depth' field (if the value of that
field was previously zero, this prevents subsystem-level runtime PM
callbacks from being run for the device), make sure that all of the
pending runtime PM operations on the device are either completed or
canceled;
This implies that pm_runtime_put() should be called before pm_runtime_disable().
Thanks,
Peng
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
2025-09-22 16:40 ` Mathieu Poirier
@ 2025-09-23 4:33 ` Peng Fan
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2025-09-23 4:33 UTC (permalink / raw)
To: Mathieu Poirier
Cc: Peng Fan, Bjorn Andersson, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ulf Hansson,
Hiago De Franco, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel
On Mon, Sep 22, 2025 at 10:40:58AM -0600, Mathieu Poirier wrote:
>On Wed, Sep 17, 2025 at 09:19:16PM +0800, Peng Fan wrote:
>> Replace separate calls to devm_clk_get() and clk_prepare_enable() with
...
>>
>> @@ -1187,7 +1178,6 @@ static void imx_rproc_remove(struct platform_device *pdev)
>> struct rproc *rproc = platform_get_drvdata(pdev);
>> struct imx_rproc *priv = rproc->priv;
>>
>> - clk_disable_unprepare(priv->clk);
>
>/home/mpoirier/work/remoteproc/kernel/drivers/remoteproc/imx_rproc.c: In
>function ???imx_rproc_remove???:
>/home/mpoirier/work/remoteproc/kernel/drivers/remoteproc/imx_rproc.c:1179:27:
>warning: unused variable ???priv??? [-Wunused-variable]
> 1179 | struct imx_rproc *priv = rproc->priv;
> | ^~~~
Oops, this variable is removed in patch 5/6 which should be in this patch.
V2 will have this fixed.
Thanks,
Peng
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-09-23 3:22 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 13:19 [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Peng Fan
2025-09-17 13:19 ` [PATCH 1/6] remoteproc: imx_rproc: Fix runtime PM cleanup order and error handling Peng Fan
2025-09-17 14:34 ` Frank Li
2025-09-22 16:07 ` Mathieu Poirier
2025-09-23 4:31 ` Peng Fan
2025-09-17 13:19 ` [PATCH 2/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for workqueue cleanup Peng Fan
2025-09-17 14:34 ` Frank Li
2025-09-17 13:19 ` [PATCH 3/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup Peng Fan
2025-09-17 14:35 ` Frank Li
2025-09-17 13:19 ` [PATCH 4/6] remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup Peng Fan
2025-09-17 14:36 ` Frank Li
2025-09-22 16:40 ` Mathieu Poirier
2025-09-23 4:33 ` Peng Fan
2025-09-17 13:19 ` [PATCH 5/6] remoteproc: imx_rproc: Use devm_add_action_or_reset() for scu cleanup Peng Fan
2025-09-17 14:38 ` Frank Li
2025-09-17 13:19 ` [PATCH 6/6] remoteproc: imx_rproc: Use devm_rproc_add() helper Peng Fan
2025-09-17 14:38 ` Frank Li
2025-09-18 6:43 ` [PATCH 0/6] remoteproc: imx_rproc: Use device managed API to clean up the driver Daniel Baluta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).