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: <aO5y1MEaRek/V9iG@lizhi-Precision-Tower-5810>
Date: Tue, 14 Oct 2025 11:57:08 -0400
From: Frank Li <Frank.li@....com>
To: Peng Fan <peng.fan@....com>
Cc: Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Dong Aisheng <aisheng.dong@....com>, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] firmware: imx: scu-irq: Set mu_resource_id before
 get handle

On Tue, Oct 14, 2025 at 12:54:41PM +0800, Peng Fan wrote:
> mu_resource_id is referenced in imx_scu_irq_get_status() and
> imx_scu_irq_group_enable() which could be used by other modules, so
> need to set correct value before using imx_sc_irq_ipc_handle in
> SCU API call.
>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---

Reviewed-by: Frank Li <Frank.Li@....com>

>  drivers/firmware/imx/imx-scu-irq.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c
> index a53ed2040c0cf7065474d681b2eb933a15877380..1346b75596293892ccd90a856d46f52171d88734 100644
> --- a/drivers/firmware/imx/imx-scu-irq.c
> +++ b/drivers/firmware/imx/imx-scu-irq.c
> @@ -203,6 +203,18 @@ int imx_scu_enable_general_irq_channel(struct device *dev)
>  	struct mbox_chan *ch;
>  	int ret = 0, i = 0;
>
> +	if (!of_parse_phandle_with_args(dev->of_node, "mboxes",
> +				       "#mbox-cells", 0, &spec)) {
> +		i = of_alias_get_id(spec.np, "mu");
> +		of_node_put(spec.np);
> +	}
> +
> +	/* use mu1 as general mu irq channel if failed */
> +	if (i < 0)
> +		i = 1;
> +
> +	mu_resource_id = IMX_SC_R_MU_0A + i;
> +
>  	ret = imx_scu_get_handle(&imx_sc_irq_ipc_handle);
>  	if (ret)
>  		return ret;
> @@ -225,18 +237,6 @@ int imx_scu_enable_general_irq_channel(struct device *dev)
>  		return ret;
>  	}
>
> -	if (!of_parse_phandle_with_args(dev->of_node, "mboxes",
> -				       "#mbox-cells", 0, &spec)) {
> -		i = of_alias_get_id(spec.np, "mu");
> -		of_node_put(spec.np);
> -	}
> -
> -	/* use mu1 as general mu irq channel if failed */
> -	if (i < 0)
> -		i = 1;
> -
> -	mu_resource_id = IMX_SC_R_MU_0A + i;
> -
>  	/* Create directory under /sysfs/firmware */
>  	wakeup_obj = kobject_create_and_add("scu_wakeup_source", firmware_kobj);
>  	if (!wakeup_obj) {
>
> --
> 2.37.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ