]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iommu/omap: Fix 'no page for' debug message in flush_iotlb_page()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 7 Mar 2014 22:47:03 +0000 (23:47 +0100)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 16 Apr 2014 14:30:16 +0000 (16:30 +0200)
The flush_iotlb_page() function prints a debug message when no
corresponding page was found in the TLB. That condition is incorrectly
checked and always resolves to true, given that the for_each_iotlb_cr()
loop is never interrupted and always reaches obj->nr_tlb_entries.

Given that we can't have two TLB entries for the same VA, break from the
loop when a match is found.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Suman Anna <s-anna@ti.com>
drivers/iommu/omap-iommu.c

index 78f32d13dd66361b24d3d6e2cafa96b6cd63dc6c..b5787f151dfceae65d12d65625a6764c2684d81a 100644 (file)
@@ -394,6 +394,7 @@ static void flush_iotlb_page(struct omap_iommu *obj, u32 da)
                                __func__, start, da, bytes);
                        iotlb_load_cr(obj, &cr);
                        iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
+                       break;
                }
        }
        pm_runtime_put_sync(obj->dev);