Patch "remoteproc: virtio: Fix wdg cannot recovery remote processor" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    remoteproc: virtio: Fix wdg cannot recovery remote processor

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     remoteproc-virtio-fix-wdg-cannot-recovery-remote-pro.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0f30513037a2ab9564e0f43e04a8f92a40ce51ce
Author: Joakim Zhang <joakim.zhang@xxxxxxxxxxx>
Date:   Sun Dec 17 13:36:59 2023 +0800

    remoteproc: virtio: Fix wdg cannot recovery remote processor
    
    [ Upstream commit b327c72753d6a78de37aed6c35756f2ef62897ee ]
    
    Recovery remote processor failed when wdg irq received:
    [    0.842574] remoteproc remoteproc0: crash detected in cix-dsp-rproc: type watchdog
    [    0.842750] remoteproc remoteproc0: handling crash #1 in cix-dsp-rproc
    [    0.842824] remoteproc remoteproc0: recovering cix-dsp-rproc
    [    0.843342] remoteproc remoteproc0: stopped remote processor cix-dsp-rproc
    [    0.847901] rproc-virtio rproc-virtio.0.auto: Failed to associate buffer
    [    0.847979] remoteproc remoteproc0: failed to probe subdevices for cix-dsp-rproc: -16
    
    The reason is that dma coherent mem would not be released when
    recovering the remote processor, due to rproc_virtio_remove()
    would not be called, where the mem released. It will fail when
    it try to allocate and associate buffer again.
    
    Releasing reserved memory from rproc_virtio_dev_release(), instead of
    rproc_virtio_remove().
    
    Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio")
    Signed-off-by: Joakim Zhang <joakim.zhang@xxxxxxxxxxx>
    Acked-by: Arnaud Pouliquen <arnaud.pouliquen@xxxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20231217053659.3245745-1-joakim.zhang@xxxxxxxxxxx
    Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index 83d76915a6ad6..25b66b113b695 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -351,6 +351,9 @@ static void rproc_virtio_dev_release(struct device *dev)
 
 	kfree(vdev);
 
+	of_reserved_mem_device_release(&rvdev->pdev->dev);
+	dma_release_coherent_memory(&rvdev->pdev->dev);
+
 	put_device(&rvdev->pdev->dev);
 }
 
@@ -584,9 +587,6 @@ static void rproc_virtio_remove(struct platform_device *pdev)
 	rproc_remove_subdev(rproc, &rvdev->subdev);
 	rproc_remove_rvdev(rvdev);
 
-	of_reserved_mem_device_release(&pdev->dev);
-	dma_release_coherent_memory(&pdev->dev);
-
 	put_device(&rproc->dev);
 }
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux