From patchwork Thu Jan 24 15:24:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10779341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00B75746 for ; Thu, 24 Jan 2019 15:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3AE23097B for ; Thu, 24 Jan 2019 15:25:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D819930B51; Thu, 24 Jan 2019 15:25:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54E5E30B74 for ; Thu, 24 Jan 2019 15:25:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728470AbfAXPZt (ORCPT ); Thu, 24 Jan 2019 10:25:49 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34767 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727955AbfAXPZt (ORCPT ); Thu, 24 Jan 2019 10:25:49 -0500 Received: by mail-wr1-f67.google.com with SMTP id f7so6954514wrp.1 for ; Thu, 24 Jan 2019 07:25:47 -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=JoyjsP80og1yOrGL6oyDzogxzzxq7s9glS1eTUSPFvM=; b=Ny88ub/Kk9gq2I0y33cIDHXavVGaXwXpXygkodg4isngsNxhs3k+KA5pDp53Keeu7q luT5zRGWBSN0aeD6GePboaQYwhnQ57knFLp3ywW3m0BDaCKyBtqWrNsk15rMwYtLEUsP uJCCfjkBdMtU+e8BpD4bMv382fDFLIPJD8ZdE= 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=JoyjsP80og1yOrGL6oyDzogxzzxq7s9glS1eTUSPFvM=; b=Kx5Qs22qbTbGedX9lR3tjfG2Zsge7OOP3XjoYdS3dYrbuiWMrdVVeT2WU5Qi+99uGK 8RAjmi2SkntRY2qYT9H6m6KajQtSE8J5on6lRIWIZzCvEc5sVuq0nuCTluZNfk1+pzCp ydAAttjxDn6f6bLp0/hV0t3jWWr+YibtF8Oc3/Z5Ym+eCLMbHSB89+z1ywfcfB6pKitc MZ5fHEZTYcddc8VMRdXa/34K6kLGF4O9LNinVYgZo26glQbKUxl2EBqi4iHA+JOO11zV IRvm/g9M8t0KmJqcNuE4vNPT5bhElCIieCXveep0jz3OgQYXlctYiUbZadQCvcBoLPjh d+tw== X-Gm-Message-State: AJcUukfxmHz+lgwHz0cnXENCdTpaxm7A7r0dBdasFaZHL3iVaMDNkjH2 QYrexr+ZcbPyE7ef2D4QUFn23w== X-Google-Smtp-Source: ALg8bN73lWl3adckG87FkCc2kd8XNqw/oGu/OixYnC4hDK8WgPcWvquhD2zX2dGXJjTvakK7c+LBZA== X-Received: by 2002:a05:6000:f:: with SMTP id h15mr7333955wrx.248.1548343547081; Thu, 24 Jan 2019 07:25:47 -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 z12sm80371157wrh.35.2019.01.24.07.25.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Jan 2019 07:25:46 -0800 (PST) From: Srinivas Kandagatla To: robh+dt@kernel.org, gregkh@linuxfoundation.org, arnd@arndb.de Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, bkumar@qti.qualcomm.com, linux-arm-msm@vger.kernel.org, thierry.escande@linaro.org, Srinivas Kandagatla Subject: [PATCH v4 0/5] misc: Add support to Qualcomm FastRPC driver Date: Thu, 24 Jan 2019 15:24:07 +0000 Message-Id: <20190124152412.10503-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Thanks for reviewing the v3, here is new version addressing the comments from v3. 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 v3(https://patchwork.kernel.org/cover/10763343/) : - removed secured property from dt binding, defer it till we add support to secure buffers. - reword various bits in bindings suggested by Rob Herring 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 | 1354 +++++++++++++++++ include/uapi/misc/fastrpc.h | 41 + 5 files changed, 1484 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