From patchwork Mon Nov 4 07:01:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WW9uZyBXdSAo5ZC05YuHKQ==?= X-Patchwork-Id: 11225097 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB2751515 for ; Mon, 4 Nov 2019 07:01:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3856220848 for ; Mon, 4 Nov 2019 07:01:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tbf0k584" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3856220848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aUONOc+NVszBmAk0OX7nXEOxoX98NVRiOUDC3Dvgtyw=; b=Tbf0k584OisiA9 zxIOP8YXDjcJIImWlnOvV5B5X3AtIaljt6f0XG/X+Ne/sGoOjzBxv5i0cx8MaSJYUrb2kvMAcnhUb dT1dZvWktZDmqS9Ua1DInNuV2zTEZt2aabaq4I10KFs62cEV4P/O1bMPDaVrH8mfh0y4c5rVRhZUC DwtfadGxyCm6rxHhlxioqzMQ78v0aoC8+BXPSceqxCZlT9bH2dobIDMy6qHK+tAb7pNjyIDYlUgsA T56nwzM76tqH47A662kqonUieCdZQfwQc0BOialz1uYZOXxP8sOv/MSHz3CtWxMKY79hCdUfEoOOw Oz6NPu9oyE1Zwd/n4Ezw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRWMp-0002Xy-8H; Mon, 04 Nov 2019 07:01:35 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRWMk-0002S0-GZ; Mon, 04 Nov 2019 07:01:32 +0000 X-UUID: e5a54da05282478c9bc8b613aa505b6f-20191103 X-UUID: e5a54da05282478c9bc8b613aa505b6f-20191103 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1698501807; Sun, 03 Nov 2019 23:01:14 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 3 Nov 2019 23:01:16 -0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 4 Nov 2019 15:01:15 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 4 Nov 2019 15:01:14 +0800 From: Yong Wu To: Matthias Brugger , Joerg Roedel , Will Deacon Subject: [PATCH v5 0/7] Improve tlb range flush Date: Mon, 4 Nov 2019 15:01:01 +0800 Message-ID: <1572850868-22315-1-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191103_230130_574449_D588CB04 X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , cui.zhang@mediatek.com, srv_heupstream@mediatek.com, chao.hao@mediatek.com, edison.hsieh@mediatek.com, linux-kernel@vger.kernel.org, Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, yong.wu@mediatek.com, Robin Murphy , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patchset mainly fixes a tlb flush timeout issue and use the new iommu_gather to re-implement the tlb flush flow. and several clean up patches about the tlb_flush. change note: v5: No code change. Only update the commit message of the last patch[7/7] suggested from Tomasz in the internal review. v4: https://lore.kernel.org/linux-iommu/1571196792-12382-1-git-send-email-yong.wu@mediatek.com/#t 1. Add a new tlb_lock for tlb operations. 2. Delete the pgtlock. 3. Remove the "writel" patch. v3: https://lore.kernel.org/linux-iommu/1571035101-4213-1-git-send-email-yong.wu@mediatek.com/T/#t 1. Use the gather to implement the tlb_flush suggested from Tomasz. 2. add some clean up patches. v2: https://lore.kernel.org/linux-iommu/1570627143-29441-1-git-send-email-yong.wu@mediatek.com/T/#t 1. rebase on v5.4-rc1 2. only split to several patches. v1: https://lore.kernel.org/linux-iommu/CAAFQd5C3U7pZo4SSUJ52Q7E+0FaUoORQFbQC5RhCHBhi=NFYTw@mail.gmail.com/T/#t Yong Wu (7): iommu/mediatek: Correct the flush_iotlb_all callback iommu/mediatek: Add a new tlb_lock for tlb_flush iommu/mediatek: Use gather to achieve the tlb range flush iommu/mediatek: Delete the leaf in the tlb_flush iommu/mediatek: Move the tlb_sync into tlb_flush iommu/mediatek: Get rid of the pgtlock iommu/mediatek: Reduce the tlb flush timeout value drivers/iommu/mtk_iommu.c | 88 +++++++++++++++-------------------------------- drivers/iommu/mtk_iommu.h | 2 +- 2 files changed, 29 insertions(+), 61 deletions(-)