Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3586405imu; Fri, 30 Nov 2018 02:51:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/XGfLrmdKHV7Z5RJLl9AqhrxgVFpTm5ecEedVJt6VicUZ2Prq8OiAfk/du4qrbIjEVikFGY X-Received: by 2002:a62:4b4d:: with SMTP id y74mr5073137pfa.186.1543575084107; Fri, 30 Nov 2018 02:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543575084; cv=none; d=google.com; s=arc-20160816; b=dRdVxG4dGd7bmyHmZtQM7NA1TVUkF812T8F2FkFNgFe7/8vtAvCLN1S9+sW5Nydud5 7R9PEnUQX2wokVl/JbC3e3TUJWfTLnQGK51eB2CbcfiuUPlOdTKoAOmWJlrA/lU2XEC7 4odBe8VWo5dKV7TZXGqNTBaf3wJOZA0JIpoYGaaY1QsvuFUeKaGFjKP1BoA7o8cWttoE KEGN/z8ymvmHp6NtswhZeIIBNV7Dev5hwfBkdNMGTfSgLlWVzWdMirgiPTqJWgqWrRJu WUHWQHt4UhUx2KmnwHMFk2OK+ACPnNNth+19uE/hURGBCTFx+rvPzL7hDf1EFhSh8NN4 1hcA== 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=/jx7LbWVa5Ce2Es6m6aTsyTp+I82kqldODHcmjf78ls=; b=wbBWNxpN/OBPy0h74rrb9cdo3e73MTpEXQ2mJ/YXE46LEL2z7awhV1GqZZ0jnM+RSV OWfJiJLDIOQ6e3lIynO6H6wlmFBFGmJePMXpHh8FPMpAfVjW6TUtGd+Q2a9nfQ8sx8oL vUGH1+6wNzQT/ud1oEjHKJGrSe8ZzJj0H6MMkdDtupG8MQla3v+szb2yMFewEdpntwfw cK7nAC2rdwJ/N4Wf5TErErbruoew513HgTD4bw3k+hCLEjPthYtZt8aNwq11NgO/5eNI YevXM07iFe7ZMghEReyY1r1DVwAiEGFs3TKZlpX/jr3/jsaludKH5/bXGx5EuXFTKdRM kBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iketsFyb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b63si5234172pfa.250.2018.11.30.02.51.09; Fri, 30 Nov 2018 02:51:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=iketsFyb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726773AbeK3V4w (ORCPT + 99 others); Fri, 30 Nov 2018 16:56:52 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38361 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbeK3V4v (ORCPT ); Fri, 30 Nov 2018 16:56:51 -0500 Received: by mail-wr1-f67.google.com with SMTP id v13so4812324wrw.5 for ; Fri, 30 Nov 2018 02:47:58 -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=/jx7LbWVa5Ce2Es6m6aTsyTp+I82kqldODHcmjf78ls=; b=iketsFybB/O2dcvylgjf7WEpISOsctbaZPZAvfv0Rta1FqxGocixw2eRI7pKkcpOKd uhd2IxhcbwOLlGKfQIdVIioT8fB2djfU02yPWZWpgx3J6cwFDJwBiEeXKCNcd9mvSvZr sxOGPHBxEV3zfq/CoKxSAF1K9gcL4ZoiOPh1A= 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=/jx7LbWVa5Ce2Es6m6aTsyTp+I82kqldODHcmjf78ls=; b=hapehJf0VgqXoMTX9kFTkFusSQiSROfnomhrgwPXnPHcscg5GcRlDEWWFwKTXcLsRD ynfaY/kMwG3WgvoXU7drZaydeT8tnHy4usS2zbZDcvExHhAAtT1K7ZdZ0HRpoRK5essR hywT+sgPs0rvdqseyqxYDJwVyXI8/2dz7Q5be1JQmjiAOJ4w43SrmlBXU99Qh0JsMabd Cr84UKdXsWIchWXzEQ0E20FlTOUyunUi2epox1oyWIgcCnI/yi3ocT0pdy612ZHx9jMP STGTmxS7AFInfLSGKcw4r3O/xLu9uAdiOElg9zjKUuy8aKWqQ7xlZn9UkjQLETimjcAk 6jDw== X-Gm-Message-State: AA+aEWYUJz5ZOeQPEFTyC3g24Bd7/Ozei6/pLbL4yXnQfKPcjJBatS9K gzMsXfiOW+TkOFlTjqoPrzHt1w== X-Received: by 2002:a5d:538a:: with SMTP id d10mr4346863wrv.202.1543574877741; Fri, 30 Nov 2018 02:47:57 -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 18sm6964211wmm.32.2018.11.30.02.47.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 02:47:57 -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, linux-arm-msm@vger.kernel.org, bkumar@qti.qualcomm.com, thierry.escande@linaro.org, Srinivas Kandagatla Subject: [RFC PATCH 0/6] char: Add support to Qualcomm FastRPC driver Date: Fri, 30 Nov 2018 10:46:51 +0000 Message-Id: <20181130104657.14875-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Keeping the first version simple, below are few things are 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 Qualcomm SoCs with sample apps like matrix multiply, calculator from Hexagon SDK. Thanks, srini Srinivas Kandagatla (5): char: dt-bindings: Add Qualcomm Fastrpc bindings char: fastrpc: Add Qualcomm fastrpc basic driver model char: fastrpc: Add support for context Invoke method char: fastrpc: Add support for create remote init process char: fastrpc: Add support for dmabuf exporter Thierry Escande (1): char: fastrpc: Add support for compat ioctls .../devicetree/bindings/char/qcom,fastrpc.txt | 73 + drivers/char/Kconfig | 10 + drivers/char/Makefile | 1 + drivers/char/fastrpc.c | 1749 +++++++++++++++++ include/uapi/linux/fastrpc.h | 82 + 5 files changed, 1915 insertions(+) create mode 100644 Documentation/devicetree/bindings/char/qcom,fastrpc.txt create mode 100644 drivers/char/fastrpc.c create mode 100644 include/uapi/linux/fastrpc.h -- 2.19.2