Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp223021pxb; Wed, 18 Nov 2020 22:22:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm91q0FWMoW7nkvqJSe0ijwiyWX2k6QOCLxoA7owP0pIuyKViBLxaG0zoxOMuaiC2HKVlE X-Received: by 2002:a05:6402:1d82:: with SMTP id dk2mr6957061edb.366.1605766927712; Wed, 18 Nov 2020 22:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605766927; cv=none; d=google.com; s=arc-20160816; b=mIWNjZ8SOvfoph6PyPn5FqnWVKJ1hszMSYQuJZfgzKSuyE4d8LFxHpN8zuKn4+G1IH Cg11dP7ze3B1QX8jkpJhPT5rHEvjIjMx6dSt2eA4udAJ0q4gCUdtGpoCOe31PlmEQvHv +Kq3ZncL/LlF8A5nZJCfLvtA/ZIQQF1vvVM5gPWvB0cQI5oP484VXp5PodTYMEI2dxWf u8a5P2cCjtLYN8GsntPWQ5rSRw8IEvMrcXVglBSs7matE1uVUnovQWw5PWZRBbb10wMU cRnwnn52/nnSfw36AEA0a8CNvGUQIDnMYyM5Gk5vW4Zr4SRFdLXeWhb1utLiBQp4bvMf kdpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=lHr5C/cod14hlelmdp6ntLW86cQIdq/Zq2qnxoiK758=; b=ySxRgDcbP1LlmfTwRFJ9dU4MwG4MyhxUFdiYW7/WDJlUz+G39DKRyBNeT0VIQp4lOe ttf3zWYLwgeF4tOhTVO7fkQQXBtXJd/uO0gtIdNvtp4FIK6OXh3VJo2eZkPK4E55G4HN uej3hYLCaKKU72hm0UpjYkL0Qa2jU2tl46yRclQ9CCXCU0arF5pOp0M2yv9/2bdIG6ox swXTV91nxvbYhadz34KtA1hWHU2HTTK171KNEITn8WJnFSSzHp3nqcm1a/3UK3e2U3ld sC+oc1LL6C75OyDwl11UVuJukAXjkI8EvJYO3fg7usWPksoS9YsdwaG9AzAKkh2pDMJy zAnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si1857365ejq.288.2020.11.18.22.21.45; Wed, 18 Nov 2020 22:22:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726431AbgKSGTY (ORCPT + 99 others); Thu, 19 Nov 2020 01:19:24 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:40215 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726224AbgKSGTY (ORCPT ); Thu, 19 Nov 2020 01:19:24 -0500 X-UUID: 83c82368deb24aa7914bdd595376d73a-20201119 X-UUID: 83c82368deb24aa7914bdd595376d73a-20201119 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2069203104; Thu, 19 Nov 2020 14:19:19 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Nov 2020 14:19:17 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 19 Nov 2020 14:19:16 +0800 From: Yong Wu To: Joerg Roedel , Will Deacon , Robin Murphy CC: Matthias Brugger , Krzysztof Kozlowski , Tomasz Figa , , , , , , , , Nicolas Boichat , , , Subject: [PATCH v2 5/6] iommu/mediatek: Enable granule_ignore for unmap Date: Thu, 19 Nov 2020 14:18:35 +0800 Message-ID: <20201119061836.15238-6-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201119061836.15238-1-yong.wu@mediatek.com> References: <20201119061836.15238-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MediaTek IOMMU HW don't care about granule when it flush tlb. In order to flush tlb once when unmap, Enable this flag to gather all the iova chunk of unmap. Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 8c2d4a225666..94786860bd84 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -432,6 +432,7 @@ static size_t mtk_iommu_unmap(struct iommu_domain *domain, { struct mtk_iommu_domain *dom = to_mtk_domain(domain); + gather->granule_ignore = true; return dom->iop->unmap(dom->iop, iova, size, gather); } -- 2.18.0