From: sashiko-bot@kernel.org
To: pankaj.gupta@oss.nxp.com
Cc: Frank.Li@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v50 3/7] firmware: imx: add driver for NXP EdgeLock Enclave
Date: Sat, 12 Sep 2026 11:46:10 +0000 [thread overview]
Message-ID: <20260912114610.DAB9C1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912-imx-se-if-v50-3-80834ef510d3@nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Failing with `-ENOMEM` when `of_gen_pool_get` returns NULL breaks probe ordering and prevents the driver from binding if the SRAM pool probes later.
--
commit 88805176a44f81db2011a6e6ac5791578da01f8f
Author: Pankaj Gupta <pankaj.gupta@nxp.com>
firmware: imx: add driver for NXP EdgeLock Enclave
This commit adds an MU-based communication interface for the secure enclave.
The NXP hardware IP for secure-enclaves, like Edgelock Enclave (ELE), is
embedded in the SoC to support features like HSM, SHE & V2X.
> diff --git a/drivers/firmware/imx/se_ctrl.c b/drivers/firmware/imx/se_ctrl.c
> new file mode 100644
> index 0000000000000..0013c960ec43d
> --- /dev/null
> +++ b/drivers/firmware/imx/se_ctrl.c
[ ... ]
> +static int se_if_probe(struct platform_device *pdev)
> +{
[ ... ]
> + if (if_node->pool_name) {
> + priv->mem_pool = of_gen_pool_get(dev->of_node, if_node->pool_name, 0);
> + if (!priv->mem_pool)
> + return dev_err_probe(dev, -ENOMEM,
> + "Unable to get sram pool = %s.\n",
> + if_node->pool_name);
> + }
[Severity: Medium]
Could this prevent the driver from binding if the SRAM pool probes later?
During system boot, if the SRAM driver defers its probe (for example, due to
pending clock or regulator dependencies), of_gen_pool_get() will return NULL.
By unconditionally returning -ENOMEM here, does the secure enclave driver
permanently abort its initialization in se_if_probe() instead of returning
-EPROBE_DEFER to try again later? This would break all dependent functionality
like HSM, SHE, and V2X on configurations where the SRAM pool probes later.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260912-imx-se-if-v50-0-80834ef510d3@nxp.com?part=3
next prev parent reply other threads:[~2026-09-12 11:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 17:03 [PATCH v50 0/7] firmware: imx: driver for NXP secure-enclave pankaj.gupta
2026-09-12 17:03 ` [PATCH v50 1/7] Documentation/firmware: add imx/se to other_interfaces pankaj.gupta
2026-09-12 11:44 ` sashiko-bot
2026-09-12 17:03 ` [PATCH v50 2/7] dt-bindings: arm: fsl: add imx-se-fw binding doc pankaj.gupta
2026-09-12 11:45 ` sashiko-bot
2026-09-12 17:03 ` [PATCH v50 3/7] firmware: imx: add driver for NXP EdgeLock Enclave pankaj.gupta
2026-09-12 11:46 ` sashiko-bot [this message]
2026-09-12 17:03 ` [PATCH v50 4/7] firmware: imx: device context dedicated to priv pankaj.gupta
2026-09-12 17:03 ` [PATCH v50 5/7] firmware: imx: adds miscdev pankaj.gupta
2026-09-12 11:48 ` sashiko-bot
2026-09-12 12:04 ` Pankaj Gupta (OSS)
2026-09-12 17:03 ` [PATCH v50 6/7] arm64: dts: imx8ulp: add secure enclave node pankaj.gupta
2026-09-12 11:45 ` sashiko-bot
2026-09-12 17:03 ` [PATCH v50 7/7] arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave pankaj.gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260912114610.DAB9C1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=pankaj.gupta@oss.nxp.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox