lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DU0PR04MB941728B0F306EE5FA35738B388259@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date:   Thu, 13 Oct 2022 12:47:43 +0000
From:   Peng Fan <peng.fan@....com>
To:     "S.J. Wang" <shengjiu.wang@....com>,
        "andersson@...nel.org" <andersson@...nel.org>,
        "mathieu.poirier@...aro.org" <mathieu.poirier@...aro.org>,
        "arnaud.pouliquen@...s.st.com" <arnaud.pouliquen@...s.st.com>
CC:     "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "shengjiu.wang@...il.com" <shengjiu.wang@...il.com>
Subject: RE: [PATCH] remoteproc: core: Auto select rproc-virtio device id

> Subject: [PATCH] remoteproc: core: Auto select rproc-virtio device id
> 
> 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.
> 
> Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the
> remoteproc_virtio")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>

Met same issue with on i.MX8QM-MEK dual CM4 case, and I tested same
approach as you did.

Tested-by: Peng Fan <peng.fan@....com>

> ---
>  drivers/remoteproc/remoteproc_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_core.c
> b/drivers/remoteproc/remoteproc_core.c
> index 8768cb64f560..03a26498e879 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -509,7 +509,7 @@ 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,
> +	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");
> --
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ