From patchwork Mon May 12 06:14:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 4155691 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C4147BFF02 for ; Mon, 12 May 2014 06:21:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DE842020A for ; Mon, 12 May 2014 06:21:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33B35200D0 for ; Mon, 12 May 2014 06:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876AbaELGQn (ORCPT ); Mon, 12 May 2014 02:16:43 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:17646 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbaELGQj (ORCPT ); Mon, 12 May 2014 02:16:39 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5G00LWP6ROP900@mailout2.samsung.com>; Mon, 12 May 2014 15:16:36 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 50.40.14563.44760735; Mon, 12 May 2014 15:16:36 +0900 (KST) X-AuditID: cbfee68e-b7fd86d0000038e3-96-537067443093 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 93.E3.25708.44760735; Mon, 12 May 2014 15:16:36 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5G0084B6QQBL10@mmp1.samsung.com>; Mon, 12 May 2014 15:16:35 +0900 (KST) From: Shaik Ameer Basha To: linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: joro@8bytes.org, arnd@arndb.de, t.figa@samsung.com, kgene.kim@samsung.com, pullip.cho@samsung.com, a.motakis@virtualopensystems.com, grundler@chromium.org, s.nawrocki@samsung.com, prathyush.k@samsung.com, rahul.sharma@samsung.com, sachin.kamat@linaro.org, supash.ramaswamy@linaro.org, varun.sethi@freescale.com, joshi@samsung.com, tomasz.figa@gmail.com, Shaik Ameer Basha Subject: [PATCH v13 06/19] iommu/exynos: add missing cache flush for removed page table entries Date: Mon, 12 May 2014 11:44:51 +0530 Message-id: <1399875304-19948-7-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399875304-19948-1-git-send-email-shaik.ameer@samsung.com> References: <1399875304-19948-1-git-send-email-shaik.ameer@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsWyRsSkRtclvSDYYNFkeYs7d8+xWvyddIzd Yv4RIOvVkR9MFgv2W1t0zt7AbvF91xd2i94FV9ksNj2+xmpxedccNosZ5/cxWVxYsZHd4l/v QUaLKYsOs1ocftPOanHyTy+jxZGHu9ktWq73Mlmsn/GaxWLVrj+MFjNvrWFxEPV4cnAek8fv X5MYPWY3XGTx+He4n8lj56y77B53ru1h89i8pN5j8o3ljB59W1YxenzeJOdx5egZpgDuKC6b lNSczLLUIn27BK6Mn9/2shR0cVWs+LOdqYFxG0cXIyeHhICJxLKTR1khbDGJC/fWs3UxcnEI CSxllNh4YDYjTNHurgt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yKPFjCBVwgKJEkcntbKC2CwCqhITnyxlA7F5Bdwl9m2ZBWRzAO1T kJgzyQYkzCngIfF59RSwEiGgkmOvrrJOYORdwMiwilE0tSC5oDgpPddIrzgxt7g0L10vOT93 EyM4GTyT3sG4qsHiEKMAB6MSD+8HhoJgIdbEsuLK3EOMEhzMSiK8H/2BQrwpiZVVqUX58UWl OanFhxiTgY6ayCwlmpwPTFR5JfGGxibmpsamliYWJmaWpAkrifMebLUOFBJITyxJzU5NLUgt gtnCxMEp1cC4YM/fqLpe+c77qmHPt370iWrxnC1/WDb6zbHpVuvMZt7q+mh9jUVxlfBSoclT uWdFTOAOennL94OccC3T983zwgPWF+juvND7PzR+nvq60Mc72WcGxRcdWprG72lReGCl0I1A 13VZMlb9859NW3eh4KHC6wjdUt87nzfUFK2f3eXVxjq5UXKrEktxRqKhFnNRcSIAbf2AB0oD AAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Cho KyongHo This commit adds cache flush for removed small and large page entries in exynos_iommu_unmap(). Missing cache flush of removed page table entries can cause missing page fault interrupt when a master IP accesses an unmapped area. Reviewed-by: Tomasz Figa Tested-by: Grant Grundler Signed-off-by: Cho KyongHo Signed-off-by: Shaik Ameer Basha --- drivers/iommu/exynos-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 4fc31fc..6915235 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -904,6 +904,7 @@ static size_t exynos_iommu_unmap(struct iommu_domain *domain, if (lv2ent_small(ent)) { *ent = 0; size = SPAGE_SIZE; + pgtable_flush(ent, ent + 1); priv->lv2entcnt[lv1ent_offset(iova)] += 1; goto done; } @@ -915,6 +916,7 @@ static size_t exynos_iommu_unmap(struct iommu_domain *domain, } memset(ent, 0, sizeof(*ent) * SPAGES_PER_LPAGE); + pgtable_flush(ent, ent + SPAGES_PER_LPAGE); size = LPAGE_SIZE; priv->lv2entcnt[lv1ent_offset(iova)] += SPAGES_PER_LPAGE;