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: 156478 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2087375jaa; Thu, 24 Jan 2019 07:25:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN7pjkX3kc4dbhWNyL8u4LpL8kH9oA0NDx8rYN3vn3CPCz0BBLEuncaqX77AM/HAlQoGF7St X-Received: by 2002:a63:1d59:: with SMTP id d25mr6439543pgm.180.1548343556599; Thu, 24 Jan 2019 07:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548343556; cv=none; d=google.com; s=arc-20160816; b=dxCZiEaajidC47k10JgRkYBERkMU/3TeHz+ZGYqImPpZIUc80C3X+Ya+UlAsDHmiSp 96fJgHlpxrhQZuHxmrbxw+5BFwFC5YfHZTSiuD60aofNCAy6T+OSIaWSL2dpC8fCrl/n k6qf43I5MPQUezCP1hCQLyqqRzcj9MhGP/pW2Rgm08Hx14VHO36wz06+QrgiidzTAKq2 FADKHHjc8zOw+nJYvsc92qa9XH9Bcvn5dXfuAx9U9vFOwivBuFU1+u5fOeGr6YFEe3cb x80YjcQrRmH/MZjskheaxz7a4KbEiepPhi40efc/r/syBshBn0TmkCpQXnVFOg+0BFVd pYBw== 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=JoyjsP80og1yOrGL6oyDzogxzzxq7s9glS1eTUSPFvM=; b=ZH7I6Fmiwfj/4THqLm4ZtERGHe2TLo2D6ByoMvA45tNTpgewzKpxiYZd9F/pDCSGFO qFt5fhkocpe+G3Lb7QCXg+UdIaCnkR2FuNDKVD2bIMuyc/zmFAci7M2TsLlrIyIH55CX foa2sZA3cnKWsw9aFBXYUZgo61qJhFLuEBx7OtXUH2QQco1rC/6idPLuKFiwJWToCfXc GTAQQ7btba1ZFYDo4AXM5WSl9wd6z9fKTiQJG8/D9Rc2kQykWmDXf/tcC6irpAjuH1i7 aGIhFnO0ia/irvOA4RI8Ierk0WaHHcjqow12ZFX9kRo+1qOJ/Z8mTcWqQPOCR6rOfiuy 4wFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ny88ub/K"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 k11si23406780pgg.430.2019.01.24.07.25.49; Thu, 24 Jan 2019 07:25:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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="Ny88ub/K"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728470AbfAXPZt (ORCPT + 15 others); 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-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 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 -- 2.20.1