Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'iommu-fixes-v5.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

- Fix a memory leak when dev_iommu gets freed and a sub-pointer does
not

- Build dependency fixes for Mediatek, spapr_tce, and Intel IOMMU
driver

- Export iommu_group_get_for_dev() only for GPLed modules

- Fix AMD IOMMU interrupt remapping when x2apic is enabled

- Fix error path in the QCOM IOMMU driver probe function

* tag 'iommu-fixes-v5.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/qcom: Fix local_base status check
iommu: Properly export iommu_group_get_for_dev()
iommu/vt-d: Use right Kconfig option name
iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system
iommu: spapr_tce: Disable compile testing to fix build on book3s_32 config
iommu/mediatek: Fix MTK_IOMMU dependencies
iommu: Fix the memory leak in dev_iommu_free()

+11 -7
+2 -2
drivers/iommu/Kconfig
··· 362 363 config SPAPR_TCE_IOMMU 364 bool "sPAPR TCE IOMMU Support" 365 - depends on PPC_POWERNV || PPC_PSERIES || (PPC && COMPILE_TEST) 366 select IOMMU_API 367 help 368 Enables bits of IOMMU API required by VFIO. The iommu_ops ··· 457 458 config MTK_IOMMU 459 bool "MTK IOMMU Support" 460 - depends on ARM || ARM64 || COMPILE_TEST 461 depends on ARCH_MEDIATEK || COMPILE_TEST 462 select ARM_DMA_USE_IOMMU 463 select IOMMU_API
··· 362 363 config SPAPR_TCE_IOMMU 364 bool "sPAPR TCE IOMMU Support" 365 + depends on PPC_POWERNV || PPC_PSERIES 366 select IOMMU_API 367 help 368 Enables bits of IOMMU API required by VFIO. The iommu_ops ··· 457 458 config MTK_IOMMU 459 bool "MTK IOMMU Support" 460 + depends on HAS_DMA 461 depends on ARCH_MEDIATEK || COMPILE_TEST 462 select ARM_DMA_USE_IOMMU 463 select IOMMU_API
+1 -1
drivers/iommu/amd_iommu_init.c
··· 2936 { 2937 for (; *str; ++str) { 2938 if (strncmp(str, "legacy", 6) == 0) { 2939 - amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY; 2940 break; 2941 } 2942 if (strncmp(str, "vapic", 5) == 0) {
··· 2936 { 2937 for (; *str; ++str) { 2938 if (strncmp(str, "legacy", 6) == 0) { 2939 + amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA; 2940 break; 2941 } 2942 if (strncmp(str, "vapic", 5) == 0) {
+2 -2
drivers/iommu/intel-iommu.c
··· 371 int dmar_disabled = 1; 372 #endif /* CONFIG_INTEL_IOMMU_DEFAULT_ON */ 373 374 - #ifdef INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON 375 int intel_iommu_sm = 1; 376 #else 377 int intel_iommu_sm; 378 - #endif /* INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON */ 379 380 int intel_iommu_enabled = 0; 381 EXPORT_SYMBOL_GPL(intel_iommu_enabled);
··· 371 int dmar_disabled = 1; 372 #endif /* CONFIG_INTEL_IOMMU_DEFAULT_ON */ 373 374 + #ifdef CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON 375 int intel_iommu_sm = 1; 376 #else 377 int intel_iommu_sm; 378 + #endif /* CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON */ 379 380 int intel_iommu_enabled = 0; 381 EXPORT_SYMBOL_GPL(intel_iommu_enabled);
+2 -1
drivers/iommu/iommu.c
··· 170 171 static void dev_iommu_free(struct device *dev) 172 { 173 kfree(dev->iommu); 174 dev->iommu = NULL; 175 } ··· 1429 1430 return group; 1431 } 1432 - EXPORT_SYMBOL(iommu_group_get_for_dev); 1433 1434 struct iommu_domain *iommu_group_default_domain(struct iommu_group *group) 1435 {
··· 170 171 static void dev_iommu_free(struct device *dev) 172 { 173 + iommu_fwspec_free(dev); 174 kfree(dev->iommu); 175 dev->iommu = NULL; 176 } ··· 1428 1429 return group; 1430 } 1431 + EXPORT_SYMBOL_GPL(iommu_group_get_for_dev); 1432 1433 struct iommu_domain *iommu_group_default_domain(struct iommu_group *group) 1434 {
+4 -1
drivers/iommu/qcom_iommu.c
··· 824 qcom_iommu->dev = dev; 825 826 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 827 - if (res) 828 qcom_iommu->local_base = devm_ioremap_resource(dev, res); 829 830 qcom_iommu->iface_clk = devm_clk_get(dev, "iface"); 831 if (IS_ERR(qcom_iommu->iface_clk)) {
··· 824 qcom_iommu->dev = dev; 825 826 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 827 + if (res) { 828 qcom_iommu->local_base = devm_ioremap_resource(dev, res); 829 + if (IS_ERR(qcom_iommu->local_base)) 830 + return PTR_ERR(qcom_iommu->local_base); 831 + } 832 833 qcom_iommu->iface_clk = devm_clk_get(dev, "iface"); 834 if (IS_ERR(qcom_iommu->iface_clk)) {