From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suman Anna Subject: Re: [PATCH v2 4/6] iommu/omap: Fix 'no page for' debug message in flush_iotlb_page() Date: Thu, 3 Apr 2014 15:56:02 -0500 Message-ID: <533DCAE2.3030900@ti.com> References: <1396555298-25246-1-git-send-email-laurent.pinchart@ideasonboard.com> <1396555298-25246-5-git-send-email-laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396555298-25246-5-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Laurent Pinchart , linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Sakari Ailus , Florian Vaussard List-Id: iommu@lists.linux-foundation.org Hi Laurent, On 04/03/2014 03:01 PM, Laurent Pinchart wrote: > 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 Thanks for the reworked and simplified patch. Acked-by: Suman Anna > --- > drivers/iommu/omap-iommu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c > index fdf3dd0..428b47a 100644 > --- a/drivers/iommu/omap-iommu.c > +++ b/drivers/iommu/omap-iommu.c > @@ -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); >