From: Jason Gunthorpe <jgg@nvidia.com>
To: Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: iommu@lists.linux.dev,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] iommu: __iommu_attach_group: check for non-NULL blocking_domain
Date: Mon, 29 Sep 2025 09:07:34 -0300 [thread overview]
Message-ID: <20250929120734.GG2617119@nvidia.com> (raw)
In-Reply-To: <9a3ebe9b-518e-49ef-b87d-925d951a446f@kernel.org>
On Mon, Sep 29, 2025 at 10:23:47AM +0200, Hans Verkuil wrote:
> Since I am unfamiliar with the iommu core code, I am uncertain whether I am
> just papering over a bug elsewhere, or whether this is really the correct solution.
It is papering over something, group->domain is not supposed to be
NULL at this point.. That probably means the iommu driver has not been
fully setup yet.
This is ARM32? It should have gone down this path:
static int iommu_get_default_domain_type(struct iommu_group *group,
int target_type)
{
if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)) {
static_assert(!(IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) &&
IS_ENABLED(CONFIG_IOMMU_DMA)));
driver_type = IOMMU_DOMAIN_IDENTITY;
And I thought there shouldn't be a way to get here:
> drivers/media/platform/ti/omap3isp/isp.c, function isp_attach_iommu().
With a NULL group->domain?
Maybe it didn't call iommu_setup_default_domain() in the right
sequence for some reason?
Can you inspect around this?
Jason
next prev parent reply other threads:[~2025-09-29 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 8:23 [PATCH] iommu: __iommu_attach_group: check for non-NULL blocking_domain Hans Verkuil
2025-09-29 12:07 ` Jason Gunthorpe [this message]
2025-09-29 12:18 ` Hans Verkuil
2025-09-29 13:02 ` Jason Gunthorpe
2025-09-29 13:30 ` Hans Verkuil
2025-09-29 13:53 ` Jason Gunthorpe
2025-09-30 10:28 ` Robin Murphy
2025-10-01 6:03 ` Sakari Ailus
2025-10-01 15:44 ` Jason Gunthorpe
2025-10-07 9:38 ` Hans Verkuil
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=20250929120734.GG2617119@nvidia.com \
--to=jgg@nvidia.com \
--cc=hverkuil+cisco@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/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