From patchwork Mon Jan 14 19:41: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: 155576 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4040409jaa; Mon, 14 Jan 2019 11:42:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN7vbclDixSpAzoYzLfTlq3SEGBpuvHFTvmwkvq5cJnYejAPKcbz2chDgaIc7CK5LKJERTqf X-Received: by 2002:a65:5c02:: with SMTP id u2mr96630pgr.13.1547494935614; Mon, 14 Jan 2019 11:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547494935; cv=none; d=google.com; s=arc-20160816; b=XSebVR72MNk2IVvbzkz5OM3MVoasOsVV02UjgypRBG5tfhd8xKqkY1IN54Mx/wYR4S nOLIf+EwrG3Zh2GJhGc8d/XMEdF5Gn0Kw/r4hkRUnpph3mPm4kL9WFo51uw4tWJeTr7O dVK/xbbg1wMnfkCeBb4NPHMPzrHLVXTBLYS4t0KICS18WbmVJUwFAdPbCCGwQyF7muic Km2PoWf+FsTWKTJ0BfLALfBVcF8M/eHl3UXbpJsC4DXBInnkY5W+QFXvf8PnANithd7F aDtZrCUHMkQu/PtwFC79OsJSHmVdDmVe8w2ZAI2SWLg38/5pUekGx2keG2iGZQevvt7w vhng== 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=wiZisbbakRt+Z0PHj0nHYS0qlLXlPgH++E8Oy4B0iQo=; b=Zf56tvmdjlyD/fac7C0eVZZWPEJkn2wZMPJ/LsbihywFxP8XMr+h9dCq0T/rMqBLsN Qiw6XrFojGymHjAciYd0O8md/UKdUVR7sxFqS7ag8IhmuOyrJEkHCJUjI4lmJRDjuzh7 lyBZ3jmUu0vrcZiOfx9nKO1FjFZZ0SM1hieoGgFgGgoQQi7slXTtsCemTTcbh0LbC3Cg JBMOLBw7SSgUhutpIDyizX2Qt250Sid/U3z9S9mil/ngLkCB29vfWiTrQtrFmlcZK1lv OqIDlQP4uXd328xSTMo8JErWQ///gP2f4u8pT5tdx0v0XL9J1y8rfSzeRYLxF1N4HDym RifA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XC40RIRD; 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 t77si1085024pgb.51.2019.01.14.11.42.15; Mon, 14 Jan 2019 11:42:15 -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=XC40RIRD; 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 S1726760AbfANTmO (ORCPT + 7 others); Mon, 14 Jan 2019 14:42:14 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41055 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbfANTmO (ORCPT ); Mon, 14 Jan 2019 14:42:14 -0500 Received: by mail-wr1-f67.google.com with SMTP id x10so240662wrs.8 for ; Mon, 14 Jan 2019 11:42:13 -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=wiZisbbakRt+Z0PHj0nHYS0qlLXlPgH++E8Oy4B0iQo=; b=XC40RIRDL4TBODvCy35jmiqNYAU1iglGEDX2oeg8Xw8ChxFe01C5CqonzpktbcwJyh f+GopzIum5Ttn1BNegG3Ov2gpQrglDNa2FoidTFxWeOBgEplx9gu5cYr+e/dkXSGL70L 6mZ8Pa2702ZyEURgxXVyzfsB/hsCwgOpuRo3w= 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=wiZisbbakRt+Z0PHj0nHYS0qlLXlPgH++E8Oy4B0iQo=; b=GOaUOnKmge65w5NwHfmAYMVHagxGg9i3nEwmewObuUcghU5Ll4GPHH6xEYivlUG+1H abkO4BCl6RaHA2GyDzFTHa2nkPhiXxKLj8c/pIKg+u0iUfT6tS7HK0LHCo4AeeMA8Q7G BNrUDtkoS0oExfNRsLJtV7vwGLEfyTffPJGsE1T4VbLTjDgASm8xVCZniOdcQ4t9rk/U wn++JKBampRf1gzvd9zdIQzOy0RlkcLiQHae+MgVutUbt/Lf4PTrUv0nKCfPKtB8a1zw igqKJLxhC3uUbkQYxGqagluDXxzK5Kgf4g6iqMI4XIyMClnpXZkCBLlRb01EGemku6DA URww== X-Gm-Message-State: AJcUukfQBthhA0eTrLrd2H8H21ej6T3q4EpMnxhAYeq9hk81eWCwr+ih NgBYGNQZhNXm/85qVOXLB6zaTg== X-Received: by 2002:adf:a357:: with SMTP id d23mr50868wrb.195.1547494932606; Mon, 14 Jan 2019 11:42:12 -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 b7sm66779996wrs.47.2019.01.14.11.42.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jan 2019 11:42:11 -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 v3 0/5] misc: Add support to Qualcomm FastRPC driver Date: Mon, 14 Jan 2019 19:41:07 +0000 Message-Id: <20190114194112.32567-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 v2, here is new version addressing the comments from v2. 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 v2 (https://lkml.org/lkml/2018/12/7/550) : - removed compat_ioctl specific structures and various cleanups as suggested by Greg KH - replace reg property with label property as suggested by Bjorn - minor content cleanup in bindings as suggested by Mark Rutland 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 | 84 + drivers/misc/Kconfig | 10 + drivers/misc/Makefile | 1 + drivers/misc/fastrpc.c | 1356 +++++++++++++++++ include/uapi/misc/fastrpc.h | 41 + 5 files changed, 1492 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