mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
remoteproc: core: Full attach detach during recovery
Current attach on recovery mechanism loads the clean resource table during recovery, but doesn't re-allocate the resources. RPMsg communication will fail after recovery due to this. Fix this incorrect behavior by doing the full detach and attach of remote processor during the recovery. This will load the clean resource table and re-allocate all the resources, which will set up correct vring information in the resource table. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Link: https://lore.kernel.org/r/20260630004806.3835488-2-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
1f9ecae2ec
commit
d93ffd549f
|
|
@ -1776,7 +1776,20 @@ static int rproc_attach_recovery(struct rproc *rproc)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
return __rproc_attach(rproc);
|
||||
/* clean up all acquired resources */
|
||||
rproc_resource_cleanup(rproc);
|
||||
|
||||
/* release HW resources if needed */
|
||||
rproc_unprepare_device(rproc);
|
||||
|
||||
rproc_disable_iommu(rproc);
|
||||
|
||||
/* Free the copy of the resource table */
|
||||
kfree(rproc->cached_table);
|
||||
rproc->cached_table = NULL;
|
||||
rproc->table_ptr = NULL;
|
||||
|
||||
return rproc_attach(rproc);
|
||||
}
|
||||
|
||||
static int rproc_boot_recovery(struct rproc *rproc)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user