Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp528258pxb; Thu, 12 Aug 2021 23:57:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQuDeNwMLGlEUPzAn/Af0rMvbTCqCZI83IpAXODSZuKfBN64aokuUsp80kP5dqdj0nOVv8 X-Received: by 2002:a05:6638:3048:: with SMTP id u8mr868917jak.91.1628837840332; Thu, 12 Aug 2021 23:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628837840; cv=none; d=google.com; s=arc-20160816; b=Sfzv4D+GDtdM3m8KZ2KGj8AeMSGaClchAaESlOVcAb9WyVzgxso++xBprb68k6FSGU w4W10u8ddpPpUmmEsqiKYhksnCdzE9amR+otm6G/idaqlmoAcUQ13NzO+9a8r1UBhl3l c/jR3g40XWxu4M5JYlhhbwho6Zn65ufH4FshZurViQjWkSO4VShdYXIv1YdIsQyCpdlt dcPDSfFYynKDVG7u6SLh97TKrfWfieJWwhd8TMjzkpDEMP5cCa+q7lBTT0aLJraHQHYp DZXTWdfiWjyPFQa+T6nLmPPPKSpXiTBpMstNrklHsWlroLUANjY9g38tZ9lNynHqbLvL CEcQ== 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=p95U2/1x4jWPA8FUp058bYJ4NeRCy9KWIw5/hR2QncM=; b=KLWpwit7HR87mT3yvZIz7AOeWdCpvIqj8KN8hR4C2LuftyMHmG1GZwt4OHxZCy+KJZ lrO48NPbf7gFeMWtXbPV4i4ywNlgR/FH436iaoSKte77DCNHz/Tcvf0AxerYchDaSlbd W4BwsYxfLzbx8ljt0ZKUxeub73lnLMRPduTN8TDcGmHtbMMBQ7qeoZ1OiEXhI02rvOSj eq1prsyKMKe4oHWUUBHT6kceBPms0l+n5tEe7hnEVowL6pGb4bLBEV/90YSFmLwD1Lgp eEH88rRBj4+YN8LCdBGtEVVuoN0jJRHxOFXj0f6q65Quz99Sw/+80/NoU5LR4Hg7ag9s J9qQ== 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 v16si611130jas.2.2021.08.12.23.57.09; Thu, 12 Aug 2021 23:57:20 -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 S239102AbhHMGzg (ORCPT + 99 others); Fri, 13 Aug 2021 02:55:36 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:36956 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S239087AbhHMGze (ORCPT ); Fri, 13 Aug 2021 02:55:34 -0400 X-UUID: 24bc6fc50ec74215ba63985d2f8d0843-20210813 X-UUID: 24bc6fc50ec74215ba63985d2f8d0843-20210813 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 2113665822; Fri, 13 Aug 2021 14:55:04 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 13 Aug 2021 14:55:02 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 13 Aug 2021 14:55:01 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Evan Green , Tomasz Figa , Tomasz Figa , , , , , , , , , Nicolas Boichat , , Subject: [PATCH v2 10/29] iommu/mediatek: Remove the granule in the tlb flush Date: Fri, 13 Aug 2021 14:53:05 +0800 Message-ID: <20210813065324.29220-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210813065324.29220-1-yong.wu@mediatek.com> References: <20210813065324.29220-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 d64139ab59d0..add23a36a5e2 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -228,7 +228,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; @@ -550,8 +549,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, @@ -559,7 +557,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