Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1637248

Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Jassi Brar <jassisinghbrar@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver
Date Mon, 08 May 2017 08:50:01 +0200
Message-ID <tEKEx-pS-1@gated-at.bofh.it> (permalink)
References <tDvex-8iS-3@gated-at.bofh.it> <tDvex-8iS-15@gated-at.bofh.it> <tDIEN-s5-5@gated-at.bofh.it> <tDQj0-5qv-13@gated-at.bofh.it> <tDR5o-5Ye-7@gated-at.bofh.it> <tDRyq-6eu-31@gated-at.bofh.it> <tDS1s-6E3-7@gated-at.bofh.it> <tDWy5-1bO-5@gated-at.bofh.it> <tDZPj-3qA-3@gated-at.bofh.it> <tEJSa-896-3@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=B1x/1fTyVFT6Y4QIK6livkWPZzEDP5SD5TDxmn1FbZo=; b=cSaWXsEbcdXMKM8ShojSk3TU02hni8i9arjDoiwHKxfaLFfQt6GeYLv4SHWgWRDmhR jJQ80PkrDMmY7eaWnn6rpvCgfAbLKrtzqE2Aw1QToffrA1HqxJpI8X+rwNbf5mKPjcTT iLucSUKFAmewKCvr64txaVEZdUy9cZxq+GwTDA3QbI8SYQ2gBKiNW0qyfWWJbeMm16qw h0ypxUitdlO7wqrg4dJFEiQZSfXcrYI63eFVujmAfzQ7pIyA2l+KQ9PhpgXc/fJQ8gpb C7mKZRLrlWtc8XDtdSZ1ATyNk0I02rXboN8/TfmfIDA/vV/Hzjp3VKCbZ18CNoOhzZZO W9eg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=B1x/1fTyVFT6Y4QIK6livkWPZzEDP5SD5TDxmn1FbZo=; b=RPQXdSPa62ltnBuoYPTeFBQNd3B/jcaIVJhiZDdClwevPw7dSQv7Zxxl2mky949bsG nOIU21cMqhNt0j1GpeDma8o5YvqcavmYf1mbl5XnjKmyvhdr+j/w/0SB+q7jXeVarMT2 P7mZse5t0TCWnSVZzvpxeT0eSof1C/Yy0zsihtvpSZY7SLn5sF3QIfCI61b/PJlQ/YZh JVoiK24RrPnGIKbYOULKIulVla7APUAGKL+KGSkDnS8Fgy+yFL7AfuG6YC33fwKuCrp1 LP5Q1xJXE7zW9PqIUAZPacuPVFbhZqeq2kkSwpi5Jhp504etz1/mxR71fX2mogZWlvZW gQfA==
X-Gm-Message-State AN3rC/5rp59PY2gCyNIpWaiZK5egP9X4Pg3xyEb9ZbVXPZA9l12J7S3D pgXoAMtp6DYBhngoqZNtkSE6+xPRt7W/nb0=
X-Received by 10.80.140.164 with SMTP id q33mr36753938edq.77.1494226023629; Sun, 07 May 2017 23:47:03 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc Jeffrey Hugo <jhugo@codeaurora.org>, Andy Gross <andy.gross@linaro.org>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Ohad Ben-Cohen <ohad@wizery.com>, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, Devicetree List <devicetree@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-remoteproc@vger.kernel.org
X-Original-Date Mon, 8 May 2017 12:17:02 +0530
X-Original-Message-ID <CABb+yY3CfWFBDh-qoGHDeHyLhVC7mPQZFB=VDS54OaypG-BqPw@mail.gmail.com>
X-Original-References <20170504200539.27027-1-bjorn.andersson@linaro.org> <20170504200539.27027-3-bjorn.andersson@linaro.org> <CABb+yY2P=qPTYB6PDkjV82Qc67Xzer40BHRsOQP2m-gM3eK_UA@mail.gmail.com> <20170505183729.GG15143@minitux> <CABb+yY03imq8911rF9dHJjG_a_aosksA=tgk7Rog5AZSezHDyg@mail.gmail.com> <338c4262-cc6b-bed2-16fe-1767d1f0d5f6@codeaurora.org> <CABb+yY1K3Hyn7CzQCA6tHu-KrPigARc3cYgBdT8PNX7vjhPK0g@mail.gmail.com> <20170506011920.GH15143@minitux> <CABb+yY1u9mspX1Zu0mg21JMYxpKxsXsvBa9LnF6VNr1_42UJUQ@mail.gmail.com> <20170508055439.GJ15143@minitux>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1637248

Show key headers only | View raw


On Mon, May 8, 2017 at 11:24 AM, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> On Fri 05 May 21:48 PDT 2017, Jassi Brar wrote:
>
> The APCS IPC register serves the basis for all inter-processor
> communication in a Qualcomm platform, so it's not only the RPM driver
> discussed earlier that uses this. It's also used for other non-FIFO
> based communication channels, where the signalled information either
> isn't acked at all or acked on a system-level.
>
Something has to indicate consumption of data or "requested action
taken". Otherwise the protocol is design-wise broken.

> But regardless of the protocol implemented ontop, the purpose of the
> APCS IPC bit is _only_ to invoke some remote handler to consume some
> data, somewhere - the event in itself does not carry any information.
>
Yes, every platform that uses shared-memory works like that. However
there is always something that tells if the command has been acted
upon by the remote. In your case that is the read-pointer movement.

>> The client should call mbox_client_txdone() after
>> mbox_send_message().
>
> So every time we call mbox_send_message() from any of the client drivers
> we also needs to call mbox_client_txdone()?
>
Yes.

> This seems like an awkward side effect of using the mailbox framework -
> which has to be spread out in at least 6 different client drivers :(
>
No. Mailbox or whatever you implement - you must (and do) tick the
state machine to keep the messages moving.
  Best designs have some interrupt occurring when the message has been
consumed by the remote. Some designs have a flag set which needs to be
polled to detect completion. Very few (like yours) that support
neither irq nor polling, have to be driven by the upper protocol layer
by some ack packet (or tracking read/write pointers like you do).
These three cases are denoted by TXDONE_BY_IRQ, TXDONE_BY_POLL and
TXDONE_BY_ACK respectively.

  If no client driver will ever submit a message if there is no space
in FIFO, then you can specify TXDONE_BY_POLL and have last_tx_done()
always return true. That way you don't need to call
mbox_client_txdone().

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 1/5] mailbox: Make startup and shutdown ops optional Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-04 22:10 +0200
  [PATCH v4 2/5] dt-bindings: mailbox: Introduce Qualcomm APCS global binding Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-04 22:10 +0200
  [PATCH v4 4/5] soc: qcom: Add device tree binding for GLINK RPM Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-04 22:10 +0200
    Re: [PATCH v4 4/5] soc: qcom: Add device tree binding for GLINK RPM Rob Herring <robh@kernel.org> - 2017-05-08 19:10 +0200
      Re: [PATCH v4 4/5] soc: qcom: Add device tree binding for GLINK RPM Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-08 20:00 +0200
  [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-04 22:10 +0200
    Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-05 12:30 +0200
      Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-05 20:40 +0200
        Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-05 21:30 +0200
          Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jeffrey Hugo <jhugo@codeaurora.org> - 2017-05-05 22:00 +0200
            Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-05 22:30 +0200
              Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jeffrey Hugo <jhugo@codeaurora.org> - 2017-05-05 22:40 +0200
              Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-06 03:20 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-06 06:50 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-08 08:00 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-08 08:50 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-08 21:20 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-09 18:50 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-09 21:20 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-10 04:40 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-10 21:10 +0200
                Re: [PATCH v4 3/5] soc: qcom: Introduce APCS IPC driver Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-11 04:10 +0200
  [PATCH v4 5/5] rpmsg: Introduce Qualcomm RPM glink driver Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-04 22:10 +0200
  Re: [PATCH v4 1/5] mailbox: Make startup and shutdown ops optional Sudeep Holla <sudeep.holla@arm.com> - 2017-05-05 11:40 +0200
  Re: [PATCH v4 1/5] mailbox: Make startup and shutdown ops optional Jassi Brar <jassisinghbrar@gmail.com> - 2017-05-05 12:40 +0200
    Re: [PATCH v4 1/5] mailbox: Make startup and shutdown ops optional Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-05-05 20:30 +0200

csiph-web