From patchwork Mon Jun 26 13:38:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 106330 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp86318qge; Mon, 26 Jun 2017 06:40:34 -0700 (PDT) X-Received: by 10.84.238.206 with SMTP id l14mr285142pln.280.1498484434892; Mon, 26 Jun 2017 06:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498484434; cv=none; d=google.com; s=arc-20160816; b=MvVWqihx1Hxop91XJkV0TIr4Qj8cVxeM5tbtMEQfy9woD1x2HXPUeVs0JLDaRiaGt8 oO1X9paiH+88G90WxnVRnYVAgnXEfo1LU/9A91b7IsWqNYTiMz4M3co1INefhrBVjqb1 ZennwJw4V4HndzBVF8w7RlJDcefgTAJAoDflL+A7iy+xVWIu53WPskUx+Uv9R4p3GLLj SULAk6dukQGX+aC+4V0rz3GfyhZ1riPt3TfRuaL5FcVXE/oifDt55d8s+ivF9Tow4uw0 /ElrYtKDpB17miFyDzAolDwlFzlEEUlcWyPTbm9Gdv6n8o6MRMSBEu88btQYbvKUKu9r mOZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=qlndPujqvYh0dGahgKHPxp/2GgCj7JdmKl+ctSQAd3M=; b=XwqlPLgCuyUoXcj/iBn/BT6vmYHQc5xbGGnuTUaU17iR/tJDLKiCvraUdS53TyBiRw jXscOCxNkOmtSsUHDLYpQ0Gksf4UynUs8zZ6SazjuEqLvoTfUjnqFL30kFFnpmoPTvzL N9wbr6m+JAGfDefpE/avOnA1aIPVAW3UnflOlhr2hf7o5mztGirZi+6jrAK1BdA8ynZE glqbwWLfkL+3jDEGVszyTk8JE5AIY15ahSqVfSJVfFNOK48ChAwumdpWNf0KqlUsm4mK vV3I1DYfhn9qpPAohn6f6dToOX1j+l92+GIuQ/beoe9dbpEZryZqNxUDh0LlazSegoGU nnug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si66190pgo.569.2017.06.26.06.40.34; Mon, 26 Jun 2017 06:40:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbdFZNkX (ORCPT + 25 others); Mon, 26 Jun 2017 09:40:23 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:8800 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbdFZNje (ORCPT ); Mon, 26 Jun 2017 09:39:34 -0400 Received: from 172.30.72.56 (EHLO DGGEML401-HUB.china.huawei.com) ([172.30.72.56]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AQZ51691; Mon, 26 Jun 2017 21:39:30 +0800 (CST) Received: from localhost (10.177.23.164) by DGGEML401-HUB.china.huawei.com (10.3.17.32) with Microsoft SMTP Server id 14.3.301.0; Mon, 26 Jun 2017 21:39:21 +0800 From: Zhen Lei To: Will Deacon , Joerg Roedel , linux-arm-kernel , iommu , Robin Murphy , linux-kernel CC: Zefan Li , Xinwei Hu , "Tianhong Ding" , Hanjun Guo , Zhen Lei , John Garry Subject: [PATCH 5/5] iommu/io-pgtable: delete member tlb_sync_pending of struct io_pgtable Date: Mon, 26 Jun 2017 21:38:50 +0800 Message-ID: <1498484330-10840-6-git-send-email-thunder.leizhen@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1498484330-10840-1-git-send-email-thunder.leizhen@huawei.com> References: <1498484330-10840-1-git-send-email-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.59510E92.0229, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b2b656ab00f7afe8080b0d2db686d0f7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This member is unused now, because the previous patches ensured that each unmap will always be followed by tlb sync operation. By the way, ->tlb_flush_all executes tlb_sync by itself. Signed-off-by: Zhen Lei --- drivers/iommu/io-pgtable.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.5.0 diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h index 7b3fc04..43ddf1f 100644 --- a/drivers/iommu/io-pgtable.h +++ b/drivers/iommu/io-pgtable.h @@ -166,7 +166,6 @@ void free_io_pgtable_ops(struct io_pgtable_ops *ops); struct io_pgtable { enum io_pgtable_fmt fmt; void *cookie; - bool tlb_sync_pending; struct io_pgtable_cfg cfg; struct io_pgtable_ops ops; }; @@ -176,22 +175,17 @@ struct io_pgtable { static inline void io_pgtable_tlb_flush_all(struct io_pgtable *iop) { iop->cfg.tlb->tlb_flush_all(iop->cookie); - iop->tlb_sync_pending = true; } static inline void io_pgtable_tlb_add_flush(struct io_pgtable *iop, unsigned long iova, size_t size, size_t granule, bool leaf) { iop->cfg.tlb->tlb_add_flush(iova, size, granule, leaf, iop->cookie); - iop->tlb_sync_pending = true; } static inline void io_pgtable_tlb_sync(struct io_pgtable *iop) { - if (iop->tlb_sync_pending) { - iop->cfg.tlb->tlb_sync(iop->cookie); - iop->tlb_sync_pending = false; - } + iop->cfg.tlb->tlb_sync(iop->cookie); } /**