Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp502140pxb; Thu, 23 Sep 2021 05:03:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqNVVkH3Vt2KQS/Pvj39in2iTpwuobp05dUk38Nl1R1vQ4q85QxWMmEjCz7+ZChtF8n5Ax X-Received: by 2002:aa7:d94a:: with SMTP id l10mr5009093eds.322.1632398634358; Thu, 23 Sep 2021 05:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632398634; cv=none; d=google.com; s=arc-20160816; b=cri7aXEaHBMMZXP49uo5FG5McKF9lGEJgvm+HjLkbiiKwux6SsghRDT75ma8zr3XM7 guHPYXLpt7z5SVP4DaM0FI3nIKxh7gi9VTUaHcKjnkuvXoAObUY7Jm71zvg0As42+ITH FrHN5/JDgvIgb/ftp6BPVyA1W548KnbixJnZA1jW/UxGgWBkq0uZyJb+DjFxEMYqYtmT I/8K/VWnhqI/ZjUfzS8c76eyYZNCT+QMDVRphA1MwjIAvXb4payadAfWnwe6R4hnum2Z /rg2pmSQWdr1tg6Feo5h2OkCX6QoDhr7TmZHh5IO2FAVu5qHxYLlUICuvg14Go1KYtZf OX7g== 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=ysFKU5ywqkBHnE6basUxxYCVGY06NeTPjdvER14WDjs=; b=Mx8FruOVvOreGQXvueLfpC23mmTy3fpOiWThI8BIDAirZw+WWJlphkhwLu3OPAvK0A YIiwHV0aTUAIlBaVXLUBJ+9/SvpHHONPPeVL37ZPH7Vks2SIVCxvbaB62MSNFFvYcuZ7 co39QtnlBxlwDct+vaC2jLJrPE8QVNHvIQkSGlIoUVxJePaHpCYJL0RNCHMPw1pusqDX dlYe/y6hf0qF1ZWQ8FQFHMA6TBgHqnnqUCOlSkIKUZgCiT92TNkiBZq4Ud9U7JROHIbg WY3ZieLxwgCGKbQ/kqhUpYALpfJpMYYUyUH6mZm+rLEnCmICOvTQgTsYLt8im1PJSYxW lJ4w== 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 23si5390546ejr.127.2021.09.23.05.03.23; Thu, 23 Sep 2021 05:03:54 -0700 (PDT) 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 S240825AbhIWMCa (ORCPT + 99 others); Thu, 23 Sep 2021 08:02:30 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:51544 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S240845AbhIWMCZ (ORCPT ); Thu, 23 Sep 2021 08:02:25 -0400 X-UUID: 72dd97051e024ba2836f9f1a804ad3b8-20210923 X-UUID: 72dd97051e024ba2836f9f1a804ad3b8-20210923 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1010440804; Thu, 23 Sep 2021 20:00:51 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Sep 2021 20:00:50 +0800 Received: from localhost.localdomain (10.17.3.154) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 23 Sep 2021 20:00:49 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Tomasz Figa , , , , , , , Hsin-Yi Wang , , , , , Subject: [PATCH v3 11/33] iommu/mediatek: Remove the granule in the tlb flush Date: Thu, 23 Sep 2021 19:58:18 +0800 Message-ID: <20210923115840.17813-12-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210923115840.17813-1-yong.wu@mediatek.com> References: <20210923115840.17813-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 The MediaTek IOMMU don't care about granule when tlb flushing. Remove this variable. Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index ab484d20b441..44cf5547d084 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -227,7 +227,6 @@ static void mtk_iommu_tlb_flush_all(struct mtk_iommu_data *data) } static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size, - size_t granule, struct mtk_iommu_data *data) { struct list_head *head = data->hw_list; @@ -541,8 +540,7 @@ static void mtk_iommu_iotlb_sync(struct iommu_domain *domain, struct mtk_iommu_domain *dom = to_mtk_domain(domain); size_t length = gather->end - gather->start + 1; - mtk_iommu_tlb_flush_range_sync(gather->start, length, gather->pgsize, - dom->data); + mtk_iommu_tlb_flush_range_sync(gather->start, length, dom->data); } static void mtk_iommu_sync_map(struct iommu_domain *domain, unsigned long iova, @@ -550,7 +548,7 @@ static void mtk_iommu_sync_map(struct iommu_domain *domain, unsigned long iova, { struct mtk_iommu_domain *dom = to_mtk_domain(domain); - mtk_iommu_tlb_flush_range_sync(iova, size, size, dom->data); + mtk_iommu_tlb_flush_range_sync(iova, size, dom->data); } static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain, -- 2.18.0