* [PATCH 1/7] firmware: imx: ele: Correct check condition in se_if_rx_callback
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
Reverse logic should be used when checking whether response is correct.
The logic should be when size not match and API is not listed in
exception list, return failure.
Fixes: 106ffe5d78ad8 ("firmware: imx: add driver for NXP EdgeLock Enclave")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/ele_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/imx/ele_common.c b/drivers/firmware/imx/ele_common.c
index e5117a1f19959ec8dcfb313040121e20be0e92be..8daf32eded43c62daf56540b63e292bf0c6c9845 100644
--- a/drivers/firmware/imx/ele_common.c
+++ b/drivers/firmware/imx/ele_common.c
@@ -219,7 +219,7 @@ void se_if_rx_callback(struct mbox_client *mbox_cl, void *msg)
se_clbk_hdl->dev_ctx->devname, *(u32 *)header);
if (rx_msg_sz != se_clbk_hdl->rx_msg_sz &&
- check_hdr_exception_for_sz(priv, header)) {
+ !check_hdr_exception_for_sz(priv, header)) {
dev_err(dev,
"%s: Rsp to CMD: hdr(0x%x) with different sz(%d != %d).\n",
se_clbk_hdl->dev_ctx->devname, *(u32 *)header,
--
2.37.1
^ permalink raw reply related
* [PATCH 4/7] firmware: imx: ele: simplify SoC device registration
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
'soc_register' is used as a flag to control whether a SoC device should
be registered. However, only i.MX8ULP requires this, while i.MX9 is
handled separately in soc-imx9.c.
Replace the boolean 'soc_register' with a 'soc_name' string and use its
presence as the condition for registration to remove the switch and
i.MX93 case.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/se_ctrl.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/firmware/imx/se_ctrl.c b/drivers/firmware/imx/se_ctrl.c
index 9327d47e4312e7f39a5f4fc24dd73566af240a9f..30e97a604eca137f45de6c329081fba234642732 100644
--- a/drivers/firmware/imx/se_ctrl.c
+++ b/drivers/firmware/imx/se_ctrl.c
@@ -56,7 +56,7 @@ struct se_var_info {
/* contains fixed information */
struct se_soc_info {
const u16 soc_id;
- const bool soc_register;
+ const char *soc_name;
const struct se_fw_img_name se_fw_img_nm;
};
@@ -72,7 +72,7 @@ static struct se_var_info var_se_info;
static struct se_soc_info se_imx8ulp_info = {
.soc_id = SOC_ID_OF_IMX8ULP,
- .soc_register = true,
+ .soc_name = "i.MX8ULP",
.se_fw_img_nm = {
.prim_fw_nm_in_rfs = IMX_ELE_FW_DIR
"mx8ulpa2-ahab-container.img",
@@ -163,7 +163,7 @@ static int get_se_soc_info(struct se_if_priv *priv, const struct se_soc_info *se
var_se_info.soc_rev = s_info->d_info.soc_rev;
load_fw->imem.state = s_info->d_addn_info.imem_state;
- if (!se_info->soc_register)
+ if (!se_info->soc_name)
return 0;
attr = devm_kzalloc(priv->dev, sizeof(*attr), GFP_KERNEL);
@@ -181,14 +181,7 @@ static int get_se_soc_info(struct se_if_priv *priv, const struct se_soc_info *se
FIELD_GET(DEV_GETINFO_MAJ_VER_MASK,
var_se_info.soc_rev));
- switch (se_info->soc_id) {
- case SOC_ID_OF_IMX8ULP:
- attr->soc_id = "i.MX8ULP";
- break;
- case SOC_ID_OF_IMX93:
- attr->soc_id = "i.MX93";
- break;
- }
+ attr->soc_id = se_info->soc_name;
err = of_property_read_string(of_root, "model", &attr->machine);
if (err)
--
2.37.1
^ permalink raw reply related
* [PATCH 3/7] firmware: imx: ele: Bypass memcpy when ele_get_info() fails
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
When ele_get_info() fails, no sense to copy get_info_data to destination,
because get_info_data may contains garbage data, so bypass the copy.
Fixes: 106ffe5d78ad8 ("firmware: imx: add driver for NXP EdgeLock Enclave")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/ele_base_msg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/imx/ele_base_msg.c b/drivers/firmware/imx/ele_base_msg.c
index f6346f15450963b9dd8d2df7d3e6b2ce6b4602ce..05a518df38cd6a068266757969b361249ef0560a 100644
--- a/drivers/firmware/imx/ele_base_msg.c
+++ b/drivers/firmware/imx/ele_base_msg.c
@@ -95,6 +95,8 @@ int ele_get_info(struct se_if_priv *priv, struct ele_dev_info *s_info)
ret = se_val_rsp_hdr_n_status(priv, rx_msg, ELE_GET_INFO_REQ,
ELE_GET_INFO_RSP_MSG_SZ, true);
+ if (ret < 0)
+ goto exit;
memcpy(s_info, get_info_data, sizeof(*s_info));
exit:
--
2.37.1
^ permalink raw reply related
* [PATCH 6/7] firmware: imx: ele: Use dev_err for error report
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
Use dev_err() to replace dev_dbg() for error report.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/ele_base_msg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/imx/ele_base_msg.c b/drivers/firmware/imx/ele_base_msg.c
index 05a518df38cd6a068266757969b361249ef0560a..2f0046cd5ad06d28c11ad5bf7b8544d1aa9b9bb6 100644
--- a/drivers/firmware/imx/ele_base_msg.c
+++ b/drivers/firmware/imx/ele_base_msg.c
@@ -74,7 +74,7 @@ int ele_get_info(struct se_if_priv *priv, struct ele_dev_info *s_info)
&get_info_addr,
GFP_KERNEL);
if (!get_info_data) {
- dev_dbg(priv->dev,
+ dev_err(priv->dev,
"%s: Failed to allocate get_info_addr.", __func__);
return -ENOMEM;
}
--
2.37.1
^ permalink raw reply related
* [PATCH 7/7] firmware: imx: ele: Fix debug dump size handling
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
The ELE debug dump response is formatted as:
- header (1 u32)
- status (1 u32)
- dump words (2..21 u32)
- CRC (1 u32)
The header.size field represents the total number of u32 words,
not a byte count.
After removing the header and status (2 words), header.size still
includes the trailing CRC. Therefore, when determining the number
of valid debug words, the CRC must be excluded as well.
The existing check:
if (rx_msg->header.size > 4)
is incorrect because header.size has already been reduced by 2.
Fix it by comparing against the remaining minimum (CRC + debug words),
i.e.:
if (rx_msg->header.size > 2)
and then decrement to account for the CRC.
Fixes: 106ffe5d78ad8 ("firmware: imx: add driver for NXP EdgeLock Enclave")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/ele_base_msg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/imx/ele_base_msg.c b/drivers/firmware/imx/ele_base_msg.c
index 2f0046cd5ad06d28c11ad5bf7b8544d1aa9b9bb6..ec718d322abcd7e120d916bbcbcf691f3078c628 100644
--- a/drivers/firmware/imx/ele_base_msg.c
+++ b/drivers/firmware/imx/ele_base_msg.c
@@ -290,7 +290,7 @@ int ele_debug_dump(struct se_if_priv *priv)
rx_msg->header.size -= 2;
- if (rx_msg->header.size > 4)
+ if (rx_msg->header.size > 2)
rx_msg->header.size--;
for (i = 0; i < rx_msg->header.size; i += 2)
--
2.37.1
^ permalink raw reply related
* [PATCH 5/7] firmware: imx: ele: Correct check_hdr_exception_for_sz
From: Peng Fan (OSS) @ 2026-05-25 5:39 UTC (permalink / raw)
To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Frieder Schrempf, Pankaj Gupta
Cc: imx, linux-arm-kernel, linux-kernel, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
header.size is u8 type, "header.size >= 0" will always return true.
Actually the check condition should be ">= 2", because a valid response
includes at lease header(4bytes) and status(4bytes), total 2 ints.
And ELE_DEBUG_DUMP_RSP_SZ is counted using bytes, need to divide it by 4.
Fixes: 106ffe5d78ad8 ("firmware: imx: add driver for NXP EdgeLock Enclave")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/imx/ele_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/imx/ele_common.c b/drivers/firmware/imx/ele_common.c
index 8daf32eded43c62daf56540b63e292bf0c6c9845..76bd3841acfcb1ff33d3bc5d900300493190b8a8 100644
--- a/drivers/firmware/imx/ele_common.c
+++ b/drivers/firmware/imx/ele_common.c
@@ -164,7 +164,7 @@ static bool check_hdr_exception_for_sz(struct se_if_priv *priv,
*/
if (header->command == ELE_DEBUG_DUMP_REQ &&
header->ver == priv->if_defs->base_api_ver &&
- header->size >= 0 && header->size <= ELE_DEBUG_DUMP_RSP_SZ)
+ header->size >= 2 && header->size <= (ELE_DEBUG_DUMP_RSP_SZ / 4))
return true;
return false;
--
2.37.1
^ permalink raw reply related
* Re: [PATCH v18 00/14] crypto/dmaengine: qce: introduce BAM locking and use DMA for register I/O
From: Manivannan Sadhasivam @ 2026-05-25 5:44 UTC (permalink / raw)
To: Eric Biggers
Cc: Bartosz Golaszewski, Vinod Koul, Jonathan Corbet, Thara Gopinath,
Herbert Xu, David S. Miller, Udit Tiwari, Md Sadre Alam,
Dmitry Baryshkov, Stephan Gerhold, Bjorn Andersson,
Peter Ujfalusi, Michal Simek, Frank Li, Andy Gross,
Neil Armstrong, dmaengine, linux-doc, linux-kernel, linux-arm-msm,
linux-crypto, linux-arm-kernel, brgl, Bartosz Golaszewski,
Dmitry Baryshkov, Konrad Dybcio
In-Reply-To: <20260524204921.GC110177@quark>
On Sun, May 24, 2026 at 03:49:21PM -0500, Eric Biggers wrote:
> On Fri, May 22, 2026 at 03:39:53PM +0200, Bartosz Golaszewski wrote:
> > Currently the QCE crypto driver accesses the crypto engine registers
> > directly via CPU. Trust Zone may perform crypto operations simultaneously
> > resulting in a race condition.
>
> So this driver is just critically broken currently? Yet it's still not
> marked as BROKEN?
>
It is currently broken on a subset of platforms supporting multi-EE, not all.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply
* Re: [PATCH v1] block: switch numa_node to int in blk_mq_hw_ctx and init_request
From: Christoph Hellwig @ 2026-05-25 6:03 UTC (permalink / raw)
To: Mateusz Nowicki
Cc: Jens Axboe, Caleb Sander Mateos, Sung-woo Kim, Josef Bacik,
Alasdair Kergon, Mike Snitzer, Mikulas Patocka,
Benjamin Marzinski, Ulf Hansson, Richard Weinberger, Zhihao Cheng,
Miquel Raynal, Vignesh Raghavendra, Sven Peter, Janne Grunau,
Neal Gompa, Keith Busch, Christoph Hellwig, Sagi Grimberg,
Justin Tee, Naresh Gottumukkala, Paul Ely, Chaitanya Kulkarni,
James E.J. Bottomley, Martin K. Petersen, Thomas Fourier, Al Viro,
Luke Wang, Kees Cook, linux-block, linux-kernel, nbd, dm-devel,
linux-mmc, linux-mtd, asahi, linux-arm-kernel, linux-nvme,
linux-scsi
In-Reply-To: <20260523125210.272274-1-mateusz.nowicki@posteo.net>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply
* [PATCH] net: stmmac: Improve Tx timer arm logic further
From: muhammad.nazim.amirul.nazle.asmade @ 2026-05-25 6:16 UTC (permalink / raw)
To: netdev
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
alexandre.torgue, rmk+kernel, maxime.chevallier, linux-stm32,
linux-arm-kernel, linux-kernel
From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
Currently hrtimer_start is called even if hrtimer is
active. This is unnecessary and expensive in some targets.
This patch avoids calling hrtimer_start unnecessarily.
Signed-off-by: Rohan G Thomas <rohan.g.thomas@intel.com>
Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3591755ea30b..35da51c26248 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3341,12 +3341,14 @@ static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue)
* Try to cancel any timer if napi is scheduled, timer will be armed
* again in the next scheduled napi.
*/
- if (unlikely(!napi_is_scheduled(napi)))
- hrtimer_start(&tx_q->txtimer,
- STMMAC_COAL_TIMER(tx_coal_timer),
- HRTIMER_MODE_REL);
- else
+ if (unlikely(!napi_is_scheduled(napi))) {
+ if (unlikely(!(hrtimer_active(&tx_q->txtimer))))
+ hrtimer_start(&tx_q->txtimer,
+ STMMAC_COAL_TIMER(tx_coal_timer),
+ HRTIMER_MODE_REL);
+ } else {
hrtimer_try_to_cancel(&tx_q->txtimer);
+ }
}
/**
--
2.43.7
^ permalink raw reply related
* [PATCH] dt-bindings: arm-smmu: qcom: Add compatible for Maili SoC
From: Jingyi Wang @ 2026-05-25 6:17 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang,
linux-arm-kernel, iommu, devicetree, linux-kernel, Jingyi Wang
Qualcomm Maili SoC includes apps smmu that implements arm,mmu-500,
which is used to translate device-visible virtual addresses to
physical addresses. Add compatible for it.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index 06fb5c8e7547..4bd31aadc405 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -38,6 +38,7 @@ properties:
- qcom,eliza-smmu-500
- qcom,glymur-smmu-500
- qcom,kaanapali-smmu-500
+ - qcom,maili-smmu-500
- qcom,milos-smmu-500
- qcom,qcm2290-smmu-500
- qcom,qcs615-smmu-500
---
base-commit: c1ecb239fa3456529a32255359fc78b69eb9d847
change-id: 20260524-maili-smmu-1004f41b3073
Best regards,
--
Jingyi Wang <jingyi.wang@oss.qualcomm.com>
^ permalink raw reply related
* Re: [PATCH v3] i2c: imx-lpi2c: mark I2C adapter when hardware is powered down
From: Mukesh Savaliya @ 2026-05-25 5:31 UTC (permalink / raw)
To: Carlos Song (OSS), aisheng.dong, andi.shyti, Frank.Li, s.hauer,
kernel, festevam, carlos.song
Cc: linux-i2c, imx, linux-arm-kernel, linux-kernel, stable
In-Reply-To: <20260525031450.3183421-1-carlos.song@oss.nxp.com>
On 5/25/2026 8:44 AM, Carlos Song (OSS) wrote:
> From: Carlos Song <carlos.song@nxp.com>
>
> On some i.MX platforms, certain I2C client drivers keep a periodic
> workqueue which continues to trigger I2C transfers.
>
> During system suspend/resume, there exists a time window between:
> - suspend_noirq and the system entering suspend
> - the system starting to resume and resume_noirq
>
> In this window, the I2C controller resources such as clock and pinctrl
> may already be disabled or not yet restored.
>
> If a workqueue triggers an I2C transfer in this period, the driver
> attempts to access I2C registers while the hardware resources are
> unavailable, which may lead to system hang.
>
> Mark the I2C adapter as suspended during noirq suspend and block new
> transfers until resume, ensuring that I2C transfers are only issued
> when hardware resources are available.
>
> Fixes: 1ee867e465c1 ("i2c: imx-lpi2c: add target mode support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> ---
Acked-by: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
^ permalink raw reply
* RE: [PATCH 2/5] dt-bindings: connector: Add fsl,io-connector binding
From: Chancel Liu (OSS) @ 2026-05-25 6:26 UTC (permalink / raw)
To: Krzysztof Kozlowski, Frank Li
Cc: Chancel Liu (OSS), Chancel Liu, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, s.hauer@pengutronix.de,
festevam@gmail.com, mturquette@baylibre.com, sboyd@kernel.org,
kernel@pengutronix.de, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
In-Reply-To: <74eb56fb-546d-4b2c-9bbc-01a40937f5d3@kernel.org>
> >>>>>>>>> +description:
> >>>>>>>>> + The NXP I/O connector represents a physically present I/O
> >>>>>>>>> +connector on the
> >>>>>>>>> + base board. It acts as a nexus that exposes a constrained
> >>>>>>>>> +set
> >>>> of
> >>>>>>>>> +I/O
> >>>>>>>>> + resources, such as GPIOs, clocks, PWMs and interrupts,
> >>>>>>>>> +through fixed
> >>>>>>>>> + electrical wiring. All actual hardware providers reside on
> >>>>>>>>> +the
> >>>> base
> >>>>>> board.
> >>>>>>>>> + The connector node only defines index-based mappings to
> >>>>>>>>> + those
> >>>>>>>> providers.
> >>>>>>>>> +
> >>>>>>>>> +properties:
> >>>>>>>>> + compatible:
> >>>>>>>>> + const: fsl,io-connector
> >>>>>>>>
> >>>>>>>> Everything is IO. Everything is connector, so your compatible
> >>>>>>>> does not match requirements from writing bindings.
> >>>>>>>>
> >>>>>>>
> >>>>>>> Yes, this compatible is too generic. I will rename the
> >>>>>>> compatible to fsl,aud-io-connector.
> >>>>>>
> >>>>>> aud is not much better. Which boards have it? What's the pinout?
> >>>> What's
> >>>>>> standard? Is it described anywhere? If so, provide reference to
> >>>> spec/docs.
> >>>>>>
> >>>>>
> >>>>> This is not an industry standard electrical interface. This
> >>>>> connector
> >>>>
> >>>> Then if you do not have standard, then you have board specific
> >>>> layouts thus you need board-specific compatibles. You can use
> >>>> fallbacks. Generic fallback could work, but both io-connector and
> >>>> aud-io-connector are just too generic. Every connector is
> >>>> "connector" and "io", thus absolutely anything can be
> >>>> "io-connector". "aud" improves it only a bit, thus honestly I would
> go with board specific fallback as well.
> >>>>
> >>>
> >>> How about board specific + common fallback compatible like this:
> >>> compatible:
> >>> items:
> >>> - enum:
> >>> - fsl,imx95-19x19-evk-aud-io-connector
> >>> - fsl,imx952-evk-aud-io-connector
> >>> - const: fsl,imx-aud-io-connector Since the daughter board is
> >>> named “IMX-AUD-IO” in publicly available
> >>
> >> I don't think it is named like that.
> >>
> >> git grep -i imx-aud-io
> >>
> >>> documentation, common compatible clearly indicates that this
> >>> connector is intended for that.
> >>>
> >>> Also, I want to talk about the topic of generic connector. It's a
> >>> common design that daughter board is connected to base board through
> >>> a connector. This connector more often acts as a nexus that exposes
> >>> a constrained subset of GPIO, clock, PWM and interrupt resources to
> >>> the daughter board. Can we document this kind of connector as a
> >>> generic binding?
> >>
> >> So this binding is the connector between carrier and some addon? Then
> >> you don't get a compatible for that at all, because it is not
> >> necessary, not useful and NEVER used. Do you see socket LGA "connector"
> bindings? No.
> >
> > Not exactly. Any connector connects a carrier board with an add-on
> board.
> > The key point here is that this connector type is reused across
> > different boards, even though it is not an industry-standard
> > connector. Both the signal definitions and the mechanical layout are
> defined.
> >
> > The same add-on boards can therefore be reused across different base
> > boards that use this type of connector.
> >
> > There are also GPIO mappings involved. For example, pin 1 on the
> > connector may represent reset-gpios, but it could be connected to
> > GPIO0 on board A and GPIO1 on board B.
> >
> > Without a connector definition layer, this would create an N × M
> > combination problem. The Nexus node discussion already covered this
> topic:
> > https://osseu2025.sched.com/event/25Vrw
> >
> > An LGA socket is a CPU socket, where the signals are completely
> > transparent to software, so it is not a good comparison. A PCIe M.2
> > Key-M/E connector would be a more appropriate comparison.
> >
>
> So the terminology of daughter and carrier boards was confusing. If this
> is a hat, mezzanine or other addon, it's fine.
>
The IMX-AUD-IO is an add-on board that attaches to the base board. To
make it clearer, I will replace "daughter board" with "add-on board"
throughout descriptions.
> I still insist on board specific compatibles - fallback and specific.
>
The base board has a slot component that is mechanically compatible
with a PCIe x8 connector. However, it carries no PCIe signals and the
pins are repurposed to carry fixed board-level audio I/O related
signals.
I think we can name a compatible reflects a standard mechanical form
factor.
For the compatibles (specific + fallback) I propose:
- enum:
- fsl,imx95-19x19-evk-aud-io-pcie-x8-slot
- fsl,imx952-evk-aud-io-pcie-x8-slot
- const: fsl,aud-io-pcie-x8-slot
I understand the concern about implying PCIe functionality. In the
binding I will explicitly state that this is a repurposed mechanical
form factor only, with no PCIe protocol present.
> Best regards,
> Krzysztof
Regards,
Chancel Liu
^ permalink raw reply
* [PATCH v2] spi: imx: replace dmaengine_terminate_all() with dmaengine_terminate_sync()
From: Carlos Song (OSS) @ 2026-05-25 6:29 UTC (permalink / raw)
To: broonie, Frank.Li, s.hauer, kernel, festevam, carlos.song
Cc: linux-spi, imx, linux-arm-kernel, linux-kernel
From: Carlos Song <carlos.song@nxp.com>
dmaengine_terminate_all() has been deprecated, so replace it with
dmaengine_terminate_sync().
Fixes: ba9b28652c75 ("spi: imx: enable DMA mode for target operation")
Fixes: a450c8b77f92 ("spi: imx: handle DMA submission errors with dma_submit_error()")
Signed-off-by: Carlos Song <carlos.song@nxp.com>
---
Change for v2:
- Fix a nit on title and simplify the commit log.
---
drivers/spi/spi-imx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 480d1e8b281f..ae9912905c67 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1774,8 +1774,8 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
transfer_timeout);
if (!time_left) {
dev_err(spi_imx->dev, "I/O Error in DMA TX\n");
- dmaengine_terminate_all(controller->dma_tx);
- dmaengine_terminate_all(controller->dma_rx);
+ dmaengine_terminate_sync(controller->dma_tx);
+ dmaengine_terminate_sync(controller->dma_rx);
return -ETIMEDOUT;
}
@@ -1784,7 +1784,7 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
if (!time_left) {
dev_err(&controller->dev, "I/O Error in DMA RX\n");
spi_imx->devtype_data->reset(spi_imx);
- dmaengine_terminate_all(controller->dma_rx);
+ dmaengine_terminate_sync(controller->dma_rx);
return -ETIMEDOUT;
}
} else {
@@ -1793,15 +1793,15 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
if (wait_for_completion_interruptible(&spi_imx->dma_tx_completion) ||
READ_ONCE(spi_imx->target_aborted)) {
dev_dbg(spi_imx->dev, "I/O Error in DMA TX interrupted\n");
- dmaengine_terminate_all(controller->dma_tx);
- dmaengine_terminate_all(controller->dma_rx);
+ dmaengine_terminate_sync(controller->dma_tx);
+ dmaengine_terminate_sync(controller->dma_rx);
return -EINTR;
}
if (wait_for_completion_interruptible(&spi_imx->dma_rx_completion) ||
READ_ONCE(spi_imx->target_aborted)) {
dev_dbg(spi_imx->dev, "I/O Error in DMA RX interrupted\n");
- dmaengine_terminate_all(controller->dma_rx);
+ dmaengine_terminate_sync(controller->dma_rx);
return -EINTR;
}
@@ -1818,9 +1818,9 @@ static int spi_imx_dma_submit(struct spi_imx_data *spi_imx,
return 0;
dmaengine_terminate_tx:
- dmaengine_terminate_all(controller->dma_tx);
+ dmaengine_terminate_sync(controller->dma_tx);
dmaengine_terminate_rx:
- dmaengine_terminate_all(controller->dma_rx);
+ dmaengine_terminate_sync(controller->dma_rx);
return -EINVAL;
}
--
2.43.0
^ permalink raw reply related
* Re: [PATCH 1/2] crypto: Delete Qualcomm crypto engine driver
From: Kuldeep Singh @ 2026-05-25 6:29 UTC (permalink / raw)
To: Eric Biggers, Krzysztof Kozlowski
Cc: Demi Marie Obenour, Dmitry Baryshkov, Herbert Xu, David S. Miller,
Thara Gopinath, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bjorn Andersson, Konrad Dybcio, Russell King, linux-kernel,
linux-crypto, linux-arm-msm, Ard Biesheuvel, devicetree,
linux-arm-kernel
In-Reply-To: <20260524204537.GB110177@quark>
> This driver is more than an order of magnitude slower than the CPU for
> both encryption and hashing. See:
>
> https://lore.kernel.org/r/20250704070322.20692-1-ebiggers@kernel.org/
> https://lore.kernel.org/r/20250615031807.GA81869@sol/
>
> There are many examples of it having bugs as well, for example see the
> second link above.
>
> That's why it had to be disabled via the cra_priority system. This
> driver was actively making Linux worse.
>
> This isn't particularly unique to drivers/crypto/, of course. This one
> we just have data on, so it's a bit clearer.
>
> I've yet to see any real reason to keep this driver.
https://lore.kernel.org/all/c1697372-54ec-4f57-85d9-ad375ff1a44d@oss.qualcomm.com/
Kindly check my latest reply to the thread. There are numerous usecases
like DRM(Digital rights management) coming up and qce driver is required
for secure content.
> Crypto drivers need to be held to a higher standard than other device
> drivers, as well. The onus is on those who want to keep a particular
> crypto driver to prove that it's worth keeping.
Sure, I'll be working on stabilizing self_tests infra for qce.
Kindly allow sometime to go over failures in crypto selftest and will
submit fix if applicable.
So far, i am observing 2 ciphers failing(xts-aes-qce and ctr-aes-qce )
with CONFIG_CRYPTO_SELFTESTS enabled.
https://lore.kernel.org/r/20250615031807.GA81869@sol/
May I know how to issue reproduce steps because I didn't observe
crypto/ahash.c failure with CONFIG_CRYPTO_SELFTESTS?
--
Regards
Kuldeep
^ permalink raw reply
* RE: [PATCH 4/7] firmware: imx: ele: simplify SoC device registration
From: Pankaj Gupta @ 2026-05-25 6:36 UTC (permalink / raw)
To: Peng Fan (OSS), Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Frieder Schrempf
Cc: imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Peng Fan
In-Reply-To: <20260525-ele-v1-v1-4-a9570c4bffc9@nxp.com>
> -----Original Message-----
> From: Peng Fan (OSS) <peng.fan@oss.nxp.com>
> Sent: 25 May 2026 11:09
> To: Frank Li <frank.li@nxp.com>; Sascha Hauer <s.hauer@pengutronix.de>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam
> <festevam@gmail.com>; Frieder Schrempf <frieder.schrempf@kontron.de>;
> Pankaj Gupta <pankaj.gupta@nxp.com>
> Cc: imx@lists.linux.dev; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Peng Fan <peng.fan@nxp.com>
> Subject: [PATCH 4/7] firmware: imx: ele: simplify SoC device registration
>
> From: Peng Fan <peng.fan@nxp.com>
>
> 'soc_register' is used as a flag to control whether a SoC device should be
> registered. However, only i.MX8ULP requires this, while i.MX9 is handled
> separately in soc-imx9.c.
>
> Replace the boolean 'soc_register' with a 'soc_name' string and use its
> presence as the condition for registration to remove the switch and
> i.MX93 case.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/firmware/imx/se_ctrl.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/firmware/imx/se_ctrl.c b/drivers/firmware/imx/se_ctrl.c
> index
> 9327d47e4312e7f39a5f4fc24dd73566af240a9f..30e97a604eca137f45de6c
> 329081fba234642732 100644
> --- a/drivers/firmware/imx/se_ctrl.c
> +++ b/drivers/firmware/imx/se_ctrl.c
> @@ -56,7 +56,7 @@ struct se_var_info {
> /* contains fixed information */
> struct se_soc_info {
> const u16 soc_id;
> - const bool soc_register;
> + const char *soc_name;
> const struct se_fw_img_name se_fw_img_nm; };
>
> @@ -72,7 +72,7 @@ static struct se_var_info var_se_info;
>
> static struct se_soc_info se_imx8ulp_info = {
> .soc_id = SOC_ID_OF_IMX8ULP,
> - .soc_register = true,
> + .soc_name = "i.MX8ULP",
> .se_fw_img_nm = {
> .prim_fw_nm_in_rfs = IMX_ELE_FW_DIR
> "mx8ulpa2-ahab-container.img",
> @@ -163,7 +163,7 @@ static int get_se_soc_info(struct se_if_priv *priv,
> const struct se_soc_info *se
> var_se_info.soc_rev = s_info->d_info.soc_rev;
> load_fw->imem.state = s_info->d_addn_info.imem_state;
>
> - if (!se_info->soc_register)
> + if (!se_info->soc_name)
> return 0;
Remove the soc_register, all together.
Replace the check with "se_info->soc_id != SOC_ID_OF_IMX8ULP"
>
> attr = devm_kzalloc(priv->dev, sizeof(*attr), GFP_KERNEL); @@ -
> 181,14 +181,7 @@ static int get_se_soc_info(struct se_if_priv *priv, const
> struct se_soc_info *se
>
> FIELD_GET(DEV_GETINFO_MAJ_VER_MASK,
>
> var_se_info.soc_rev));
>
> - switch (se_info->soc_id) {
> - case SOC_ID_OF_IMX8ULP:
> - attr->soc_id = "i.MX8ULP";
> - break;
> - case SOC_ID_OF_IMX93:
> - attr->soc_id = "i.MX93";
> - break;
> - }
> + attr->soc_id = se_info->soc_name;
>
> err = of_property_read_string(of_root, "model", &attr->machine);
> if (err)
>
> --
> 2.37.1
^ permalink raw reply
* [PATCH V2 0/2] PCI: imx6: Improve PERST# fallback logic
From: Sherry Sun (OSS) @ 2026-05-25 6:54 UTC (permalink / raw)
To: hongxing.zhu, l.stach, Frank.Li, bhelgaas, lpieralisi,
kwilczynski, mani, robh, s.hauer, kernel, festevam, will
Cc: imx, linux-pci, linux-arm-kernel, linux-kernel, sherry.sun
From: Sherry Sun <sherry.sun@nxp.com>
The pci_host_common_parse_port() shouldn't decide whether to fall back
to the legacy RC-level binding by checking for "reset-gpios/reset-gpio"
properties on the RC node and returning -ENODEV. That's a policy
decision belongs to the caller, not this common helper.
This patch set improves the PERST# (PCIe reset) GPIO fallback logic
across the generic PCI host bridge helper and the i.MX6 PCIe driver.
---
Changes in V2:
1. Improved the commit messages as Richard suggested.
2. Collected Reviewed-by tags.
---
Sherry Sun (2):
PCI: host-generic: Simplify return value handling in
pci_host_common_parse_port(s)
PCI: imx6: Add imx_pcie_perst_found() to inspect the parsed result
drivers/pci/controller/dwc/pci-imx6.c | 25 +++++++++++++-------
drivers/pci/controller/pci-host-common.c | 29 ++++--------------------
2 files changed, 22 insertions(+), 32 deletions(-)
base-commit: c1ecb239fa3456529a32255359fc78b69eb9d847
--
2.37.1
^ permalink raw reply
* [PATCH V2 1/2] PCI: host-generic: Simplify return value handling in pci_host_common_parse_port(s)
From: Sherry Sun (OSS) @ 2026-05-25 6:54 UTC (permalink / raw)
To: hongxing.zhu, l.stach, Frank.Li, bhelgaas, lpieralisi,
kwilczynski, mani, robh, s.hauer, kernel, festevam, will
Cc: imx, linux-pci, linux-arm-kernel, linux-kernel, sherry.sun
In-Reply-To: <20260525065443.2338629-1-sherry.sun@oss.nxp.com>
From: Sherry Sun <sherry.sun@nxp.com>
The pci_host_common_parse_port() shouldn't check the RC-level binding.
That's a policy decision that belongs to the caller, not this common
helper.
Simplify pci_host_common_parse_port() to only parse properties from the
Root Port (and its children) without checking the RC node. Also change
pci_host_common_parse_ports() to return 0 when no ports are found, since
it is not an error.
So now both functions won't return failure for "property not found" or
"port not found", they purely return 0 on success and a negative error
code on real failures.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
drivers/pci/controller/pci-host-common.c | 29 ++++--------------------
1 file changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
index 2ce6f4b66133..c93de5a10758 100644
--- a/drivers/pci/controller/pci-host-common.c
+++ b/drivers/pci/controller/pci-host-common.c
@@ -108,8 +108,7 @@ static int pci_host_common_parse_perst(struct device *dev,
* dependencies and the driver may fail to operate if required resources
* are missing.
*
- * Return: 0 on success, -ENODEV if PERST# found in RC node (legacy binding
- * should be used), Other negative error codes on failure.
+ * Return: 0 on success, negative error codes on failure.
*/
static int pci_host_common_parse_port(struct device *dev,
struct pci_host_bridge *bridge,
@@ -128,22 +127,6 @@ static int pci_host_common_parse_port(struct device *dev,
if (ret)
return ret;
- /*
- * 1. PERST# found in RP or its child nodes - list is not empty,
- * continue
- *
- * 2. PERST# not found in RP/children, but found in RC node -
- * return -ENODEV to fallback legacy binding
- *
- * 3. PERST# not found anywhere - list is empty, continue (optional
- * PERST#)
- */
- if (list_empty(&port->perst)) {
- if (of_property_present(dev->of_node, "reset-gpios") ||
- of_property_present(dev->of_node, "reset-gpio"))
- return -ENODEV;
- }
-
INIT_LIST_HEAD(&port->list);
list_add_tail(&port->list, &bridge->ports);
@@ -158,13 +141,11 @@ static int pci_host_common_parse_port(struct device *dev,
* Iterate through child nodes of the host bridge and parse Root Port
* properties (currently only reset GPIOs).
*
- * Return: 0 on success, -ENODEV if no ports found or PERST# found in RC
- * node (legacy binding should be used), Other negative error codes on
- * failure.
+ * Return: 0 on success, negative error codes on failure.
*/
int pci_host_common_parse_ports(struct device *dev, struct pci_host_bridge *bridge)
{
- int ret = -ENODEV;
+ int ret = 0;
for_each_available_child_of_node_scoped(dev->of_node, of_port) {
if (!of_node_is_type(of_port, "pci"))
@@ -174,8 +155,8 @@ int pci_host_common_parse_ports(struct device *dev, struct pci_host_bridge *brid
goto err_cleanup;
}
- if (ret)
- return ret;
+ if (list_empty(&bridge->ports))
+ return 0;
return devm_add_action_or_reset(dev, pci_host_common_delete_ports,
&bridge->ports);
--
2.37.1
^ permalink raw reply related
* [PATCH V2 2/2] PCI: imx6: Add imx_pcie_perst_found() to inspect the parsed result
From: Sherry Sun (OSS) @ 2026-05-25 6:54 UTC (permalink / raw)
To: hongxing.zhu, l.stach, Frank.Li, bhelgaas, lpieralisi,
kwilczynski, mani, robh, s.hauer, kernel, festevam, will
Cc: imx, linux-pci, linux-arm-kernel, linux-kernel, sherry.sun
In-Reply-To: <20260525065443.2338629-1-sherry.sun@oss.nxp.com>
From: Sherry Sun <sherry.sun@nxp.com>
Since pci_host_common_parse_port() doesn't return failure for "property
not found" (-ENODEV), the caller should inspect the parsed result and
decide whether to fall back to the legacy binding.
Add imx_pcie_perst_found() to inspect the parsed result.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
---
drivers/pci/controller/dwc/pci-imx6.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index b137551871fc..34756f28fcc6 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1287,6 +1287,18 @@ static void imx_pcie_assert_perst(struct imx_pcie *imx_pcie, bool assert)
}
}
+static bool imx_pcie_perst_found(struct pci_host_bridge *bridge)
+{
+ struct pci_host_port *port;
+
+ list_for_each_entry(port, &bridge->ports, list) {
+ if (!list_empty(&port->perst))
+ return true;
+ }
+
+ return false;
+}
+
static int imx_pcie_host_init(struct dw_pcie_rp *pp)
{
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
@@ -1299,15 +1311,12 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
/* Parse Root Port nodes if present */
ret = pci_host_common_parse_ports(dev, bridge);
if (ret) {
- if (ret != -ENODEV) {
- dev_err(dev, "Failed to parse Root Port nodes: %d\n", ret);
- return ret;
- }
+ dev_err(dev, "Failed to parse Root Port nodes: %d\n", ret);
+ return ret;
+ }
- /*
- * Fall back to legacy binding for DT backwards
- * compatibility
- */
+ /* Fallback to legacy binding for DT backwards compatibility. */
+ if (!imx_pcie_perst_found(bridge)) {
ret = imx_pcie_parse_legacy_binding(imx_pcie);
if (ret)
return ret;
--
2.37.1
^ permalink raw reply related
* Re: [PATCH v14 06/44] arm64: RMI: Check for RMI support at init
From: Gavin Shan @ 2026-05-25 6:58 UTC (permalink / raw)
To: Steven Price, kvm, kvmarm
Cc: Catalin Marinas, Marc Zyngier, Will Deacon, James Morse,
Oliver Upton, Suzuki K Poulose, Zenghui Yu, linux-arm-kernel,
linux-kernel, Joey Gouly, Alexandru Elisei, Christoffer Dall,
Fuad Tabba, linux-coco, Ganapatrao Kulkarni, Shanker Donthineni,
Alper Gun, Aneesh Kumar K . V, Emi Kisanuki, Vishal Annapurve,
WeiLin.Chang, Lorenzo.Pieralisi2
In-Reply-To: <78425c0d-86c5-457f-b171-a4c8dd3acb7d@arm.com>
Hi Steve,
On 5/22/26 1:49 AM, Steven Price wrote:
> On 21/05/2026 01:39, Gavin Shan wrote:
>> On 5/13/26 11:17 PM, Steven Price wrote:
>>> Query the RMI version number and check if it is a compatible version.
>>> The first two feature registers are read and exposed for future code to
>>> use.
>>>
>>> Signed-off-by: Steven Price <steven.price@arm.com>
>>> ---
>>> v14:
>>> * This moves the basic RMI setup into the 'kernel' directory. This is
>>> because RMI will be used for some features outside of KVM so should
>>> be available even if KVM isn't compiled in.
>>> ---
>>> arch/arm64/include/asm/rmi_cmds.h | 3 ++
>>> arch/arm64/kernel/Makefile | 2 +-
>>> arch/arm64/kernel/cpufeature.c | 1 +
>>> arch/arm64/kernel/rmi.c | 65 +++++++++++++++++++++++++++++++
>>> 4 files changed, 70 insertions(+), 1 deletion(-)
>>> create mode 100644 arch/arm64/kernel/rmi.c
>>>
>>
>> [...]
>>
>>> diff --git a/arch/arm64/kernel/rmi.c b/arch/arm64/kernel/rmi.c
>>> new file mode 100644
>>> index 000000000000..99c1ccc35c11
>>> --- /dev/null
>>> +++ b/arch/arm64/kernel/rmi.c
>>> @@ -0,0 +1,65 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/*
>>> + * Copyright (C) 2023-2025 ARM Ltd.
>>> + */
>>> +
>>> +#include <linux/memblock.h>
>>> +
>>> +#include <asm/rmi_cmds.h>
>>> +
>>> +unsigned long rmm_feat_reg0;
>>> +unsigned long rmm_feat_reg1;
>>> +
>>> +static int rmi_check_version(void)
>>> +{
>>> + struct arm_smccc_res res;
>>> + unsigned short version_major, version_minor;
>>> + unsigned long host_version = RMI_ABI_VERSION(RMI_ABI_MAJOR_VERSION,
>>> + RMI_ABI_MINOR_VERSION);
>>> + unsigned long aa64pfr0 =
>>> read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
>>> +
>>> + /* If RME isn't supported, then RMI can't be */
>>> + if (cpuid_feature_extract_unsigned_field(aa64pfr0,
>>> ID_AA64PFR0_EL1_RME_SHIFT) == 0)
>>> + return -ENXIO;
>>> +
>>> + arm_smccc_1_1_invoke(SMC_RMI_VERSION, host_version, &res);
>>> +
>>> + if (res.a0 == SMCCC_RET_NOT_SUPPORTED)
>>> + return -ENXIO;
>>> +
>>> + version_major = RMI_ABI_VERSION_GET_MAJOR(res.a1);
>>> + version_minor = RMI_ABI_VERSION_GET_MINOR(res.a1);
>>> +
>>> + if (res.a0 != RMI_SUCCESS) {
>>> + unsigned short high_version_major, high_version_minor;
>>> +
>>> + high_version_major = RMI_ABI_VERSION_GET_MAJOR(res.a2);
>>> + high_version_minor = RMI_ABI_VERSION_GET_MINOR(res.a2);
>>> +
>>> + pr_err("Unsupported RMI ABI (v%d.%d - v%d.%d) we want v%d.%d\n",
>>> + version_major, version_minor,
>>> + high_version_major, high_version_minor,
>>> + RMI_ABI_MAJOR_VERSION,
>>> + RMI_ABI_MINOR_VERSION);
>>> + return -ENXIO;
>>> + }
>>> +
>>> + pr_info("RMI ABI version %d.%d\n", version_major, version_minor);
>>> +
>>> + return 0;
>>> +}
>>> +
>>> +static int __init arm64_init_rmi(void)
>>> +{
>>> + /* Continue without realm support if we can't agree on a version */
>>> + if (rmi_check_version())
>>> + return 0;
>>
>> Is this still a valid point that we have to return zero on errors returned
>> from rmi_check_version() or other other function calls like rmi_features()?
>> arm64_init_rmi() is triggered by subsys_initcall() where the return value
>> needs to indicate success or failure. It's fine to return error code from
>> arm64_init_rmi() in the path.
>
> Hmm, I guess now this is moved to arm64 code this indeed doesn't need
> to. Within a module I believe an error return can fail the module loading.
>
> I'm not sure it really makes much difference though - if this
> initialisation fails then it's not really an error - it just means the
> feature is unavailable.
>
I think the return value would be consistent to the value of 'arm64_rmi_is_available'.
'arm64_rmi_is_available' is true when zero is returned, otherwise, 'arm64_rmi_is_available'
is false.
With the consistency between the return value and 'arm64_rmi_is_available', users are
able to know the value of 'arm64_rmi_is_available' through kernel parameter 'initcall_debug'.
With the kernel parameter, the initcalls including arm64_init_rmi() are traced and its
return value is outputted in the traced messages, seeing do_trace_initcall_start().
> Thanks,
> Steve
>
>>> +
>>> + if (WARN_ON(rmi_features(0, &rmm_feat_reg0)))
>>> + return 0;
>>> + if (WARN_ON(rmi_features(1, &rmm_feat_reg1)))
>>> + return 0;
>>> +
>>> + return 0;
>>> +}
>>> +subsys_initcall(arm64_init_rmi);
>>
Thanks,
Gavin
^ permalink raw reply
* Re: [PATCH v2 4/5] arm64: dts: rockchip: Enable USB 2.0 ports on ArmSoM Sige1
From: Chukun Pan @ 2026-05-25 7:00 UTC (permalink / raw)
To: heiko; +Cc: jonas, linux-arm-kernel, linux-kernel, linux-rockchip, Chukun Pan
In-Reply-To: <20260505171208.3267387-5-heiko@sntech.de>
Hi,
> +&usb_host0_xhci {
> + extcon = <&usb2phy>;
> + maximum-speed = "high-speed";
> + phys = <&usb2phy_otg>;
> + phy-names = "usb2-phy";
The same warning for this otg port:
[ 0.232211] dwc3 fe500000.usb: Configuration mismatch. dr_mode forced to host
> +&usb2phy_otg {
> + status = "okay";
> +};
OTG port missing: `vbus-supply = <&vcc5v0_usb_otg>;` [1]
[1]
https://drive.google.com/drive/folders/15uvc2lcOAKP0enXezASUhVFLuzkq3IEX
Thanks,
Chukun
^ permalink raw reply
* RE: [PATCH v4 1/3] PCI: Allow ATS to be always on for CXL.cache capable devices
From: Tian, Kevin @ 2026-05-25 6:58 UTC (permalink / raw)
To: Jason Gunthorpe, Liu, Yi L
Cc: Nicolin Chen, will@kernel.org, robin.murphy@arm.com,
bhelgaas@google.com, joro@8bytes.org, praan@google.com,
baolu.lu@linux.intel.com, miko.lenczewski@arm.com,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
dan.j.williams@intel.com, jonathan.cameron@huawei.com,
Vikram Sethi, linux-cxl@vger.kernel.org, nirmoyd@nvidia.com
In-Reply-To: <20260521130544.GE3602937@nvidia.com>
> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Thursday, May 21, 2026 9:06 PM
>
> On Thu, May 21, 2026 at 03:31:46PM +0800, Yi Liu wrote:
>
> > Does this hardware behavior satisfy the security expectation you have in
> > mind? Or do you still require that both the DTE bit and the PCI ATS
> > capability be explicitly disabled when a blocking domain is in effect?
>
> If the HW rejects translated TLPs then you should be clearing the ATS
> enable bit in the device config space prior to rejecting them
>
> But it does seem secure enough as-is.
>
yeah we need disable ATS explicitly instead of relying on some implicit
behavior...
^ permalink raw reply
* [PATCH] drm: zynqmp_dp: Fix uninitialized variable in debugfs()
From: Dan Carpenter @ 2026-05-25 7:16 UTC (permalink / raw)
To: Sean Anderson
Cc: Laurent Pinchart, Tomi Valkeinen, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Michal Simek, dri-devel, linux-arm-kernel, linux-kernel,
kernel-janitors
If the *ppos is non-zero then simple_write_to_buffer() will not
initialize the start of the buf[] buffer. It doesn't really make sense
to allow non-zero values for *ppos, so check for that at the start and
return -EINVAL.
Fixes: 28edaacb821c ("drm: zynqmp_dp: Add debugfs interface for compliance testing")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index 7fb11b0a44f0..847179476041 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -1888,6 +1888,9 @@ static ssize_t zynqmp_dp_pattern_write(struct file *file,
ssize_t ret;
int pattern;
+ if (*ppos != 0)
+ return -EINVAL;
+
ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf,
count);
if (ret < 0)
@@ -2028,6 +2031,9 @@ static ssize_t zynqmp_dp_custom_write(struct file *file,
ssize_t ret;
char buf[sizeof(dp->test.custom)];
+ if (*ppos != 0)
+ return -EINVAL;
+
ret = simple_write_to_buffer(buf, sizeof(buf), ppos, user_buf, count);
if (ret < 0)
return ret;
--
2.53.0
^ permalink raw reply related
* RE: [PATCH v2] clk: imx: Add audio PLL debugfs for K-divider control
From: Jacky Bai @ 2026-05-25 7:20 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Abel Vesa, Peng Fan, Michael Turquette, Stephen Boyd,
Brian Masney, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-clk@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <ahOpfhw/UaXoILzE@shlinux89>
> Subject: Re: [PATCH v2] clk: imx: Add audio PLL debugfs for K-divider control
>
[..]
> >@@ -374,9 +379,13 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw,
> unsigned long drate,
> > div_ctl0 |= FIELD_PREP(SDIV_MASK, rate.sdiv);
> > writel_relaxed(div_ctl0, pll->base + DIV_CTL0);
> >
> >+ spin_lock_irqsave(&pll->lock, flags);
>
> Should this lock also protect the setting to DIV_CTL0?
>
I can add the DIV_CTL0 into the lock scope in next version.
The AI review agent's comment for the spinlock stuff is just let the code looks
like correct and useful, but useless in this audio pll debugfs real use case.
BR
> >+
> > writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv),
> > pll->base + DIV_CTL1);
> >
> >+ spin_unlock_irqrestore(&pll->lock, flags);
> >+
> > return 0;
> > }
> >
> >@@ -394,8 +403,12 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw,
> unsigned long drate,
> > FIELD_PREP(SDIV_MASK, rate.sdiv);
> > writel_relaxed(div_ctl0, pll->base + DIV_CTL0);
> >
> >+ spin_lock_irqsave(&pll->lock, flags);
>
> Ditto.
>
> >+
> > writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv), pll->base +
> > DIV_CTL1);
> >
> >+ spin_unlock_irqrestore(&pll->lock, flags);
> >+
> > /*
> > * According to SPEC, t3 - t2 need to be greater than
> > * 1us and 1/FREF, respectively.
> >@@ -508,6 +521,8 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct
> device *dev, const char *name,
> > if (!pll)
> > return ERR_PTR(-ENOMEM);
> >
> >+ spin_lock_init(&pll->lock);
> >+
> > init.name = name;
> > init.flags = pll_clk->flags;
> > init.parent_names = &parent_name;
> >@@ -551,3 +566,95 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct
> device *dev, const char *name,
> > return hw;
> > }
> > EXPORT_SYMBOL_GPL(imx_dev_clk_hw_pll14xx);
> >+
> >+/*
> >+ * Debugfs interface for Audio PLL runtime monitoring and control
> >+ *
> >+ * This interface allows dynamic adjustment of the Audio PLL
> >+ * K-divider for precise frequency tuning, particularly useful
> >+ * for audio applications.
> >+ *
> >+ * examples for the usage of the two interfaces:
> >+ * 1): Get the current PLL setting of dividers
> >+ * cat
> /sys/kernel/debug/audio_pll_monitor/audio_pll1/pll_parameter
> >+ *
> >+ * 2): Adjust the K-divider by a small delta_k
> >+ * echo 1 > /sys/kernel/debug/audio_pll_monitor/audio_pll1/delta_k;
> >+ */
> >+#ifdef CONFIG_DEBUG_FS
> >+static int pll_delta_k_get(void *data, u64 *val) {
> >+ struct clk_pll14xx *pll = to_clk_pll14xx(data);
> >+ *val = pll->delta_k;
> >+ return 0;
> >+}
> >+
> >+static int pll_delta_k_set(void *data, u64 val) {
> >+ struct clk_pll14xx *pll = to_clk_pll14xx(data);
> >+ unsigned long flags;
> >+ u32 div_ctl1;
> >+ s16 kdiv, delta_k;
> >+
> >+ delta_k = (s16)clamp_t(long, val, KDIV_MIN, KDIV_MAX);
> >+ pll->delta_k = delta_k;
> >+
> >+ spin_lock_irqsave(&pll->lock, flags);
> >+
> >+ div_ctl1 = readl_relaxed(pll->base + DIV_CTL1);
> >+ kdiv = (s16)FIELD_GET(KDIV_MASK, div_ctl1);
> >+ kdiv = (s16)clamp_t(s32, (s32)kdiv + delta_k, KDIV_MIN, KDIV_MAX);
> >+ writel_relaxed(FIELD_PREP(KDIV_MASK, kdiv), pll->base + DIV_CTL1);
> >+
> >+ spin_unlock_irqrestore(&pll->lock, flags);
> >+
> >+ return 0;
> >+}
> >+DEFINE_DEBUGFS_ATTRIBUTE_SIGNED(delta_k_fops, pll_delta_k_get,
> >+pll_delta_k_set, "%lld\n");
> >+
> >+static int pll_setting_show(struct seq_file *s, void *data) {
> >+ struct clk_pll14xx *pll = to_clk_pll14xx(s->private);
> >+ u32 div_ctl0, div_ctl1;
> >+ u32 mdiv, pdiv, sdiv, kdiv;
> >+
> >+ div_ctl0 = readl_relaxed(pll->base + DIV_CTL0);
> >+ div_ctl1 = readl_relaxed(pll->base + DIV_CTL1);
>
> sashiko-bot brings a valid concern, you may need to protect the read
> operation.
>
> [1]https://lore.kernel.org/all/20260519095044.996B7C2BCB3@smtp.kernel.
> org/
>
>
> Regards
> Peng
>
> >+
> >+ mdiv = FIELD_GET(MDIV_MASK, div_ctl0);
> >+ pdiv = FIELD_GET(PDIV_MASK, div_ctl0);
> >+ sdiv = FIELD_GET(SDIV_MASK, div_ctl0);
> >+ kdiv = FIELD_GET(KDIV_MASK, div_ctl1);
> >+
> >+ seq_printf(s, "Mdiv: 0x%x; Pdiv: 0x%x; Sdiv: 0x%x; Kdiv: 0x%x\n",
> >+ mdiv, pdiv, sdiv, kdiv);
> >+
> >+ return 0;
> >+}
> >+DEFINE_SHOW_ATTRIBUTE(pll_setting);
> >+
> >+void imx_audio_pll_debug_init(struct clk_hw *hws[], unsigned int
> >+num_plls) {
> >+ struct dentry *rootdir, *audio_pll_dir;
> >+ const char *pll_name;
> >+ int i;
> >+
> >+ rootdir = debugfs_create_dir("audio_pll_monitor", NULL);
> >+
> >+ for (i = 0; i < num_plls; i++) {
> >+ if (!IS_ERR_OR_NULL(hws[i])) {
> >+ pll_name = clk_hw_get_name(hws[i]);
> >+ audio_pll_dir = debugfs_create_dir(pll_name, rootdir);
> >+ debugfs_create_file_unsafe("delta_k", 0600, audio_pll_dir,
> >+ hws[i], &delta_k_fops);
> >+ debugfs_create_file("pll_parameter", 0444, audio_pll_dir,
> >+ hws[i], &pll_setting_fops);
> >+ }
> >+ }
> >+}
> >+#else /* !CONFIG_DEBUG_FS */
> >+void imx_audio_pll_debug_init(struct clk_hw *hws[], unsigned int
> >+num_plls) { } #endif /* CONFIG_DEBUG_FS */
> >+EXPORT_SYMBOL_GPL(imx_audio_pll_debug_init);
> >diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index
> >aa5202f284f3d1b7c1b4bf65e2329831832b43a5..16e0bafa0c9b99cb4eee37
> a216e0a
> >274d27f11fc 100644
> >--- a/drivers/clk/imx/clk.h
> >+++ b/drivers/clk/imx/clk.h
> >@@ -487,4 +487,5 @@ struct clk_hw *imx_clk_gpr_mux(const char *name,
> const char *compatible,
> > u32 reg, const char **parent_names,
> > u8 num_parents, const u32 *mux_table, u32 mask);
> >
> >+void imx_audio_pll_debug_init(struct clk_hw **hws, unsigned int
> >+num_plls);
> > #endif
> >
> >---
> >base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
> >change-id: 20260421-imx8m_pll_debugfs-246d0fbbb617
> >
> >Best regards,
> >--
> >Jacky Bai <ping.bai@nxp.com>
> >
^ permalink raw reply
* [PATCH] dmaengine: sun6i-dma: Fix use-after-free in error handling paths
From: Hongling Zeng @ 2026-05-25 7:35 UTC (permalink / raw)
To: vkoul, Frank.Li, wens, jernej.skrabec, samuel, mripard, arnd
Cc: dmaengine, linux-arm-kernel, linux-sunxi, linux-kernel,
zhongling0719, Hongling Zeng
In error handling paths, the for loop frees v_lli in the loop body,
then accesses v_lli->v_lli_next and v_lli->p_lli_next in the
increment expression, which is use-after-free.
Fix by saving both the next virtual and physical pointers before
freeing the current node.
Fixes: 555859308723 ("dmaengine: Add driver for Allwinner sun6i DMA")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
---
drivers/dma/sun6i-dma.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index a9a254dbf8cb..eb9c4ae87ac8 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -788,9 +788,15 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
return vchan_tx_prep(&vchan->vc, &txd->vd, flags);
err_lli_free:
- for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli;
- p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next)
+ p_lli = txd->p_lli;
+ v_lli = txd->v_lli;
+ while (v_lli) {
+ struct sun6i_dma_lli *next_v_lli = v_lli->v_lli_next;
+ dma_addr_t next_p_lli = v_lli->p_lli_next;
dma_pool_free(sdev->pool, v_lli, p_lli);
+ v_lli = next_v_lli;
+ p_lli = next_p_lli;
+ }
kfree(txd);
return NULL;
}
@@ -869,9 +875,15 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic(
return vchan_tx_prep(&vchan->vc, &txd->vd, flags);
err_lli_free:
- for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli;
- p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next)
+ p_lli = txd->p_lli;
+ v_lli = txd->v_lli;
+ while (v_lli) {
+ struct sun6i_dma_lli *next_v_lli = v_lli->v_lli_next;
+ dma_addr_t next_p_lli = v_lli->p_lli_next;
dma_pool_free(sdev->pool, v_lli, p_lli);
+ v_lli = next_v_lli;
+ p_lli = next_p_lli;
+ }
kfree(txd);
return NULL;
}
--
2.25.1
^ permalink raw reply related
* Re: [PATCH v2 2/5] arm64: dts: rockchip: Enable USB 2.0 ports on Radxa E20C
From: Chukun Pan @ 2026-05-25 6:50 UTC (permalink / raw)
To: heiko; +Cc: jonas, linux-arm-kernel, linux-kernel, linux-rockchip, Chukun Pan
In-Reply-To: <20260505171208.3267387-3-heiko@sntech.de>
Hi,
> +&usb_host0_xhci {
> + extcon = <&usb2phy>;
> + maximum-speed = "high-speed";
> + phys = <&usb2phy_otg>;
> + phy-names = "usb2-phy";
I received this warning for this otg port:
[ 0.163307] dwc3 fe500000.usb: Configuration mismatch. dr_mode forced to host
> + snps,dis_u2_susphy_quirk;
This property is missing in the sige1 patch. Since this property
is related to phy vbus detection, can we move it to rk3528.dtsi?
Thanks,
Chukun
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox