From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anshuman Khandual Date: Thu, 24 Feb 2022 10:30:59 +0000 Subject: Re: [PATCH 07/11] x86: remove the IOMMU table infrastructure Message-Id: List-Id: References: <20220222153514.593231-1-hch@lst.de> <20220222153514.593231-8-hch@lst.de> In-Reply-To: <20220222153514.593231-8-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Hellwig , iommu@lists.linux-foundation.org Cc: x86@kernel.org, Stefano Stabellini , Boris Ostrovsky , Juergen Gross , Joerg Roedel , David Woodhouse , Lu Baolu , Robin Murphy , linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-hyperv@vger.kernel.org, tboot-devel@lists.sourceforge.net, linux-pci@vger.kernel.org On 2/22/22 9:05 PM, Christoph Hellwig wrote: > The IOMMU table tries to separate the different IOMMUs into different > backends, but actually requires various cross calls. > > Rewrite the code to do the generic swiotlb/swiotlb-xen setup directly > in pci-dma.c and then just call into the IOMMU drivers. > > Signed-off-by: Christoph Hellwig > --- > arch/ia64/include/asm/iommu_table.h | 7 -- > arch/x86/include/asm/dma-mapping.h | 1 - > arch/x86/include/asm/gart.h | 5 +- > arch/x86/include/asm/iommu.h | 6 ++ > arch/x86/include/asm/iommu_table.h | 102 ---------------------- > arch/x86/include/asm/swiotlb.h | 30 ------- > arch/x86/include/asm/xen/swiotlb-xen.h | 2 - > arch/x86/kernel/Makefile | 2 - > arch/x86/kernel/amd_gart_64.c | 5 +- > arch/x86/kernel/aperture_64.c | 14 ++-- > arch/x86/kernel/pci-dma.c | 112 ++++++++++++++++++++----- > arch/x86/kernel/pci-iommu_table.c | 77 ----------------- > arch/x86/kernel/pci-swiotlb.c | 77 ----------------- > arch/x86/kernel/tboot.c | 1 - > arch/x86/kernel/vmlinux.lds.S | 12 --- > arch/x86/xen/Makefile | 2 - > arch/x86/xen/pci-swiotlb-xen.c | 96 --------------------- > drivers/iommu/amd/init.c | 6 -- > drivers/iommu/amd/iommu.c | 5 +- > drivers/iommu/intel/dmar.c | 6 +- > include/linux/dmar.h | 6 +- > 21 files changed, 115 insertions(+), 459 deletions(-) > delete mode 100644 arch/ia64/include/asm/iommu_table.h > delete mode 100644 arch/x86/include/asm/iommu_table.h > delete mode 100644 arch/x86/include/asm/swiotlb.h > delete mode 100644 arch/x86/kernel/pci-iommu_table.c > delete mode 100644 arch/x86/kernel/pci-swiotlb.c > delete mode 100644 arch/x86/xen/pci-swiotlb-xen.c checkpatch.pl has some warnings here. WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #44: deleted file mode 100644 WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... #496: FILE: arch/x86/kernel/pci-dma.c:171: + printk(KERN_INFO "PCI-DMA: " WARNING: quoted string split across lines #497: FILE: arch/x86/kernel/pci-dma.c:172: + printk(KERN_INFO "PCI-DMA: " + "Using software bounce buffering for IO (SWIOTLB)\n"); ERROR: trailing whitespace #881: FILE: drivers/iommu/amd/iommu.c:1837: +^Iif (iommu_default_passthrough() || sme_me_mask) $ total: 1 errors, 3 warnings, 389 lines checked