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-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Joerg writes:
"IOMMU Fixes for Linux v4.19-rc5

Three fixes queued up:

- Warning fix for Rockchip IOMMU where there were IRQ handlers
for offlined hardware.

- Fix for Intel VT-d because recent changes caused boot failures
on some machines because it tried to allocate to much
contiguous memory.

- Fix for AMD IOMMU to handle eMMC devices correctly that appear
as ACPI HID devices."

* tag 'iommu-fixes-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/amd: Return devid as alias for ACPI HID devices
iommu/vt-d: Handle memory shortage on pasid table allocation
iommu/rockchip: Free irqs in shutdown handler

+16 -4
+6
drivers/iommu/amd_iommu.c
··· 246 246 247 247 /* The callers make sure that get_device_id() does not fail here */ 248 248 devid = get_device_id(dev); 249 + 250 + /* For ACPI HID devices, we simply return the devid as such */ 251 + if (!dev_is_pci(dev)) 252 + return devid; 253 + 249 254 ivrs_alias = amd_iommu_alias_table[devid]; 255 + 250 256 pci_for_each_dma_alias(pdev, __last_alias, &pci_alias); 251 257 252 258 if (ivrs_alias == pci_alias)
+3 -3
drivers/iommu/intel-iommu.c
··· 2540 2540 if (dev && dev_is_pci(dev) && info->pasid_supported) { 2541 2541 ret = intel_pasid_alloc_table(dev); 2542 2542 if (ret) { 2543 - __dmar_remove_one_dev_info(info); 2544 - spin_unlock_irqrestore(&device_domain_lock, flags); 2545 - return NULL; 2543 + pr_warn("No pasid table for %s, pasid disabled\n", 2544 + dev_name(dev)); 2545 + info->pasid_supported = 0; 2546 2546 } 2547 2547 } 2548 2548 spin_unlock_irqrestore(&device_domain_lock, flags);
+1 -1
drivers/iommu/intel-pasid.h
··· 11 11 #define __INTEL_PASID_H 12 12 13 13 #define PASID_MIN 0x1 14 - #define PASID_MAX 0x100000 14 + #define PASID_MAX 0x20000 15 15 16 16 struct pasid_entry { 17 17 u64 val;
+6
drivers/iommu/rockchip-iommu.c
··· 1241 1241 1242 1242 static void rk_iommu_shutdown(struct platform_device *pdev) 1243 1243 { 1244 + struct rk_iommu *iommu = platform_get_drvdata(pdev); 1245 + int i = 0, irq; 1246 + 1247 + while ((irq = platform_get_irq(pdev, i++)) != -ENXIO) 1248 + devm_free_irq(iommu->dev, irq, iommu); 1249 + 1244 1250 pm_runtime_force_suspend(&pdev->dev); 1245 1251 } 1246 1252