Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3011911rdh; Mon, 27 Nov 2023 04:47:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IE93SxlZJBUAuaQD3g57xbhMcA/sy4mu66cUWaeSlfRTe7I+XIaToqdPYlal1kc09z5RLsY X-Received: by 2002:a17:90b:30cb:b0:281:3a4a:2e61 with SMTP id hi11-20020a17090b30cb00b002813a4a2e61mr9555277pjb.14.1701089240353; Mon, 27 Nov 2023 04:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701089240; cv=none; d=google.com; s=arc-20160816; b=pBIoN+DGkZh02Tta3tUBrLl2Y7nbDG3pPFpO9tEoISlL/8ORg92V+7YkqXrdywxxIM nplZ0ken9k534rMaJ5pMNPs/dkns4SxMF6igrUproC58gq0lvYRSU9aKnYBIm9y7A3GN OpFh1kmQltV6psojg/LvZpqp1she1o0C3AxPnf7WrfCflDrqh/HiNEe2qFHtGVxZxMQA opGK+hqgC0TEYvKe5CUxMQN/stPCRs5uRvukCZ1sCgU4FM7FaxdlzdLNlipVMkNuTAcx Ly13bl6HeMV6j8lVC/UWCytSQacuj38yJxbdUeSl0gpLtYaMZgehi8ThTSYp7/Pk1l/K b9Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=My7gSFRp+Y7hoOV+FBK21Q8iK89AnBNbYhuMMj6/9YA=; fh=GCPsaS9gPzUx9ecgCkAchNprj2XO1a7aLVETzufn50Y=; b=Rl18hAzQVTjHzrtZ7mvbUr0t7jL2h+EGQTTIrEYEKBAxmBMYW+/9NCUvwhUZaW7F7j cDT94J2qpPwGG11iZ0rgA534/iak2IHFL8MTb0xK2x+ojVvZWwQKslgs4L7ubTFi9n4f vpq2fI827iKdGJAfqQfUuTqnrneWtC/FzuD60RLX7YqFX8pIn3ZQ9Y3WVhA307clLn6o xP0VGbl9JroYPVsnEDKDaWujIjoVkI3KGdbr0spf2mMsZZ8VhAzLLIaBSif/bw99QNv0 f6ld0PWPPH0S8mVAvnuYV1qTXVXNC72zxXuD+QTVBzoaMECaW31EqgiZlGkCznta1vJQ oxWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nq8c2ZQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id pw13-20020a17090b278d00b00285b78adbd3si4061412pjb.137.2023.11.27.04.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:47:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nq8c2ZQ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7D43F807AFD8; Mon, 27 Nov 2023 04:46:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233387AbjK0Mpk (ORCPT + 99 others); Mon, 27 Nov 2023 07:45:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233192AbjK0Mpi (ORCPT ); Mon, 27 Nov 2023 07:45:38 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F5D010F for ; Mon, 27 Nov 2023 04:45:44 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-77d84f8808dso139748885a.2 for ; Mon, 27 Nov 2023 04:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701089143; x=1701693943; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=My7gSFRp+Y7hoOV+FBK21Q8iK89AnBNbYhuMMj6/9YA=; b=nq8c2ZQ2iSF2Iu1oeCXn1TmpOK9wA//99CcvtoPaue8jEu34xZewQr/FOqKtlyXOvM LFPOti7AhKNQbW6rCNst3etX9twZ2x+FOzOM9qDoduhn6Dkdd3mIV2nlqz3wu1xGEB0q F7eGUEg+oJPYkKqEm0P/TVpu7AG8ZuevnFpaiv4WrpJxoWg5wfBP+1BiNf3Cfp3ByBJb Qamtj5LlliWbprW14a7hPYCygiBUZhm7i+tJYIBlJ6I+MiVT8/VwgkOy2ljK4E6xdlC8 CBO+apEVSIgkTU950iQceu39ruj3WgPKsn/2pMy1ieivBPxm/ByxjeRBgjXpHan4un72 ABPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701089143; x=1701693943; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=My7gSFRp+Y7hoOV+FBK21Q8iK89AnBNbYhuMMj6/9YA=; b=C+4GN7UC0KDdVqFSH3vu1QOUFUsP0b7rIXmhqw3gYfZhaIzW/T3R7NhsGAMkbABr3B N+0QdZkoWNIM90Gdn8B2PZHW1STVQXoVtckIsbfk4TghKnotn3uREFprO/O1zKFJh62w dOBBWvXd8Yhb7lZFq3tY9NrxpEIJo0qtQYweIvlP1vMFyg3A4AOyzbfq24c0SQqjwITt VZ+yAUTUJ0XIzA/3ozJMem4/Dk9eqzXkMAIcpxyG5ILREc3CqYK4dVu6qQ8xsxeOrl0S VdFWJ5AWCTi+UlBVA1JiZ2ZjUpPhXx3PiDGnfsD8coYgfc0J6HFGb/Q5W1tGFw+pa+jj cX4g== X-Gm-Message-State: AOJu0YzNWwmyoJPstdAUO8SYKrFTDzyK/v9MrbTHImf6vwhSOYK4897q svbPwu6iWp7qziclmSaTER++ X-Received: by 2002:ad4:4986:0:b0:66d:5d31:999e with SMTP id u6-20020ad44986000000b0066d5d31999emr12774208qvx.43.1701089143185; Mon, 27 Nov 2023 04:45:43 -0800 (PST) Received: from localhost.localdomain ([117.213.103.241]) by smtp.gmail.com with ESMTPSA id er10-20020a056214190a00b0067a204b4688sm2832231qvb.18.2023.11.27.04.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:45:42 -0800 (PST) From: Manivannan Sadhasivam To: lpieralisi@kernel.org, kw@linux.com Cc: kishon@kernel.org, bhelgaas@google.com, mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 0/9] bus: mhi: ep: Add async read/write support Date: Mon, 27 Nov 2023 18:15:20 +0530 Message-Id: <20231127124529.78203-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 04:46:28 -0800 (PST) Hi, This series add async read/write support for the MHI endpoint stack by modifying the MHI ep stack and the MHI EPF (controller) driver. Currently, only sync read/write operations are supported by the stack, this resulting in poor data throughput as the transfer is halted until receiving the DMA completion. So this series adds async support such that the MHI transfers can continue without waiting for the transfer completion. And once the completion happens, host is notified by sending the transfer completion event. This series brings iperf throughput of ~4Gbps on SM8450 based dev platform, where previously 1.6Gbps was achieved with sync operation. - Mani Manivannan Sadhasivam (9): bus: mhi: ep: Pass mhi_ep_buf_info struct to read/write APIs bus: mhi: ep: Rename read_from_host() and write_to_host() APIs bus: mhi: ep: Introduce async read/write callbacks PCI: epf-mhi: Simulate async read/write using iATU PCI: epf-mhi: Add support for DMA async read/write operation PCI: epf-mhi: Enable MHI async read/write support bus: mhi: ep: Add support for async DMA write operation bus: mhi: ep: Add support for async DMA read operation bus: mhi: ep: Add checks for read/write callbacks while registering controllers drivers/bus/mhi/ep/internal.h | 1 + drivers/bus/mhi/ep/main.c | 256 +++++++++------ drivers/bus/mhi/ep/ring.c | 41 +-- drivers/pci/endpoint/functions/pci-epf-mhi.c | 314 ++++++++++++++++--- include/linux/mhi_ep.h | 33 +- 5 files changed, 485 insertions(+), 160 deletions(-) -- 2.25.1