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: <4343a30e-074d-4d5f-8539-0ce9200d473c@ti.com>
Date: Mon, 7 Apr 2025 08:40:35 -0500
From: Andrew Davis <afd@...com>
To: Beleswar Padhi <b-padhi@...com>, <andersson@...nel.org>,
        <mathieu.poirier@...aro.org>
CC: <hnagalla@...com>, <u-kumar1@...com>, <jm@...com>,
        <jan.kiszka@...mens.com>, <christophe.jaillet@...adoo.fr>,
        <jkangas@...hat.com>, <eballetbo@...hat.com>,
        <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 04/26] remoteproc: k3-{m4/dsp}: Align internal rproc
 data structure with R5

On 3/17/25 7:06 AM, Beleswar Padhi wrote:
> Introduce a void pointer in the k3_{m4/dsp}_rproc internal data
> structure which can be used to point to any private data needed by the
> driver. Currently, the M4/DSP drivers do not have any private data, so
> the pointer can be left pointing to NULL. Additionally, add a pointer to
> the rproc struct within k3_m4_rproc internal struct. This is done to
> align the data structures with R5 driver which can be factored out at a
> later stage.
> 

This does two things, even if trivial things, just make this into two patches.

Andrew

> Signed-off-by: Beleswar Padhi <b-padhi@...com>
> ---
>   drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 ++
>   drivers/remoteproc/ti_k3_m4_remoteproc.c  | 5 +++++
>   2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> index a695890254ff..31e43e49f1e4 100644
> --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> @@ -76,6 +76,7 @@ struct k3_dsp_dev_data {
>    * @ti_sci_id: TI-SCI device identifier
>    * @mbox: mailbox channel handle
>    * @client: mailbox client to request the mailbox channel
> + * @priv: Remote processor private data
>    */
>   struct k3_dsp_rproc {
>   	struct device *dev;
> @@ -91,6 +92,7 @@ struct k3_dsp_rproc {
>   	u32 ti_sci_id;
>   	struct mbox_chan *mbox;
>   	struct mbox_client client;
> +	void *priv;
>   };
>   
>   /**
> diff --git a/drivers/remoteproc/ti_k3_m4_remoteproc.c b/drivers/remoteproc/ti_k3_m4_remoteproc.c
> index a16fb165fced..d0ee7a8d460d 100644
> --- a/drivers/remoteproc/ti_k3_m4_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_m4_remoteproc.c
> @@ -50,6 +50,7 @@ struct k3_m4_rproc_mem_data {
>   /**
>    * struct k3_m4_rproc - k3 remote processor driver structure
>    * @dev: cached device pointer
> + * @rproc: remoteproc device handle
>    * @mem: internal memory regions data
>    * @num_mems: number of internal memory regions
>    * @rmem: reserved memory regions data
> @@ -60,9 +61,11 @@ struct k3_m4_rproc_mem_data {
>    * @ti_sci_id: TI-SCI device identifier
>    * @mbox: mailbox channel handle
>    * @client: mailbox client to request the mailbox channel
> + * @priv: Remote processor private data
>    */
>   struct k3_m4_rproc {
>   	struct device *dev;
> +	struct rproc *rproc;
>   	struct k3_m4_rproc_mem *mem;
>   	int num_mems;
>   	struct k3_m4_rproc_mem *rmem;
> @@ -73,6 +76,7 @@ struct k3_m4_rproc {
>   	u32 ti_sci_id;
>   	struct mbox_chan *mbox;
>   	struct mbox_client client;
> +	void *priv;
>   };
>   
>   /**
> @@ -578,6 +582,7 @@ static int k3_m4_rproc_probe(struct platform_device *pdev)
>   	rproc->recovery_disabled = true;
>   	kproc = rproc->priv;
>   	kproc->dev = dev;
> +	kproc->rproc = rproc;
>   	platform_set_drvdata(pdev, rproc);
>   
>   	kproc->ti_sci = devm_ti_sci_get_by_phandle(dev, "ti,sci");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ