From patchwork Wed Dec 26 01:53:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cho KyongHo X-Patchwork-Id: 1910401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A585C3FE37 for ; Wed, 26 Dec 2012 01:57:45 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TngBe-0000p0-AB; Wed, 26 Dec 2012 01:53:38 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TngBQ-0000mf-MZ for linux-arm-kernel@lists.infradead.org; Wed, 26 Dec 2012 01:53:25 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFM0098L7WZKQD0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 26 Dec 2012 10:53:23 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.48]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 20.50.12699.3985AD05; Wed, 26 Dec 2012 10:53:23 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-ff-50da5893ff7e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 8F.40.12699.3985AD05; Wed, 26 Dec 2012 10:53:23 +0900 (KST) Received: from DOPULLIPCHO06 ([12.23.118.152]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFM00LY87WYTKE0@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 26 Dec 2012 10:53:23 +0900 (KST) From: Cho KyongHo To: 'Linux ARM Kernel' , 'Linux IOMMU' , 'Linux Kernel' , 'Linux Samsung SOC' Subject: [PATCH v6 01/12] iommu/exynos: add missing cache flush for removed pagetable entries Date: Wed, 26 Dec 2012 10:53:22 +0900 Message-id: <003401cde30b$c99d7f60$5cd87e20$%cho@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac3jC8l/G1SP7pXJRfmNlrLGHqL/1Q== Content-language: ko DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHIsWRmVeSWpSXmKPExsVy+t8zA93JEbcCDA6+F7LY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZu1a8Zym4zVGxc1pYA+Nc9i5GDg4JAROJu+cduhg5gUwxiQv3 1rN1MXJxCAksY5Q4f3o2I0TCRGJx9wZmiMQiRolN/68zQTjLmSTWtB9mAqliE9CSWD33OFiH iMBdRomX53lAipgF/jJKfDpziB0kISwQL/H1+BMwm0VAVeLgtKNsIDavgK3E4X27GCFsQYkf k++xgNjMAgYS72f1sULY8hKb17xlhjhbXeLRX12IXXoSC89OYIQoEZHY9+IdI8R4AYlvkw+x QJTLSmw6APaAhEA3u8S0iUuZIT6TlDi44gbLBEaxWUg2z0KyeRaSzbOQrFjAyLKKUTS1ILmg OCk910ivODG3uDQvXS85P3cTIyRSpHcwrmqwOMQowMGoxMPL+etmgBBrYllxZe4hRgkOZiUR XuePQCHelMTKqtSi/Pii0pzU4kOMPkCXT2SWEk3OB0ZxXkm8obGxiZmJqYm5pam5KQ5hJXHe Zo+UACGB9MSS1OzU1ILUIphxTBycUg2MBZYT1LouLFY/XZy6l5mxpEtowUejJWFCR/+r58eG zc90vjPbwzw1n0vZ3dV0xSkN/dZ3F3ZfX/nyuf99SyfGnNaulA3bHZb82WZ8rWZXt9Kvjurw qFcP92879en+lRtW9S7SWQ2LQqz99672lBX74nBkXZp9cV/DxPrXDHlPFZtPe52cX5SjxFKc kWioxVxUnAgAzWX+P8ECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHIsWRmVeSWpSXmKPExsVy+t9jAd3JEbcCDO4t5LPY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhHWMGbtWvGcpuM1RsXNaWAPj XPYuRk4OCQETicXdG5ghbDGJC/fWs3UxcnEICSxilNj0/zoThLOcSWJN+2EmkCo2AS2J1XOP M4LYIgJ3GSVenucBKWIW+Mso8enMIbCxwgLxEl+PPwGzWQRUJQ5OO8oGYvMK2Eoc3reLEcIW lPgx+R4LiM0sYCDxflYfK4QtL7F5zVugkziATlKXePRXF2KXnsTCsxMYIUpEJPa9eMc4gVFg FpJJs5BMmoVk0iwkLQsYWVYxiqYWJBcUJ6XnGukVJ+YWl+al6yXn525iBEfiM+kdjKsaLA4x CnAwKvHwcv66GSDEmlhWXJl7iFGCg1lJhNf5I1CINyWxsiq1KD++qDQntfgQow/QoxOZpUST 84FJIq8k3tDYxMzI0sjMwsjE3ByHsJI4b7NHSoCQQHpiSWp2ampBahHMOCYOTqkGRuFb7TsS r1W80WT722u6O6T6bqR57ITpm3tP7N5mENHJ+/69+efNJ85ndKTbhJWm3F33ad0rtkdW7ubW OvkftigqHJGQ3mO9Oq3z54xpGyvua/7Tib+1YWIX0yyDy2WVonfrH0cu7vgVEnNmNv+lmBU9 088cvnVAnv/Wuff+Z9YeOON5/dAvU2klluKMREMt5qLiRABlnMTA8QIAAA== X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121225_205325_021675_23031472 X-CRM114-Status: UNSURE ( 7.93 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 HDRS_LCASE Odd capitalization of message header 0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers Cc: 'Kukjin Kim' , 'Hyunwoong Kim' , 'Prathyush' , 'Joerg Roedel' , 'Subash Patel' , 'Rahul Sharma' X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This commit adds cache flush for removed small page 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: KyongHo Cho --- 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 7fe44f8..b96f3b9 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; + pgtable_flush(ent, ent + 1); size = SPAGE_SIZE; priv->lv2entcnt[lv1ent_offset(iova)] += 1; goto done; @@ -1011,6 +1012,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;