On Tue, 21 Sep 2021 16:39:34 +0100, Sven Peter <s...@svenpeter.dev> wrote: > > apple_dart_tlb_flush_{all,walk} expect to get a struct apple_dart_domain > but instead get a struct iommu_domain right now. This breaks those two > functions and can lead to kernel panics like the one below. > DART can only invalidate the entire TLB and apple_dart_iotlb_sync will > already flush everything. There's no need to do that again inside those > two functions. Let's just drop them. > > pci 0000:03:00.0: Removing from iommu group 1 > Unable to handle kernel paging request at virtual address 0000000100000023 > [...] > Call trace: > _raw_spin_lock_irqsave+0x54/0xbc > apple_dart_hw_stream_command.constprop.0+0x2c/0x130 > apple_dart_tlb_flush_all+0x48/0x90 > free_io_pgtable_ops+0x40/0x70 > apple_dart_domain_free+0x2c/0x44 > iommu_group_release+0x68/0xac > kobject_cleanup+0x4c/0x1fc > kobject_cleanup+0x14c/0x1fc > kobject_put+0x64/0x84 > iommu_group_remove_device+0x110/0x180 > iommu_release_device+0x50/0xa0 > [...] > > Fixes: 46d1fb072e76b161 ("iommu/dart: Add DART iommu driver") > Reported-by: Marc Zyngier <m...@kernel.org> > Signed-off-by: Sven Peter <s...@svenpeter.dev>
Thanks for addressing this so quickly. Acked-by: Marc Zyngier <m...@kernel.org> Tested-by: Marc Zyngier <m...@kernel.org> M. -- Without deviation from the norm, progress is not possible. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu