mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Emanuele Ghidoli <ghidoliemanuele@gmail.com>
To: Rosen Penev <rosenp@gmail.com>, Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Horia Geantă" <horia.geanta@nxp.com>,
	"Pankaj Gupta" <pankaj.gupta@nxp.com>,
	"Gaurav Jain" <gaurav.jain@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	regressions@lists.linux.dev,
	"Emanuele Ghidoli" <emanuele.ghidoli@toradex.com>
Subject: Re: [PATCH] crypto: caam: simplify probe resource and IRQ handling
Date: Tue,  1 Sep 2026 21:45:19 +0200	[thread overview]
Message-ID: <20260901194524.908240-1-ghidoliemanuele@gmail.com> (raw)
In-Reply-To: <20260730204722.1101805-1-rosenp@gmail.com>

On Thu, Jul 30, 2026 at 01:47:22PM -0700, Rosen Penev wrote:
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequence with devm_platform_ioremap_resource(), which fetches the
> resource, requests the region and maps it in one call.
>
> Each fsl,sec-*-job-ring node has a distinct 0x10000 reg region and
> interrupts property, so the region reservation added by
> devm_ioremap_resource() is exclusive and does not introduce overlap
> failures.

This patch, now commit 9a955c0a7d11 in v7.3-rc1, breaks CAAM on most i.MX
SoCs (i.MX6, i.MX7, i.MX8). All job rings fail to probe and the machine
loses its hardware RNG:

  caam_jr 30902000.jr: error -EBUSY: can't request region for resource [mem 0x30902000-0x30902fff]
  caam_jr 30902000.jr: probe with driver caam_jr failed with error -16
  caam_jr 30903000.jr: error -EBUSY: can't request region for resource [mem 0x30903000-0x30903fff]
  caam_jr 30903000.jr: probe with driver caam_jr failed with error -16

The job rings do not overlap each other, but they all sit inside the reg
window of their parent fsl,sec-v4.0 node, which caam_probe() already
reserves exclusively via devm_of_iomap() before it populates the children.
So each job ring now collides with its own parent.

Seen on these boards (CI/CD):
 - apalis-imx6
 - apalis-imx8
 - colibri-imx6
 - colibri-imx7
 - colibri-imx8
 - verdin-imx8mm
 - verdin-imx8mp

Reverting 9a955c0a7d11 on colibri-imx7 makes the errors disappear.

#regzbot introduced: 9a955c0a7d11

Thanks,
Emanuele

  parent reply	other threads:[~2026-09-01 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 20:47 Rosen Penev
2026-08-10  8:07 ` Herbert Xu
2026-08-10  8:33 ` Herbert Xu
2026-09-01 19:45 ` Emanuele Ghidoli [this message]
2026-09-01 20:39   ` Rosen Penev

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=20260901194524.908240-1-ghidoliemanuele@gmail.com \
    --to=ghidoliemanuele@gmail.com \
    --cc=davem@davemloft.net \
    --cc=emanuele.ghidoli@toradex.com \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=regressions@lists.linux.dev \
    --cc=rosenp@gmail.com \
    /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

all inboxes | Powered by JetHome®