From: Sudeep Holla <sudeep.holla@arm.com>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>,
Jassi Brar <jaswinder.singh@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Devicetree List <devicetree@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
"ks.giri@samsung.com" <ks.giri@samsung.com>,
Arnd Bergmann <arnd@arndb.de>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
Mark Rutland <Mark.Rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <Pawel.Moll@arm.com>,
Courtney Cavin <courtney.cavin@sonymobile.com>,
Matt Porter <mporter@linaro.org>,
Craig McGeachie <slapdau@yahoo.com.au>,
LeyFoon Tan <lftan.linux@gmail.com>,
Loic Pallardy <loic.pallardy@st.com>,
"Anna, Suman" <s-anna@ti.com>, Bjorn Andersson <bjorn@kryo.se>,
Patch Tracking <patches@linaro.org>,
"mollie.wu@linaro.org" <mollie.wu@linaro.org>,
Tetsuya Takinishi <t.takinishi@jp.fujitsu.com>,
"broonie@linaro.org" <broonie@linaro.org>,
Kevin Hilman <khilman@linaro.org>,
"lee.jones@linaro.org" <lee.jones@linaro.org>,
"andy.green@linaro.org" <andy.green@linaro.org>
Subject: Re: [PATCHv10 2/4] mailbox: Introduce framework for mailbox
Date: Mon, 22 Sep 2014 19:33:32 +0100 [thread overview]
Message-ID: <54206B7C.60501@arm.com> (raw)
In-Reply-To: <5420675C.6040805@arm.com>
On 22/09/14 19:15, Sudeep Holla wrote:
>
>
> On 22/09/14 19:01, Ashwin Chaugule wrote:
>> Hi Jassi,
>>
>> On 1 August 2014 08:31, Jassi Brar <jaswinder.singh@linaro.org> wrote:
>>> Introduce common framework for client/protocol drivers and
>>> controller drivers of Inter-Processor-Communication (IPC).
>>>
>>> Client driver developers should have a look at
>>> include/linux/mailbox_client.h to understand the part of
>>> the API exposed to client drivers.
>>> Similarly controller driver developers should have a look
>>> at include/linux/mailbox_controller.h
>>>
>>> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
>>> ---
>>> MAINTAINERS | 8 +
>>> drivers/mailbox/Makefile | 4 +
>>> drivers/mailbox/mailbox.c | 466 +++++++++++++++++++++++++++++++++++++
>>> include/linux/mailbox_client.h | 46 ++++
>>> include/linux/mailbox_controller.h | 135 +++++++++++
>>> 5 files changed, 659 insertions(+)
>>> create mode 100644 drivers/mailbox/mailbox.c
>>> create mode 100644 include/linux/mailbox_client.h
>>> create mode 100644 include/linux/mailbox_controller.h
>>>
>>
>> [..]
>>
>>> +
>>> +static void poll_txdone(unsigned long data)
>>> +{
>>> + struct mbox_controller *mbox = (struct mbox_controller *)data;
>>> + bool txdone, resched = false;
>>> + int i;
>>> +
>>> + for (i = 0; i < mbox->num_chans; i++) {
>>> + struct mbox_chan *chan = &mbox->chans[i];
>>> +
>>> + if (chan->active_req && chan->cl) {
>>> + resched = true;
>>> + txdone = chan->mbox->ops->last_tx_done(chan);
>>> + if (txdone)
>>> + tx_tick(chan, 0);
>>> + }
>>> + }
>>> +
>>> + if (resched)
>>> + mod_timer(&mbox->poll, jiffies +
>>> + msecs_to_jiffies(mbox->period));
>>
>> While preparing a different patch which uses the Mbox framework, I
>> noticed that mbox->period might not be initialized anywhere. Also, how
>> is mbox->txpoll_period to be used? It appears from the description of
>> txpoll_period in mbox_controller.h that you'd want to use that value
>> in the mod_timer above, or equate the two somewhere in the controller
>> registration or eliminate one of the two. FWIW I also looked at your
>> code in [1].
>>
>
> IIUC the controller needs to set the txpoll_period if it sets
> txdone_poll, may be a sanity check for !0 would be good.
>
Ah, sorry I confused mbox->period to txpoll_period.
You are right mbox->period is not set, the header claims it to be
private, and hence I assume it needs to be handled only in core mailbox
library. Not sure if we need both mbox->period and txpoll_period though.
Regards,
Sudeep
next prev parent reply other threads:[~2014-09-22 18:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 12:29 [PATCHv10 0/4] Common Mailbox Framework Jassi Brar
2014-08-01 12:30 ` [PATCHv10 1/4] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-08-01 18:27 ` Mark Brown
2014-08-01 12:31 ` [PATCHv10 2/4] mailbox: Introduce framework for mailbox Jassi Brar
2014-08-01 18:37 ` Mark Brown
2014-08-02 7:50 ` Jassi Brar
2014-09-22 18:01 ` Ashwin Chaugule
2014-09-22 18:15 ` Sudeep Holla
2014-09-22 18:33 ` Sudeep Holla [this message]
2014-09-24 16:14 ` Ashwin Chaugule
2014-09-26 0:57 ` Jassi Brar
2014-09-26 15:43 ` Ashwin Chaugule
2014-08-01 12:32 ` [PATCHv10 3/4] doc: add documentation for mailbox framework Jassi Brar
2014-08-01 12:32 ` [PATCHv10 4/4] dt: mailbox: add generic bindings Jassi Brar
2014-08-01 18:43 ` Mark Brown
2014-08-02 7:47 ` Jassi Brar
2014-08-04 14:40 ` Mark Brown
2014-08-01 18:26 ` [PATCHv10 0/4] Common Mailbox Framework Mark Brown
2014-08-02 7:48 ` Jassi Brar
2014-09-09 16:23 ` Suman Anna
2014-09-09 16:57 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54206B7C.60501@arm.com \
--to=sudeep.holla@arm.com \
--cc=Mark.Rutland@arm.com \
--cc=Pawel.Moll@arm.com \
--cc=andy.green@linaro.org \
--cc=arnd@arndb.de \
--cc=ashwin.chaugule@linaro.org \
--cc=bjorn@kryo.se \
--cc=broonie@linaro.org \
--cc=courtney.cavin@sonymobile.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jaswinder.singh@linaro.org \
--cc=khilman@linaro.org \
--cc=ks.giri@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lftan.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=mollie.wu@linaro.org \
--cc=mporter@linaro.org \
--cc=patches@linaro.org \
--cc=robh+dt@kernel.org \
--cc=s-anna@ti.com \
--cc=slapdau@yahoo.com.au \
--cc=t.takinishi@jp.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome