From: Robin Murphy <robin.murphy@arm.com>
To: "Jason Gunthorpe" <jgg@nvidia.com>,
"Ricardo Cañuelo" <ricardo.canuelo@collabora.com>,
"Yong Wu" <yong.wu@mediatek.com>,
linux-mediatek@lists.infradead.org
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
llvm@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Miguel Ojeda <ojeda@kernel.org>, Tom Rix <trix@redhat.com>,
Will Deacon <will@kernel.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Heiko Stuebner <heiko@sntech.de>,
Kevin Tian <kevin.tian@intel.com>,
Nicolin Chen <nicolinc@nvidia.com>,
Niklas Schnelle <schnelle@linux.ibm.com>
Subject: Re: [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach
Date: Mon, 5 Jun 2023 15:00:24 +0100 [thread overview]
Message-ID: <01dee34c-5663-22f4-0d88-90f87b1fe879@arm.com> (raw)
In-Reply-To: <ZH3nXbVFR6JfUKpV@nvidia.com>
On 2023-06-05 14:47, Jason Gunthorpe wrote:
> On Mon, Jun 05, 2023 at 09:09:59AM +0200, Ricardo Cañuelo wrote:
>> [ 16.267594] Call trace:
>> [ 16.267597] mtk_iommu_flush_iotlb_all+0x18/0x70
>> [ 16.267603] iommu_create_device_direct_mappings.part.0+0x13c/0x21c
>> [ 16.267608] iommu_setup_default_domain+0x27c/0x430
>> [ 16.267611] iommu_probe_device+0x7c/0x144
>> [ 16.267615] of_iommu_configure+0x114/0x200
>> [ 16.267619] of_dma_configure_id+0x1e0/0x3b4
>
> This is definitely some problem in the mtk driver.. But I can't guess
> what is wrong:
>
> static void mtk_iommu_flush_iotlb_all(struct iommu_domain *domain)
> {
> struct mtk_iommu_domain *dom = to_mtk_domain(domain);
>
> if (dom->bank)
> mtk_iommu_tlb_flush_all(dom->bank->parent_data);
> }
>
> We know domain != NULL since the caller checked (and de-ref'd)
> it.
>
> dom->bank should either be NULL (if pre-finalize) or a devm tracked
> pointer.
>
> parent_data is always valid if bank is valid.
>
> So I'm at a loss.. Can you debug a bit more and find out where mtk is
> crashing?
The log says it's next-20230530 - the fix you're seeing there from
commit b3fc95709c54 landed 2 days later :)
Robin.
next prev parent reply other threads:[~2023-06-05 14:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 4:41 [PATCH v5 00/17] Consolidate the error handling around device attachment Jason Gunthorpe
2023-05-11 4:41 ` [PATCH v5 01/17] iommu: Replace iommu_group_device_count() with list_count_nodes() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 02/17] iommu: Add for_each_group_device() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 03/17] iommu: Make __iommu_group_set_domain() handle error unwind Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 04/17] iommu: Use __iommu_group_set_domain() for __iommu_attach_group() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 05/17] iommu: Use __iommu_group_set_domain() in iommu_change_dev_def_domain() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 06/17] iommu: Replace __iommu_group_dma_first_attach() with set_domain Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 07/17] iommu: Remove iommu_group_do_dma_first_attach() from iommu_group_add_device() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 08/17] iommu: Replace iommu_group_do_dma_first_attach with __iommu_device_set_domain Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 09/17] iommu: Fix iommu_probe_device() to attach the right domain Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach Jason Gunthorpe
2023-06-05 7:09 ` Ricardo Cañuelo
2023-06-05 13:47 ` Jason Gunthorpe
2023-06-05 14:00 ` Robin Murphy [this message]
2023-06-05 14:11 ` Jason Gunthorpe
2023-06-06 5:33 ` Ricardo Cañuelo
2023-05-11 4:42 ` [PATCH v5 11/17] iommu: Remove the assignment of group->domain during default domain alloc Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 12/17] iommu: Consolidate the code to calculate the target default domain type Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 13/17] iommu: Revise iommu_group_alloc_default_domain() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 14/17] iommu: Consolidate the default_domain setup to one function Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 15/17] iommu: Allow IOMMU_RESV_DIRECT to work on ARM Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 16/17] iommu: Remove __iommu_group_for_each_dev() Jason Gunthorpe
2023-05-11 4:42 ` [PATCH v5 17/17] iommu: Tidy the control flow in iommu_group_store_type() Jason Gunthorpe
2023-05-23 6:16 ` [PATCH v5 00/17] Consolidate the error handling around device attachment Joerg Roedel
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=01dee34c-5663-22f4-0d88-90f87b1fe879@arm.com \
--to=robin.murphy@arm.com \
--cc=baolu.lu@linux.intel.com \
--cc=heiko@sntech.de \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolinc@nvidia.com \
--cc=ojeda@kernel.org \
--cc=ricardo.canuelo@collabora.com \
--cc=schnelle@linux.ibm.com \
--cc=trix@redhat.com \
--cc=will@kernel.org \
--cc=yong.wu@mediatek.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