From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 538ADC43457 for ; Mon, 19 Oct 2020 11:37:46 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9DAE22257 for ; Mon, 19 Oct 2020 11:37:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="cSbnUDvc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9DAE22257 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E3E3871D0; Mon, 19 Oct 2020 11:37:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jat75O1IxDBg; Mon, 19 Oct 2020 11:37:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 0F74F87265; Mon, 19 Oct 2020 11:37:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DCC44C1AD7; Mon, 19 Oct 2020 11:37:43 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id B77E8C0051 for ; Mon, 19 Oct 2020 11:37:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B2993273AC for ; Mon, 19 Oct 2020 11:37:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SjKcJE8BMEY2 for ; Mon, 19 Oct 2020 11:37:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by silver.osuosl.org (Postfix) with ESMTP id E0B76228F1 for ; Mon, 19 Oct 2020 11:37:41 +0000 (UTC) X-UUID: 3db162901111401a8f74db9575dd5f25-20201019 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=m4LDAjGaY8ZCZimbpy7YBlmQc5CdSDMgpYOZp0zaqTc=; b=cSbnUDvcoLIIqhDkrICSDc8v54KNFL66XfhvlGZNctQUuuwgCqHAaVXfM7T9H1BKoCh2e5Cq8vcWPBvaSfbDPbuS5iUZ/Nm4RrAvIsIAs8c/oQ/jcWTaZ+JD999vPfbmOZjP8rXReuz1Zu4n2axQLu4DAIeWu53APFnH5PO4YJ4=; X-UUID: 3db162901111401a8f74db9575dd5f25-20201019 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.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 1349989347; Mon, 19 Oct 2020 19:37:40 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 19 Oct 2020 19:37:37 +0800 Received: from localhost.localdomain (10.15.20.246) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 19 Oct 2020 19:37:36 +0800 From: Chao Hao To: Joerg Roedel , Matthias Brugger Subject: [PATCH 4/4] iommu/mediatek: Adjust iotlb_sync_range Date: Mon, 19 Oct 2020 19:31:00 +0800 Message-ID: <20201019113100.23661-5-chao.hao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201019113100.23661-1-chao.hao@mediatek.com> References: <20201019113100.23661-1-chao.hao@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 45005679F3403F0A13FD86D253488C445AA63407230CD27F27E3DC72213A2D4D2000:8 X-MTK: N Cc: Jun Wen , FY Yang , wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org, Chao Hao , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Mingyuan Ma X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" As is title, the patch only adjusts the architecture of iotlb_sync_range(). No functional change. Signed-off-by: Chao Hao --- drivers/iommu/mtk_iommu.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index bca1f53c0ab9..66e5b9d3c575 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -191,10 +191,9 @@ static void mtk_iommu_tlb_flush_all(void *cookie) } } -static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size, - size_t granule, void *cookie) +static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size) { - struct mtk_iommu_data *data = cookie; + struct mtk_iommu_data *data; unsigned long flags; int ret; u32 tmp; @@ -216,7 +215,7 @@ static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size, if (ret) { dev_warn(data->dev, "Partial TLB flush timed out, falling back to full flush\n"); - mtk_iommu_tlb_flush_all(cookie); + mtk_iommu_tlb_flush_all(data); } /* Clear the CPE status */ writel_relaxed(0, data->base + REG_MMU_CPE_DONE); @@ -224,11 +223,6 @@ static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size, } } -static void __mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size) -{ - mtk_iommu_tlb_flush_range_sync(iova, size, 0, NULL) -} - static void mtk_iommu_tlb_flush_skip(unsigned long iova, size_t size, size_t granule, void *cookie) { @@ -522,7 +516,7 @@ static const struct iommu_ops mtk_iommu_ops = { .map = mtk_iommu_map, .unmap = mtk_iommu_unmap, .flush_iotlb_all = mtk_iommu_flush_iotlb_all, - .iotlb_sync_range = __mtk_iommu_tlb_flush_range_sync, + .iotlb_sync_range = mtk_iommu_tlb_flush_range_sync, .iova_to_phys = mtk_iommu_iova_to_phys, .probe_device = mtk_iommu_probe_device, .release_device = mtk_iommu_release_device, -- 2.18.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu