Re: [PATCH] omap:iommu-load cam register before flushing the entry

From: Hiroshi DOYU
Date: Fri Aug 20 2010 - 12:26:12 EST


Hi Hari,

From: ext Hari Kanigeri <h-kanigeri2@xxxxxx>
Subject: [PATCH] omap:iommu-load cam register before flushing the entry
Date: Fri, 20 Aug 2010 15:50:18 +0200

> The flush_iotlb_page is not loading the cam register before flushing
> the cam entry. This causes wrong entry to be flushed out from the TLB, and
> if the entry happens to be a locked TLB entry it would lead to MMU faults.
>
> The fix is to load the cam register with the address to be flushed before
> flushing the TLB entry.
>
> Signed-off-by: Hari Kanigeri <h-kanigeri2@xxxxxx>

Ok for me. Thanks.

> ---
> arch/arm/plat-omap/iommu.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
> index 2e603fe..c534280 100644
> --- a/arch/arm/plat-omap/iommu.c
> +++ b/arch/arm/plat-omap/iommu.c
> @@ -315,6 +315,7 @@ void flush_iotlb_page(struct iommu *obj, u32 da)
> if ((start <= da) && (da < start + bytes)) {
> dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n",
> __func__, start, da, bytes);
> + iotlb_load_cr(obj, &cr);
> iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
> }
> }
> --
> 1.7.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/