Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbbHZDqh (ORCPT ); Tue, 25 Aug 2015 23:46:37 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:17852 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbbHZDqf (ORCPT ); Tue, 25 Aug 2015 23:46:35 -0400 Date: Tue, 25 Aug 2015 20:46:22 -0700 From: Bjorn Andersson To: Andy Gross CC: , , Subject: Re: [PATCH] soc: qcom: smd: Use correct remote processor ID Message-ID: <20150826034622.GH13472@usrtlx11787.corpusers.net> References: <1440534995-12899-1-git-send-email-agross@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1440534995-12899-1-git-send-email-agross@codeaurora.org> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2642 Lines: 77 On Tue 25 Aug 13:36 PDT 2015, Andy Gross wrote: > This patch fixes SMEM addressing issues when remote processors need to use > secure SMEM partitions. > Right, sorry for missing that remote_pid and edge_pid isn't in sync... > Signed-off-by: Andy Gross > --- > .../devicetree/bindings/soc/qcom/qcom,smd.txt | 7 +++++++ > drivers/soc/qcom/smd.c | 18 ++++++++++++++---- > 2 files changed, 21 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt > index f65c76d..3b60702 100644 > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt > @@ -37,6 +37,12 @@ The edge is described by the following properties: > Definition: the identifier of the remote processor in the smd channel > allocation table > > +- qcom,remote-pid: > + Usage: required I would like to see this being optional, as this is not a property that matters on any of the 32-bit systems (perhaps 8084?). > + Value type: > + Definition: the identifier for the remote processor as known by the rest > + of the system. > + > = SMD DEVICES > > In turn, subnodes of the "edges" represent devices tied to SMD channels on that > @@ -68,6 +74,7 @@ The following example represents a smd node, with one edge representing the > interrupts = <0 168 1>; > qcom,ipc = <&apcs 8 0>; > qcom,smd-edge = <15>; > + qcom,remote-pid = <0xffffffff>; This looks messy, so let's make the property optional and make its absence indicate the "global partition". > > rpm_requests { > compatible = "qcom,rpm-msm8974"; > diff --git a/drivers/soc/qcom/smd.c b/drivers/soc/qcom/smd.c [..] > @@ -1184,6 +1187,13 @@ static int qcom_smd_parse_edge(struct device *dev, > return -EINVAL; > } > > + key = "qcom,remote-pid"; > + ret = of_property_read_u32(node, key, &edge->remote_pid); > + if (ret) { > + dev_err(dev, "edge missing %s property\n", key); > + return -EINVAL; > + } > + So I suggest you changing this to: edge->remote_pid = QCOM_SMEM_HOST_ANY; of_property_read_u32(node, "qcom,remote-pid", &edge->remote_pid); > syscon_np = of_parse_phandle(node, "qcom,ipc", 0); > if (!syscon_np) { > dev_err(dev, "no qcom,ipc node\n"); Regards, Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/