* Re: [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach [not found] ` <20230605070959.moupivvi7wr4nibu@rcn-XPS-13-9305> @ 2023-06-05 13:47 ` Jason Gunthorpe 2023-06-05 14:00 ` Robin Murphy 0 siblings, 1 reply; 4+ messages in thread From: Jason Gunthorpe @ 2023-06-05 13:47 UTC (permalink / raw) To: Ricardo Cañuelo, Yong Wu, linux-mediatek Cc: iommu, Joerg Roedel, llvm, Nathan Chancellor, Nick Desaulniers, Miguel Ojeda, Robin Murphy, Tom Rix, Will Deacon, Lu Baolu, Heiko Stuebner, Kevin Tian, Nicolin Chen, Niklas Schnelle 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? Thanks, Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach 2023-06-05 13:47 ` [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach Jason Gunthorpe @ 2023-06-05 14:00 ` Robin Murphy 2023-06-05 14:11 ` Jason Gunthorpe 2023-06-06 5:33 ` Ricardo Cañuelo 0 siblings, 2 replies; 4+ messages in thread From: Robin Murphy @ 2023-06-05 14:00 UTC (permalink / raw) To: Jason Gunthorpe, Ricardo Cañuelo, Yong Wu, linux-mediatek Cc: iommu, Joerg Roedel, llvm, Nathan Chancellor, Nick Desaulniers, Miguel Ojeda, Tom Rix, Will Deacon, Lu Baolu, Heiko Stuebner, Kevin Tian, Nicolin Chen, Niklas Schnelle 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach 2023-06-05 14:00 ` Robin Murphy @ 2023-06-05 14:11 ` Jason Gunthorpe 2023-06-06 5:33 ` Ricardo Cañuelo 1 sibling, 0 replies; 4+ messages in thread From: Jason Gunthorpe @ 2023-06-05 14:11 UTC (permalink / raw) To: Robin Murphy Cc: Ricardo Cañuelo, Yong Wu, linux-mediatek, iommu, Joerg Roedel, llvm, Nathan Chancellor, Nick Desaulniers, Miguel Ojeda, Tom Rix, Will Deacon, Lu Baolu, Heiko Stuebner, Kevin Tian, Nicolin Chen, Niklas Schnelle On Mon, Jun 05, 2023 at 03:00:24PM +0100, Robin Murphy wrote: > 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 :) Ah, I was looking at Joerg's tree, mystery solved then :) Thanks, Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach 2023-06-05 14:00 ` Robin Murphy 2023-06-05 14:11 ` Jason Gunthorpe @ 2023-06-06 5:33 ` Ricardo Cañuelo 1 sibling, 0 replies; 4+ messages in thread From: Ricardo Cañuelo @ 2023-06-06 5:33 UTC (permalink / raw) To: Robin Murphy, Jason Gunthorpe, Yong Wu, linux-mediatek Cc: iommu, Joerg Roedel, llvm, Nathan Chancellor, Nick Desaulniers, Miguel Ojeda, Tom Rix, Will Deacon, Lu Baolu, Heiko Stuebner, Kevin Tian, Nicolin Chen, Niklas Schnelle Hi all, On 5/6/23 16:00, Robin Murphy wrote: > The log says it's next-20230530 - the fix you're seeing there from commit b3fc95709c54 landed 2 days later :) Thanks for checking that out Robin, KernelCI still hasn't run that build but I tested it manually and the issue is not there anymore. #regzbot fix: b3fc95709c54 Cheers, Ricardo ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-06 5:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <0-v5-1b99ae392328+44574-iommu_err_unwind_jgg@nvidia.com>
[not found] ` <10-v5-1b99ae392328+44574-iommu_err_unwind_jgg@nvidia.com>
[not found] ` <20230605070959.moupivvi7wr4nibu@rcn-XPS-13-9305>
2023-06-05 13:47 ` [PATCH v5 10/17] iommu: Do iommu_group_create_direct_mappings() before attach Jason Gunthorpe
2023-06-05 14:00 ` Robin Murphy
2023-06-05 14:11 ` Jason Gunthorpe
2023-06-06 5:33 ` Ricardo Cañuelo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox