Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3597935ybx; Sun, 3 Nov 2019 23:04:35 -0800 (PST) X-Google-Smtp-Source: APXvYqz0sKmzmXWZta74O6KBI1ci5fXxTM2bIr36bZY/O6cEKFrBOcfeFFkiP0DJqZg67BPmGb+E X-Received: by 2002:a17:906:7399:: with SMTP id f25mr6213036ejl.176.1572851075087; Sun, 03 Nov 2019 23:04:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572851075; cv=none; d=google.com; s=arc-20160816; b=KxsLQyMc4n2KFweVsr1BGdZE04PqT2CeHY6FLpWW1JsWX9P2D8rxL1WyHqe6HvE7Yu oYcw1T+1OCz8rNUgXvcjlrXXt/XWnPz7n0bIyTEs1iVMb9ZmeDDDR2jBOaSDRAPnUeVk kMknJXyqhwQJgJKY5bAHa+4Z6eBNOppgEnuUbPtCU3Wu//Hi11S6kKfej0fgXeiQ0Fw5 Qlp81ShntPq9itXz6NYUF0PeFTnyXt7zvNMlBpyoGtxAFV8PF3t/Buow/DOYpnbLVnZW Mjm0K0zFbiuxAJPdbSkDBHhF8FKpbEPgYR7m3Rmo1BYDdDJAAeNS9mvKivbEMLTnbCzo Aplw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=qPGCzfBRypJW8A7zpQxK1Bg9ui/OLqua8r7p5o9t2zY=; b=QyFpV/0rfjaHKfJdO1dPCrxUR79RFT+pKwVcQ1CyXGdVKpCWBZsH2FldyrGh6yrps2 6n7muvqnmjsHXLm7M6lYe0u9edKO/4o8L/02B9ejHueq1Dvpb2LMvWN+lqanWqOHYy6+ dqYZkcezUW1hiEuyZD5txFgYAca0JdeNholRcAGYrEQE/vJ0wYW65Gt1opgMdsulmJXF wOXMcUp0sBbm/BYHz8QPAKWwlop5jPtWxOANSEOHnHdeaJ9fgKH1zEmxA27jtqBzv7St +L18ZMjtyFgZTYRiGuRMxQLRY09KEUQFD5cjT/JdaljssMS2UCTxEdwEPxNCRKdYMss/ Ca3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q6si6015969edr.194.2019.11.03.23.04.11; Sun, 03 Nov 2019 23:04:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727826AbfKDHB1 (ORCPT + 99 others); Mon, 4 Nov 2019 02:01:27 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:62334 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726441AbfKDHB1 (ORCPT ); Mon, 4 Nov 2019 02:01:27 -0500 X-UUID: d24b734281444918b8fb31d13f0c5550-20191104 X-UUID: d24b734281444918b8fb31d13f0c5550-20191104 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 870836612; Mon, 04 Nov 2019 15:01:18 +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 CC: Evan Green , Robin Murphy , Tomasz Figa , , , , , , , , Nicolas Boichat , , , , 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 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 1.9.1