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] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB91857863B163B3F38A26647389DEA@PAXPR04MB9185.eurprd04.prod.outlook.com>
Date: Wed, 26 Nov 2025 21:46:38 +0000
From: Shenwei Wang <shenwei.wang@....com>
To: Mathieu Poirier <mathieu.poirier@...aro.org>
CC: Bjorn Andersson <andersson@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
	Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
	Jonathan Corbet <corbet@....net>, Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>, Pengutronix Kernel Team
	<kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, Peng Fan
	<peng.fan@....com>, "linux-remoteproc@...r.kernel.org"
	<linux-remoteproc@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH v5 2/5] remoteproc: imx_rproc: Populate devices under
 "rpmsg" subnode



> -----Original Message-----
> From: Mathieu Poirier <mathieu.poirier@...aro.org>
> Sent: Wednesday, November 26, 2025 12:54 PM
> To: Shenwei Wang <shenwei.wang@....com>
> Cc: Bjorn Andersson <andersson@...nel.org>; Rob Herring <robh@...nel.org>;
> Krzysztof Kozlowski <krzk+dt@...nel.org>; Conor Dooley
> <conor+dt@...nel.org>; Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>; Jonathan Corbet <corbet@....net>; Linus Walleij
> <linus.walleij@...aro.org>; Bartosz Golaszewski <brgl@...ev.pl>; Pengutronix
> Kernel Team <kernel@...gutronix.de>; Fabio Estevam <festevam@...il.com>;
> Peng Fan <peng.fan@....com>; linux-remoteproc@...r.kernel.org;
> devicetree@...r.kernel.org; imx@...ts.linux.dev; linux-arm-
> kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; linux-
> doc@...r.kernel.org; dl-linux-imx <linux-imx@....com>
> Subject: [EXT] Re: [PATCH v5 2/5] remoteproc: imx_rproc: Populate devices
> under "rpmsg" subnode
> > +
> > +     drvdata = dev_get_drvdata(&rpdev->dev);
> > +     if (drvdata && drvdata->rx_callback)
> > +             return drvdata->rx_callback(rpdev, data, len, priv,
> > + src);
> > +
> > +     return 0;
> > +}
> > +
> > +static void imx_rpmsg_endpoint_remove(struct rpmsg_device *rpdev) {
> > +     of_platform_depopulate(&rpdev->dev);
> > +}
> > +
> > +static int imx_rpmsg_endpoint_probe(struct rpmsg_device *rpdev) {
> 
> Where does the rpmsg_device come from?  Usually there is a call to
> rpmsg_register_device() and I don't see it anywhere in this patchset.  I also don't
> see a link to the remote processor.  I can't continue with this set for as long as I
> don't have this information.
> 

It is in the function below named imx_of_rpmsg_register_rpdriver.

Thanks,
Shenwei

> > +
> > +static int imx_of_rpmsg_register_rpdriver(struct device_node *channel,
> > +                                       struct device *dev, int idx) {
> > +     struct imx_rpmsg_driver_data *driver_data;
> > +     struct imx_rpmsg_driver *rp_driver;
> > +     struct rpmsg_device_id *rpdev_id;
> > +
> > +     rpdev_id = devm_kzalloc(dev, sizeof(*rpdev_id) * 2, GFP_KERNEL);
> > +     if (!rpdev_id)
> > +             return -ENOMEM;
> > +
> > +     strscpy(rpdev_id[0].name, channel_device_map[idx][0],
> > + RPMSG_NAME_SIZE);
> > +
> > +     rp_driver = devm_kzalloc(dev, sizeof(*rp_driver), GFP_KERNEL);
> > +     if (!rp_driver)
> > +             return -ENOMEM;
> > +
> > +     driver_data = devm_kzalloc(dev, sizeof(*driver_data), GFP_KERNEL);
> > +     if (!driver_data)
> > +             return -ENOMEM;
> > +
> > +     driver_data->rproc_name = dev->of_node->name;
> > +     driver_data->channel_node = channel;
> > +     driver_data->map_idx = idx;
> > +
> > +     rp_driver->rpdrv.drv.name = channel_device_map[idx][0];
> > +     rp_driver->rpdrv.id_table = rpdev_id;
> > +     rp_driver->rpdrv.probe = imx_rpmsg_endpoint_probe;
> > +     rp_driver->rpdrv.remove = imx_rpmsg_endpoint_remove;
> > +     rp_driver->rpdrv.callback = imx_rpmsg_endpoint_cb;
> > +     rp_driver->driver_data = driver_data;
> > +
> > +     register_rpmsg_driver(&rp_driver->rpdrv);
> > +
> > +     return 0;
> > +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ