From patchwork Fri Feb 1 13:09:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 157203 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp408511jaa; Fri, 1 Feb 2019 05:11:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IYrHU+2NSMb+2+8btPVq3wulYPJv58x+C6CXz5apIvpLCGCNyKD3PrQXsO5jSYhOSrblOyS X-Received: by 2002:a63:ed42:: with SMTP id m2mr2232703pgk.147.1549026666001; Fri, 01 Feb 2019 05:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549026665; cv=none; d=google.com; s=arc-20160816; b=xClsALvaKPcV0jcICzaf5j8W9bK7zVmpgnaJbFdPkGciA9Pvkv7jO084SHAOUJNEWq PfvNVXNen93WjertYAFua/kOfqC5nZx1RsYK8t9S73nABb2IF75ZBPWB1Ea4AuVGEBW1 Dvygijs34cDtOBrWZjwVhOVrkVxov0X94XdHitz40loX/g3LZb7S4FHQNjGvC9pwCH6i /54fAbx1dN9kXT1/wxie/qG7rmAHS+CHhLSBNR24igV2GjWnj1eF4Yb5W2eoElylhkA1 +i25xZwC5UBF9M7NN2RSpWep8YAE6YQ2Cj6gVCjOMBhggVxV1rdZ857PFjvw3mpofsV+ 0HdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ii/yIFzorgv8lkQFo9ZE4bXTzg8Ln5fex3jmkqOo5gc=; b=J4Jrwu+mUvkYtZTkCPRvcQn6uEH16j23ZgVpU99GBA9EVb+mlrZX5G7eycJkdZkojt RrdpYX8HgCROc6dH4YECcCWyAVOSzMhP+vchnRdVPYkPpByn4wR5PK2seEq+jQHyVSIS 2U437ijVze/JA+LVE4DJY4rsVo/DhP/DHx7PSpvOpb7rw4Y1h61ldwZipZ/e02h0UbW+ NA4fNkOncMesN25R73WSU9p7jpGbfmiEDtPQubmt9XYDqvloYuNm9Eexl0N9V/NodR+T lB1f0hc1zINtRhEdjmHakZQpB3JylWhmb60ytvy2Xe+HQ7kvL+YRkHqpG/JBZJlsx1/e qr4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Yy7Q/kCW"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si7421217pfv.181.2019.02.01.05.11.05; Fri, 01 Feb 2019 05:11:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Yy7Q/kCW"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728504AbfBANLF (ORCPT + 7 others); Fri, 1 Feb 2019 08:11:05 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39483 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbfBANLF (ORCPT ); Fri, 1 Feb 2019 08:11:05 -0500 Received: by mail-wm1-f66.google.com with SMTP id y8so6130747wmi.4 for ; Fri, 01 Feb 2019 05:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ii/yIFzorgv8lkQFo9ZE4bXTzg8Ln5fex3jmkqOo5gc=; b=Yy7Q/kCW5mCuskNdBU79fGTLZr4b2xKeft7piZcPu11809VGXO84AogqAWeFOLudZc AVL4QLUFQxwWH0oauMZ/TnTzYxwLA4dSr3nP1xDaOM9bzCcWco+3mnT70VBlptpOermG 7Z2Ds7lmjNYpl1Nq/i7P336ihexxNcgUjf2LU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ii/yIFzorgv8lkQFo9ZE4bXTzg8Ln5fex3jmkqOo5gc=; b=Wr+xRzmOzeFIDs5zrMLN7S+f9LKFVXO/wQCnIF5ttM8w71nONpt5PK29NxmjpZf0sQ dnfH2Sm44STY3naW38KPzrlMsOCXaNRAvZOFybLGDGAuYTH5P60wH10ZqPYI7PMHF0gG 2GBAj+cbBzMvDSa5bWaxtsEJzWN/FAQ4COEwCCQ2lRfsKCN1GYuG64m5FefW8D7ZBRZK gr+QGfwHErwqwbi62pWV1K6dBY8+dA6WrhXDnga45gvnyi5ETssbCJhz/7Ra5I+Q9JoY l1bBQB8xJ+z+fH+1b2HWdyAddUuvhQ1pjlvO5Fkepb9m2FFnZAiciz26E01c2zjSnFBn PdiA== X-Gm-Message-State: AHQUAuY4OBhfdNKtiB5mFhssPOGN1i+jaJnrbVkfguOjibsH8rJaW6D6 Kdh6/cWdOjGou3wl/NQbvmwY/uM5sc8= X-Received: by 2002:a1c:f509:: with SMTP id t9mr2560911wmh.76.1549026662944; Fri, 01 Feb 2019 05:11:02 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id a12sm12563461wro.18.2019.02.01.05.11.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Feb 2019 05:11:02 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org, arnd@arndb.de Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, bkumar@qti.qualcomm.com, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v5 0/5] misc: Add support to Qualcomm FastRPC driver Date: Fri, 1 Feb 2019 13:09:20 +0000 Message-Id: <20190201130925.27066-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Thanks for reviewing the v4, here is new version addressing the comments from v4. This patchset adds support to Qualcomm FastRPC driver which implements an IPC (Inter-Processor Communication) mechanism that allows for clients to transparently make remote method invocations across processor boundaries. The below diagram depicts invocation of a single method where the client and objects reside on different processors. An object could expose multiple methods which can be grouped together and referred to as an interface. : ,--------, ,------, ,-----------, ,------, ,--------, : | | method | | | | | | method | | : | Client |------->| Stub |->| Transport |->| Skel |------->| Object | : | | | | | | | | | | : `--------` `------` `-----------` `------` `--------` Client: Linux user mode process that initiates the remote invocation Stub: Auto generated code linked in with the user mode process that takes care of marshaling parameters Transport: Involved in carrying an invocation from a client to an object. This involves two portions: 1) FastRPC Linux kernel driver that receives the remote invocation, queues them up and then waits for the response after signaling the remote side. 2) Service running on the remote side that dequeues the messages from the queue and dispatches them for processing. Skel: Auto generated code that takes care of un-marshaling parameters Object: Method implementation Most of the work is derived from various downstream Qualcomm kernels. Credits to various Qualcomm authors who have contributed to this code. Specially Tharun Kumar Merugu TODO: - Support INIT_STATIC process - Support remote mmap/unmap methods. - Handling secure compute context banks. - Add secure buffer support This patchset has been tested on DB410c(msm8916), DB820c (msm8996), SDM845 and QCS404 Qualcomm SoCs with sample apps like matrix multiply, calculator from Hexagon SDK. You can find more info on how to test this at: https://github.com/96boards/documentation/wiki/Dragonboard-Hexagon-DSP Changes since v4(https://patchwork.kernel.org/cover/10779341/) : - collected acks for DT from Rob. - Removed unnecessary list safe iteration spotted by Greg KH. - Removed unnecessary syslog spams. - Added more checks to input validity. Srinivas Kandagatla (5): misc: dt-bindings: Add Qualcomm Fastrpc bindings misc: fastrpc: Add Qualcomm fastrpc basic driver model misc: fastrpc: Add support for context Invoke method misc: fastrpc: Add support for create remote init process misc: fastrpc: Add support for dmabuf exporter .../devicetree/bindings/misc/qcom,fastrpc.txt | 78 + drivers/misc/Kconfig | 10 + drivers/misc/Makefile | 1 + drivers/misc/fastrpc.c | 1366 +++++++++++++++++ include/uapi/misc/fastrpc.h | 41 + 5 files changed, 1496 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt create mode 100644 drivers/misc/fastrpc.c create mode 100644 include/uapi/misc/fastrpc.h -- 2.20.1