From patchwork Mon Aug 16 07:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 12437893 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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 08920C4320A for ; Mon, 16 Aug 2021 07:32:00 +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 C43DA61ABA for ; Mon, 16 Aug 2021 07:31:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C43DA61ABA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :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=jbq7L9GlB3fq5jUhlcMgpi+xnZl9LoQ2P3g2w+Z7l7s=; b=KhymxyCOuAlBFj 7Zk0Cd4Eaz4JZNpPlQVp5u9NDgUu0sOyagk7URxilbRRVp0sJtlM9OetcaDGKUtSlkn4j942kml3B aPtRowf4O0Euk7+qpOTMZNrPmoTYOrLPJ4L7eEoyk3NS6oX/KkNDwtKBo1Kc/2YMc86u1m2gSAcTW SFKdRvmsnlVpnLl3GPWzR1UmKsQSQ/yRie0AHGGIIyfzTsub0zRuI2qJqSTZ+9J0dpbX2yHHjdXNP DIyEyTcxXVaEu0kGa+23wHE4zvyRyIe90w9Cxd2QfSGxdQYgLzv4JDLuVfSk2PEQ9FCRYjwHyG7wC L0pGiWdsPxi6Vk5tptgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFX4m-00GMbn-7j; Mon, 16 Aug 2021 07:30:28 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFX4I-00GMUr-Qo for linux-arm-kernel@lists.infradead.org; Mon, 16 Aug 2021 07:30:02 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Gp5LT0tddzdbCh; Mon, 16 Aug 2021 15:26:09 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 16 Aug 2021 15:29:52 +0800 Received: from thunder-town.china.huawei.com (10.174.178.242) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 16 Aug 2021 15:29:50 +0800 From: Zhen Lei To: Will Deacon , Robin Murphy , "Joerg Roedel" , linux-arm-kernel , iommu , CC: Zhen Lei , John Garry Subject: [PATCH v2 0/4] Prepare for ECMDQ support Date: Mon, 16 Aug 2021 15:29:00 +0800 Message-ID: <20210816072904.1897-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.178.242] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210816_002959_102149_E15BB091 X-CRM114-Status: UNSURE ( 6.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org v1 --> v2: 1. Stop pre-zeroing batch commands. Patch 1 is modified. Other patches remain unchanged. Before: struct arm_smmu_cmdq_batch cmds = {}; After: struct arm_smmu_cmdq_batch cmds; cmds.num = 0; RFC --> v1 1. Resend the patches for ECMDQ preparation and remove the patches for ECMDQ implementation. 2. Patch 2 is modified. Other patches remain unchanged. 1) Add static helper __arm_smmu_cmdq_issue_cmd(), and make arm_smmu_cmdq_issue_cmd() and arm_smmu_cmdq_issue_cmd_with_sync() implement based on it. 2) Remove unused arm_smmu_cmdq_issue_sync(). RFC: https://www.spinics.net/lists/arm-kernel/msg904879.html Zhen Lei (4): iommu/arm-smmu-v3: Use command queue batching helpers to improve performance iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync() iommu/arm-smmu-v3: Add and use static helper function arm_smmu_get_cmdq() iommu/arm-smmu-v3: Extract reusable function __arm_smmu_cmdq_skip_err() drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 72 ++++++++++++--------- 1 file changed, 43 insertions(+), 29 deletions(-)