public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Defer TI's Remoteproc's Probe until Mailbox is Probed
@ 2024-08-08  7:41 Beleswar Padhi
  2024-08-08  7:41 ` [PATCH v4 1/3] remoteproc: k3-r5: Use devm_rproc_alloc() helper Beleswar Padhi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Beleswar Padhi @ 2024-08-08  7:41 UTC (permalink / raw)
  To: andersson, mathieu.poirier, afd
  Cc: hnagalla, u-kumar1, s-anna, linux-remoteproc, linux-kernel

Hello All,

This series adds deferred probe functionality in the TI's Remoteproc
drivers. The remoteproc drivers are dependent on the omap-mailbox driver
for mbox functionalities. Sometimes, the remoteproc driver could be
probed before the mailbox driver leading to rproc boot failures. Thus,
defer the probe routine of remoteproc drivers until mailbox driver is
probed by checking the mbox_request_channel handle in probe. 

Also, use the acquired mbox handle in probe during rproc start/attach
routine instead of re-requesting. Do not free mbox handle during
stop/detach routine or error paths. This makes our k3_rproc_attach() &
k3_rproc_detach() functions NOP.

Also, use the devm_rproc_alloc() helper to automatically free created
rprocs incase of a probe defer.

v4: Changelog:
* Andrew
1) Removed "Fixes:" tag in PATCH 01 and PATCH 02 of series as these are
improvements.
2) Removed NULL assignment to core->rproc to avoid possible nullptr
dereference while checking core state at a later stage.

Link to v3:
https://lore.kernel.org/all/20240807062256.1721682-1-b-padhi@ti.com/

v3: Changelog:
1) Added a check in k3_mbox_kick() to prevent sending messages to a
detached core.
2) Added "Fixes:" tag in PATCH 01 and PATCH 02 of series.

Link to v2:
https://lore.kernel.org/all/20240604051722.3608750-1-b-padhi@ti.com/

v2: Changelog:
1) Added a check in k3_mbox_callback() to prevent forwarding messages
from a detached core.
2) Addressed Andrew's comments in v1 regarding some cleanup (Using
dev_err_probe, removing unused labels, adding matching mbox_free_channel
call during device removal).

Link to v1:
https://lore.kernel.org/all/20240530090737.655054-1-b-padhi@ti.com/

Beleswar Padhi (3):
  remoteproc: k3-r5: Use devm_rproc_alloc() helper
  remoteproc: k3-r5: Acquire mailbox handle during probe routine
  remoteproc: k3-dsp: Acquire mailbox handle during probe routine

 drivers/remoteproc/ti_k3_dsp_remoteproc.c | 80 ++++++++-----------
 drivers/remoteproc/ti_k3_r5_remoteproc.c  | 94 +++++++++--------------
 2 files changed, 65 insertions(+), 109 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-16 14:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08  7:41 [PATCH v4 0/3] Defer TI's Remoteproc's Probe until Mailbox is Probed Beleswar Padhi
2024-08-08  7:41 ` [PATCH v4 1/3] remoteproc: k3-r5: Use devm_rproc_alloc() helper Beleswar Padhi
2024-08-08 14:22   ` Andrew Davis
2024-08-08  7:41 ` [PATCH v4 2/3] remoteproc: k3-r5: Acquire mailbox handle during probe routine Beleswar Padhi
2024-08-14 15:52   ` Mathieu Poirier
2024-08-16  7:53     ` Beleswar Prasad Padhi
2024-08-16 14:51       ` Mathieu Poirier
2024-08-08  7:41 ` [PATCH v4 3/3] remoteproc: k3-dsp: " Beleswar Padhi
2024-08-14 15:53   ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox