Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4167533pxb; Tue, 25 Jan 2022 05:02:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJww7uOAOZMOpja4rwORVhGvs2GcTuPqrsfW7QK/cUOiUPGC05Ck+xxlIe7G4AFEEDU1vDwe X-Received: by 2002:a17:90b:1d91:: with SMTP id pf17mr3069533pjb.160.1643115726565; Tue, 25 Jan 2022 05:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643115726; cv=none; d=google.com; s=arc-20160816; b=PLD7UyDFruDR+KGI/bLxaz21aPbrWspUv1unSMSxO5xFAgp7f8vG+RpTItmCuct5ay ZnqxvHUj2VkqCTlXs3lkBIMzq+KSh6LJQsr5O74IEOjtyI/U0a87mX5ExUCCNBtHvKyJ tLD0p2Q24SLwEtbS6cRTrhs6/40cEpshWAAdDoARuY9XLg/t05wMnQmE2ImyTCP4rcXV 1RzGdqjt4bldasMIBAsoXfKJFyMstHUR1dBoHDkuScENjq0MCl3Ud5zePz8SS5R4jdvf g+Ym1Qjs4OUw/kV8XWBny1Wnk/ouI0DUb9A6cwXiQqWc524Q4hyKaZhxSX62ZVpJp1cr 6R2g== 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=cfbjsMHPEBKuZdpPLrkcBUxJpn1NOCSBby6G0j9toHM=; b=wqt8EHpMrzdQt8kgt/DZ/xzKg8Ayg0iD4VcsCrDNvH2t7eoukthtL5HGPWF8P7agkb Jmxy0PPB4pPgX7UW574dzB7knHuFB+hGDXqo+U6JA0vCSYBmmGXB0fQtF5L+2U1161An XQ11jj9pMt8x4bMw2HE74nmzUCaOz4Tf+fhr/as8U9Fc8O9G4SIwTvy4tG6BPq/tVtXc HZ6nfnUn3laotmdXWK0OmKZvOF8VpyVJbTI9P4D+60b3JvGkKMHZRW0fdygKcm+oDqvk vn+avyp0fGw55qcYYgnGOkxBQ4DoA2f6AGQ6LZd4TnO0xt1TIjSyAtzw6f+QNDryY9FH 0WMg== 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 hk18si305402pjb.116.2022.01.25.05.01.52; Tue, 25 Jan 2022 05:02:06 -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 S1455071AbiAYJCp (ORCPT + 99 others); Tue, 25 Jan 2022 04:02:45 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:58610 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1453989AbiAYI7a (ORCPT ); Tue, 25 Jan 2022 03:59:30 -0500 X-UUID: 7f37688ce62c48e7a03d0721c4ee35bc-20220125 X-UUID: 7f37688ce62c48e7a03d0721c4ee35bc-20220125 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 701540767; Tue, 25 Jan 2022 16:58:43 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 25 Jan 2022 16:58:42 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 25 Jan 2022 16:58:40 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , "Matthias Brugger" , Will Deacon CC: Robin Murphy , Krzysztof Kozlowski , Tomasz Figa , , , , , , , Hsin-Yi Wang , , , , , , "AngeloGioacchino Del Regno" , , , , Subject: [PATCH v4 13/35] iommu/mediatek: Remove the granule in the tlb flush Date: Tue, 25 Jan 2022 16:56:12 +0800 Message-ID: <20220125085634.17972-14-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220125085634.17972-1-yong.wu@mediatek.com> References: <20220125085634.17972-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 Reviewed-by: AngeloGioacchino Del Regno --- 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 80d8333797fd..028b2192c414 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -219,7 +219,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