From: Ohad Ben-Cohen <ohad@wizery.com>
To: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: linux-omap@vger.kernel.org, h-kanigeri2@ti.com
Subject: Re: [PATCH v2 4/4] omap: mailbox: convert block api to kfifo
Date: Mon, 3 May 2010 12:41:35 +0300 [thread overview]
Message-ID: <p2sda15981b1005030241va21fd23fx9fcc84c4502a1919@mail.gmail.com> (raw)
In-Reply-To: <20100503.090723.48519047.Hiroshi.DOYU@nokia.com>
On Mon, May 3, 2010 at 9:07 AM, Hiroshi DOYU <Hiroshi.DOYU@nokia.com> wrote:
> From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> Subject: Re: [PATCH v2 4/4] omap: mailbox: convert block api to kfifo
> Date: Mon, 03 May 2010 08:30:36 +0300 (EEST)
>
>> Hi Ohad,
>>
>> From: ext Ohad Ben-Cohen <ohad@wizery.com>
>> Subject: [PATCH v2 4/4] omap: mailbox: convert block api to kfifo
>> Date: Sun, 2 May 2010 17:44:31 +0200
>>
>>> The underlying buffering implementation of mailbox
>>> is converted from block API to kfifo due to the simplicity
>>> and speed of kfifo.
>>>
>>> The default size of the kfifo buffer is set to 256 bytes.
>>> This value is configurable at compile time (via
>>> CONFIG_OMAP_MBOX_KFIFO_SIZE), and can be changed at
>>> runtime (via the omap_kfifo_size module parameter).
>>
>> mbox_kfifo_size?
>
> It may be also nice if there's some checking of 'mbox_kfifo_size % 4 == 0' along with 'CONFIG_OMAP_MBOX_KFIFO_SIZE % 4 == 0'?
Good point. I'll send a new patch together with this:
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index a500ac4..fb3d452 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -21,6 +21,7 @@
*
*/
+#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/device.h>
@@ -394,6 +395,10 @@ static int __init omap_mbox_init(void)
if (!mboxd)
return -ENOMEM;
+ /* kfifo size sanity check: alignment and minimal size */
+ mbox_kfifo_size = ALIGN(mbox_kfifo_size, sizeof(mbox_msg_t));
+ mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size,
sizeof(mbox_msg_t));
+
return 0;
}
module_init(omap_mbox_init);
>
>>
>>> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
>>> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
>>> ---
>>> If you want, you can also reach me at < ohadb at ti dot com >.
>>>
>>> arch/arm/plat-omap/Kconfig | 9 +++
>>> arch/arm/plat-omap/include/plat/mailbox.h | 4 +-
>>> arch/arm/plat-omap/mailbox.c | 107 +++++++++++++----------------
>>> 3 files changed, 58 insertions(+), 62 deletions(-)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-03 9:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 15:44 [PATCH v2 0/4] omap: mailbox: cleanup & simplify Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 1/4] omap: mailbox: convert rwlocks to spinlock Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 2/4] omap: mailbox cleanup: split MODULE_AUTHOR line Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 3/4] omap: mailbox: fix reverse likeliness Ohad Ben-Cohen
2010-05-03 18:02 ` Tony Lindgren
2010-05-04 11:47 ` Ohad Ben-Cohen
2010-05-05 15:21 ` Tony Lindgren
2010-05-05 15:24 ` Ohad Ben-Cohen
2010-05-06 5:19 ` Hiroshi DOYU
2010-05-02 15:44 ` [PATCH v2 4/4] omap: mailbox: convert block api to kfifo Ohad Ben-Cohen
2010-05-03 5:30 ` Hiroshi DOYU
2010-05-03 6:07 ` Hiroshi DOYU
2010-05-03 9:41 ` Ohad Ben-Cohen [this message]
2010-05-03 10:27 ` [PATCH " Ohad Ben-Cohen
2010-05-03 6:35 ` [PATCH v2 " Ohad Ben-Cohen
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=p2sda15981b1005030241va21fd23fx9fcc84c4502a1919@mail.gmail.com \
--to=ohad@wizery.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=h-kanigeri2@ti.com \
--cc=linux-omap@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).