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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJbq1FcAAoJECvwRC2XARrj/GwP/RfO43BrBHxkVNnZLltyHL20 FYG4fH9+aF+wdR1YWXrYSjhptPnzu2dDwvMYksMIKfAMVl/ncjr7+CoJUU02YBvS MG9FAUkzLP2KNEgkK3QiM9MAqRsIRWSKkJXgiTDqs1z68FC0Cp2uwBmx5NoDlfxe tHRWVBhBm3f/JAAD4MprX+uzF/096tvjp5j5iUukvypqlZy0CRPyuEx6PQJl/QM+ ItflS1rO9wz6KaLS3phGzclPI1V05BY8TeOc+JClTONA6+M0912iXJP9CA2mKp+l wjYAWiWCXafostkvic5Wqxc4mTmf+IzC4y/RE/AUGqiz0olkDqcEw9ejYg5X0iv7 4BKY/5431FafQFp15hrWXHeO2LBjerBrE3euS9Ts6iitumBmeMtWg9AE6Jrlsb+D 6pqfkQGuo+JJRTgeW30xI+0V1g/IMQndWfkRczPOQQw11Hrc31c9wurBwn+Avm31 zBbQ9U+CbElNjjvhD7ANzl3EpF+aHFBQMFNvGAy+bFcPctcnCIvXsYbJJNtB901h Au+PFMvMqiq3YtFAwHWkZm1LAbtrdqHsE5H1YUEhZG5CDosPdDZYXGmIyty34InM T0YpgoAAAMMmJqeRJjWYDOh1yVfKidrTIHPpXTVnxldf0cxJ81oKwyvSBaD/EeGL lpjF/VyU51vdyzVYTAd4 =bwMQ -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
c307aaf3eb
|
@ -246,7 +246,13 @@ static u16 get_alias(struct device *dev)
|
|||
|
||||
/* The callers make sure that get_device_id() does not fail here */
|
||||
devid = get_device_id(dev);
|
||||
|
||||
/* For ACPI HID devices, we simply return the devid as such */
|
||||
if (!dev_is_pci(dev))
|
||||
return devid;
|
||||
|
||||
ivrs_alias = amd_iommu_alias_table[devid];
|
||||
|
||||
pci_for_each_dma_alias(pdev, __last_alias, &pci_alias);
|
||||
|
||||
if (ivrs_alias == pci_alias)
|
||||
|
|
|
@ -2540,9 +2540,9 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu,
|
|||
if (dev && dev_is_pci(dev) && info->pasid_supported) {
|
||||
ret = intel_pasid_alloc_table(dev);
|
||||
if (ret) {
|
||||
__dmar_remove_one_dev_info(info);
|
||||
spin_unlock_irqrestore(&device_domain_lock, flags);
|
||||
return NULL;
|
||||
pr_warn("No pasid table for %s, pasid disabled\n",
|
||||
dev_name(dev));
|
||||
info->pasid_supported = 0;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&device_domain_lock, flags);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define __INTEL_PASID_H
|
||||
|
||||
#define PASID_MIN 0x1
|
||||
#define PASID_MAX 0x100000
|
||||
#define PASID_MAX 0x20000
|
||||
|
||||
struct pasid_entry {
|
||||
u64 val;
|
||||
|
|
|
@ -1241,6 +1241,12 @@ err_unprepare_clocks:
|
|||
|
||||
static void rk_iommu_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct rk_iommu *iommu = platform_get_drvdata(pdev);
|
||||
int i = 0, irq;
|
||||
|
||||
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO)
|
||||
devm_free_irq(iommu->dev, irq, iommu);
|
||||
|
||||
pm_runtime_force_suspend(&pdev->dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue