Patch "remoteproc: core: Auto select rproc-virtio device id" has been added to the 6.1-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: core: Auto select rproc-virtio device id

to the 6.1-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-core-auto-select-rproc-virtio-device-id.patch
and it can be found in the queue-6.1 subdirectory.

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



commit b3567d4c11ee7952e222a60861bc804f23400805
Author: Shengjiu Wang <shengjiu.wang@xxxxxxx>
Date:   Tue Oct 18 21:44:04 2022 +0800

    remoteproc: core: Auto select rproc-virtio device id
    
    [ Upstream commit 65fcf3872f83d63fb7268e05d4b02640df14126e ]
    
    With multiple remoteproc device, there will below error:
    
    sysfs: cannot create duplicate filename '/bus/platform/devices/rproc-virtio.0'
    
    The rvdev_data.index is duplicate, that cause issue, so
    need to use the PLATFORM_DEVID_AUTO instead. After fixing
    device name it becomes something like:
    /bus/platform/devices/rproc-virtio.2.auto
    
    Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio")
    Signed-off-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
    Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@xxxxxxxxxxx>
    Reviewed-by: Mukesh Ojha <quic_mojha@xxxxxxxxxxx>
    Tested-by: Peng Fan <peng.fan@xxxxxxx>
    Link: https://lore.kernel.org/r/1666100644-27010-1-git-send-email-shengjiu.wang@xxxxxxx
    [Fixed typographical error in comment block]
    Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 8768cb64f560..cb1d414a2389 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -509,7 +509,13 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr,
 	rvdev_data.rsc_offset = offset;
 	rvdev_data.rsc = rsc;
 
-	pdev = platform_device_register_data(dev, "rproc-virtio", rvdev_data.index, &rvdev_data,
+	/*
+	 * When there is more than one remote processor, rproc->nb_vdev number is
+	 * same for each separate instances of "rproc". If rvdev_data.index is used
+	 * as device id, then we get duplication in sysfs, so need to use
+	 * PLATFORM_DEVID_AUTO to auto select device id.
+	 */
+	pdev = platform_device_register_data(dev, "rproc-virtio", PLATFORM_DEVID_AUTO, &rvdev_data,
 					     sizeof(rvdev_data));
 	if (IS_ERR(pdev)) {
 		dev_err(dev, "failed to create rproc-virtio device\n");



[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