All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
To: Ashwin Chaugule
	<ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Jassi Brar
	<jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>,
	Devicetree List
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
	<ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Mark Rutland <Mark.Rutland-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
	Courtney Cavin
	<courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
	Matt Porter <mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Craig McGeachie <slapdau-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>,
	LeyFoon Tan <lftan.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Loic Pallardy <loic.pallardy-qxv4g6HH51o@public.gmane.org>,
	"Anna, Suman" <s-anna-l0cyMroinI0@public.gmane.org>,
	Bjorn Andersson <bjorn-UYDU3/A3LUY@public.gmane.org>,
	Patch Tracking <patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Tetsuya Takinishi
	<t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
	"broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<lee.jones@linaro>
Subject: Re: [PATCHv10 2/4] mailbox: Introduce framework for mailbox
Date: Mon, 22 Sep 2014 19:15:56 +0100	[thread overview]
Message-ID: <5420675C.6040805@arm.com> (raw)
In-Reply-To: <CAJ5Y-eZ5gNMQ2YRN4iS5QTU7qUrgxGdTHXhQZ_2ut4iBsEZHGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>



On 22/09/14 19:01, Ashwin Chaugule wrote:
> Hi Jassi,
>
> On 1 August 2014 08:31, Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.

Regards,
Sudeep

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
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:15:56 +0100	[thread overview]
Message-ID: <5420675C.6040805@arm.com> (raw)
In-Reply-To: <CAJ5Y-eZ5gNMQ2YRN4iS5QTU7qUrgxGdTHXhQZ_2ut4iBsEZHGg@mail.gmail.com>



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.

Regards,
Sudeep


  parent reply	other threads:[~2014-09-22 18:15 UTC|newest]

Thread overview: 36+ 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:29 ` Jassi Brar
     [not found] ` <1406896194-4667-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 12:30   ` [PATCHv10 1/4] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-08-01 12:30     ` 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 12:31     ` Jassi Brar
     [not found]     ` <1406896296-4863-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 18:37       ` Mark Brown
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:01         ` Ashwin Chaugule
     [not found]         ` <CAJ5Y-eZ5gNMQ2YRN4iS5QTU7qUrgxGdTHXhQZ_2ut4iBsEZHGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-22 18:15           ` Sudeep Holla [this message]
2014-09-22 18:15             ` Sudeep Holla
     [not found]             ` <5420675C.6040805-5wv7dgnIgG8@public.gmane.org>
2014-09-22 18:33               ` Sudeep Holla
2014-09-22 18:33                 ` Sudeep Holla
     [not found]                 ` <54206B7C.60501-5wv7dgnIgG8@public.gmane.org>
2014-09-24 16:14                   ` Ashwin Chaugule
2014-09-24 16:14                     ` Ashwin Chaugule
     [not found]                     ` <CAJ5Y-ea7e1LCym49jGen-eXuw6tWOzTi3Rrd_K-4ZcZUwkv_jg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-26  0:57                       ` Jassi Brar
2014-09-26  0:57                         ` Jassi Brar
     [not found]                         ` <CAJe_ZhdxZwrBsvRt7X0KN2+vnQVRDAJdUGOyNgq2rynwmsur9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-26 15:43                           ` Ashwin Chaugule
2014-09-26 15:43                             ` Ashwin Chaugule
2014-08-01 18:26   ` [PATCHv10 0/4] Common Mailbox Framework Mark Brown
2014-08-01 18:26     ` Mark Brown
     [not found]     ` <20140801182656.GJ30458-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-02  7:48       ` Jassi Brar
2014-08-02  7:48         ` Jassi Brar
     [not found]         ` <CAJe_ZhcmEUDD3+xC2mBFnBm7uiMhibtHhBOMxVBhy700BTvYsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-09 16:23           ` Suman Anna
2014-09-09 16:23             ` Suman Anna
     [not found]             ` <540F299A.6030906-l0cyMroinI0@public.gmane.org>
2014-09-09 16:57               ` Mark Brown
2014-09-09 16:57                 ` Mark Brown
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
     [not found]   ` <1406896365-4971-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 18:43     ` Mark Brown
2014-08-01 18:43       ` Mark Brown
2014-08-02  7:47       ` Jassi Brar
2014-08-04 14:40         ` 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=5420675C.6040805@arm.com \
    --to=sudeep.holla-5wv7dgnigg8@public.gmane.org \
    --cc=Mark.Rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=bjorn-UYDU3/A3LUY@public.gmane.org \
    --cc=broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=lee.jones@linaro \
    --cc=lftan.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=loic.pallardy-qxv4g6HH51o@public.gmane.org \
    --cc=mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=s-anna-l0cyMroinI0@public.gmane.org \
    --cc=slapdau-/E1597aS9LT0CCvOHzKKcA@public.gmane.org \
    --cc=t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.