]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
iommu/tegra: smmu: remove sanity checks during dev notifications.
authorKrishna Reddy <vdumpa@nvidia.com>
Sat, 8 Feb 2014 00:49:48 +0000 (16:49 -0800)
committerKrishna Reddy <vdumpa@nvidia.com>
Mon, 10 Feb 2014 17:00:28 +0000 (09:00 -0800)
arm_iommu_detach_device doesn't reset mapping to NULL.
remove sanity checks during device  notifications to avoid
incorrect warning messages.

Bug 1446597

Change-Id: I7a49cd9ba464a1007260260b5fe41113db0b7689
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/365172

drivers/iommu/tegra-smmu.c

index b75b455bcfba89f08f6702794a4650b8f7166b42..6cfaa79ee3679cc8ecb80c11b349a73ecbf4aaf3 100644 (file)
@@ -1880,8 +1880,6 @@ static int tegra_smmu_device_notifier(struct notifier_block *nb,
                        break;
                }
 
-               WARN_ON(to_dma_iommu_mapping(dev) == map);
-
                if (arm_iommu_attach_device(dev, map)) {
                        dev_err(dev, "Failed to attach %s\n", dev_name(dev));
                        arm_iommu_release_mapping(map);
@@ -1894,8 +1892,6 @@ static int tegra_smmu_device_notifier(struct notifier_block *nb,
                        break;
                /* FALLTHROUGH */
        case BUS_NOTIFY_UNBOUND_DRIVER:
-               WARN_ON(!to_dma_iommu_mapping(dev));
-
                dev_dbg(dev, "Detaching %s from map %p\n", dev_name(dev),
                        to_dma_iommu_mapping(dev));
                arm_iommu_detach_device(dev);