public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Langsdorf <mark.langsdorf@calxeda.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Suman Anna <s-anna@ti.com>, Jassi Brar <jassisinghbrar@gmail.com>,
	"Loic PALLARDY (loic.pallardy@st.com)" <loic.pallardy@st.com>,
	Arnd Bergmann <arnd@arndb.de>,
	lkml <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Andy Green <andy.green@linaro.org>
Subject: Re: [RFC 3/3] mailbox: pl320: Introduce common API driver
Date: Mon, 29 Apr 2013 12:06:03 -0500	[thread overview]
Message-ID: <517EA87B.9090906@calxeda.com> (raw)
In-Reply-To: <CAJe_ZhcHVAQfPZJ-+upr-78B+MqLw36jTmS8geZpc2=_-gGzGQ@mail.gmail.com>

On 04/29/2013 11:57 AM, Jassi Brar wrote:
> On 29 April 2013 22:14, Suman Anna <s-anna@ti.com> wrote:
>> On 04/27/2013 01:14 PM, jassisinghbrar@gmail.com wrote:
>>> From: Jassi Brar <jaswinder.singh@linaro.org>
>>> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
>>> ---
>>>  drivers/cpufreq/highbank-cpufreq.c       |   22 +++-
>>>  drivers/mailbox/Makefile                 |    2 +-
>>>  drivers/mailbox/{pl320-ipc.c => pl320.c} |  194 ++++++++++++++++--------------
>>>  include/linux/pl320-ipc.h                |   17 ---
>>>  4 files changed, 125 insertions(+), 110 deletions(-)
>>>  rename drivers/mailbox/{pl320-ipc.c => pl320.c} (51%)
>>>  delete mode 100644 include/linux/pl320-ipc.h
>>>
>>> diff --git a/drivers/cpufreq/highbank-cpufreq.c b/drivers/cpufreq/highbank-cpufreq.c
>>> index 3118b87..5c057e0 100644
>>> --- a/drivers/cpufreq/highbank-cpufreq.c
>>> +++ b/drivers/cpufreq/highbank-cpufreq.c
>>> @@ -19,7 +19,7 @@
>>>  #include <linux/cpu.h>
>>>  #include <linux/err.h>
>>>  #include <linux/of.h>
>>> -#include <linux/pl320-ipc.h>
>>> +#include <linux/mailbox_client.h>
>>>  #include <linux/platform_device.h>
>>>
>>>  #define HB_CPUFREQ_CHANGE_NOTE       0x80000001
>>> @@ -29,8 +29,26 @@
>>>  static int hb_voltage_change(unsigned int freq)
>>>  {
>>>       u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 1000000};
>>> +     struct ipc_client cl;
>>> +     int ret = -ETIMEDOUT;
>>> +     void *chan;
>>>
>>> -     return pl320_ipc_transmit(msg);
>>> +     cl.rxcb = NULL;
>>> +     cl.txcb = NULL;
>>> +     cl.tx_block = true;
>>> +     cl.tx_tout = 1000; /* 1 sec */
>>> +     cl.cntlr_data = NULL;
>>> +     cl.knows_txdone = false;
>>> +     cl.chan_name = "pl320:A9_to_M3";
>>> +
>>> +     chan = ipc_request_channel(&cl);
>>> +
>>> +     if (ipc_send_message(chan, (void *)msg))
>>> +             ret = msg[1]; /* PL320 updates buffer with FIFO after ACK */
>>> +
>>> +     ipc_free_channel(chan);
>>
>> I think I understand why you have done this, but do you really want to
>> request and free every time in the highbank cpufreq driver?
>>
> Exactly my aim - make the API light enough to enable the client to
> use-and-throw. And also because the channel are exclusively assigned,
> acquire a channel only for as long as you need it.

Do you have any numbers on the performance impact? Our cpufreq
transition throughput is bad enough without adding additional delays.

--Mark Langsdorf
Calxeda, Inc.


  reply	other threads:[~2013-04-29 17:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13  3:23 [PATCHv3 00/14] drivers: mailbox: framework creation Suman Anna
2013-03-21 11:39 ` Linus Walleij
2013-03-21 23:22 ` Stephen Rothwell
2013-03-21 23:37   ` Anna, Suman
2013-04-21  2:40 ` Jassi Brar
2013-04-22 15:56   ` Anna, Suman
2013-04-23  4:51     ` Jassi Brar
2013-04-23 19:20       ` Anna, Suman
2013-04-23 23:30         ` Andy Green
2013-04-24  4:39         ` Jassi Brar
2013-04-24  8:08           ` Loic PALLARDY
2013-04-24  8:56             ` Jassi Brar
2013-04-24 23:16               ` Suman Anna
2013-04-25  5:20                 ` Jassi Brar
2013-04-25 22:29                   ` Suman Anna
2013-04-25 23:51                     ` Andy Green
2013-04-26  3:46                     ` Jassi Brar
2013-04-27  1:04                       ` Suman Anna
2013-04-27  1:48                         ` Andy Green
2013-04-29 15:32                           ` Suman Anna
2013-04-27  4:51                         ` Jassi Brar
2013-04-27 18:05                           ` [PATCH 1/3] mailbox: rename pl320-ipc specific mailbox.h jaswinder.singh
2013-04-29 12:46                             ` Mark Langsdorf
2013-04-27 18:14                           ` [RFC 2/3] mailbox: Introduce a new common API jassisinghbrar
2013-05-04  2:20                             ` Suman Anna
2013-05-04 19:08                               ` Jassi Brar
2013-05-06 23:45                                 ` Suman Anna
2013-05-07  7:40                                   ` Jassi Brar
2013-05-07 21:48                                     ` Suman Anna
2013-05-08  5:44                                       ` Jassi Brar
2013-05-09  1:25                                         ` Suman Anna
2013-05-09 16:35                                           ` Jassi Brar
2013-05-10  0:18                                             ` Suman Anna
2013-05-10 10:06                                               ` Jassi Brar
2013-05-10 16:41                                                 ` Suman Anna
2013-04-27 18:14                           ` [RFC 3/3] mailbox: pl320: Introduce common API driver jassisinghbrar
2013-04-29 16:44                             ` Suman Anna
2013-04-29 16:57                               ` Jassi Brar
2013-04-29 17:06                                 ` Mark Langsdorf [this message]
2013-04-29 17:28                                   ` Jassi Brar
2013-04-29 16:00                           ` [PATCHv3 00/14] drivers: mailbox: framework creation Suman Anna
2013-04-29 16:49                             ` Jassi Brar
2013-04-24  7:39         ` Loic PALLARDY
2013-04-24  7:59           ` Jassi Brar
2013-04-24  8:39             ` Loic PALLARDY

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=517EA87B.9090906@calxeda.com \
    --to=mark.langsdorf@calxeda.com \
    --cc=andy.green@linaro.org \
    --cc=arnd@arndb.de \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=s-anna@ti.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