Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933038Ab3GEM3U (ORCPT ); Fri, 5 Jul 2013 08:29:20 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:36075 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757366Ab3GEM3O (ORCPT ); Fri, 5 Jul 2013 08:29:14 -0400 X-AuditID: cbfee68e-b7f276d000002279-4d-51d6bc194948 From: Cho KyongHo To: "'Linux ARM Kernel'" , "'Linux IOMMU'" , "'Linux Kernel'" , "'Linux Samsung SOC'" Cc: "'Hyunwoong Kim'" , "'Joerg Roedel'" , "'Kukjin Kim'" , "'Prathyush'" , "'Rahul Sharma'" , "'Subash Patel'" , "'Keyyoung Park'" , "'Grant Grundler'" Subject: [PATCH v7 2/9] iommu/exynos: add missing cache flush for removed page table entries Date: Fri, 05 Jul 2013 21:29:13 +0900 Message-id: <002a01ce797b$421b5970$c6520c50$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac55d49h2SeAId+HSZirtmyZeFGJug== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsVy+t8zQ13JPdcCDdbfMrN4deQHk8WC/dYW nbM3sFtsPriOxaJ3wVU2i8Z7E9gsNj2+xmpxedccNosZ5/cxWVxYsZHdYsqiw6wWLdd7mRx4 PJ4cnMfkMbvhIovHnWt72Dw2L6n3mHxjOaNH35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVwZVzf epet4C1HxcXdC1gaGFezdzFyckgImEjMXL8MyhaTuHBvPVsXIxeHkMAyRonds++wwhQ9+DIb KjGdUeLLgYtMIAkhgb+MEqfOmYHYbAJaEqvnHmcEsUUE7jJKvDzPA9LALHCDSWLDpzYWkISw QJzExKNLwZpZBFQlzn/oBrN5BSwlfhz6C2ULSvyYfA+snhlo6Pq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ukV5yYW1yal66XnJ+7iRGcLJ5J72Bc1WBxiFGAg1GJh/dB/dVAIdbEsuLK3EOMEhzM SiK89gnXAoV4UxIrq1KL8uOLSnNSiw8xJgP9OZFZSjQ5H5jI8kriDY1NzIwsjcwsjEzMzUkT VhLnPdhqHSgkkJ5YkpqdmlqQWgSzhYmDU6qBke2xA/sR23turMoHPBdoOxxy+CcYlZ58Yn/s nS0yJ05tlGbcVrs2ckfzdAn1Uw5zQ57bHHY0cF//cWL6h6Lt+wxl2zYd7bq8IyNu+TLtiu6v CopptSd7m1WKDlYF/iqLSTTwbPVkzp/acqJL/TjjT5ev0r4bM2ZkSpwpVf0aaZ2kNrv/+ZxL SizFGYmGWsxFxYkAgUOjxloDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1344 Lines: 39 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. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 233f382..e3be3e5 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1002,6 +1002,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; } @@ -1010,6 +1011,7 @@ static size_t exynos_iommu_unmap(struct iommu_domain *domain, BUG_ON(size < LPAGE_SIZE); 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; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/