All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>,
	h-kanigeri2@ti.com, ameya.palande@nokia.com,
	Felipe Contreras <felipe.contreras@nokia.com>
Subject: [PATCH v2 4/4] dsp-bridge: wait less and check the mailbox more
Date: Sun, 22 Feb 2009 11:32:24 +0200	[thread overview]
Message-ID: <1235295144-22097-4-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1235295144-22097-3-git-send-email-felipe.contreras@gmail.com>

From: Felipe Contreras <felipe.contreras@nokia.com>

Profiling showed the __delay function is called a lot; checking the mbox
more often seems to decrease the usage by 2/3's according to OProfile.

The changes are based on 'arch/arm/plat-omap/mailbox.c'. Tested on OMAP3430.

Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
---
 drivers/dsp/bridge/wmd/tiomap_sm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/tiomap_sm.c b/drivers/dsp/bridge/wmd/tiomap_sm.c
index 4ad893b..03d9195 100644
--- a/drivers/dsp/bridge/wmd/tiomap_sm.c
+++ b/drivers/dsp/bridge/wmd/tiomap_sm.c
@@ -179,7 +179,7 @@ DSP_STATUS CHNLSM_InterruptDSP(struct WMD_DEV_CONTEXT *hDevContext)
 #endif
 	HW_STATUS hwStatus;
 	struct CFG_HOSTRES resources;
-	u16 cnt = 10;
+	u16 cnt = 1000;
 	u32 temp;
 	/* We are waiting indefinitely here. This needs to be fixed in the
 	 * second phase */
@@ -222,7 +222,7 @@ DSP_STATUS CHNLSM_InterruptDSP(struct WMD_DEV_CONTEXT *hDevContext)
 	while (--cnt) {
 		if (!fifo_full((void __iomem *) resources.dwMboxBase, 0))
 			break;
-		mdelay(1);
+		udelay(1);
 	}
 	if (!cnt) {
 		DBG_Trace(DBG_LEVEL7, "Timed out waiting for DSP mailbox \n");
-- 
1.6.1.3


  reply	other threads:[~2009-02-22  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 23:04 [PATCH] dspbridge: wait less and check the mailbox more Felipe Contreras
2009-02-22  5:21 ` Hiroshi DOYU
2009-02-22  6:46   ` Felipe Contreras
2009-02-22  9:32     ` [PATCH v2 1/4] dsp-bridge: remove unnecessary comments in util.h Felipe Contreras
2009-02-22  9:32       ` [PATCH v2 2/4] dsp-bridge: remove UTIL_Wait wrapper Felipe Contreras
2009-02-22  9:32         ` [PATCH v2 3/4] dsp-bridge: cleanup and remove HW_MBOX_IsFull Felipe Contreras
2009-02-22  9:32           ` Felipe Contreras [this message]
2009-02-23 22:06           ` Kanigeri, Hari
2009-02-23 22:22             ` Felipe Contreras
2009-02-23 22:22         ` [PATCH v2 2/4] dsp-bridge: remove UTIL_Wait wrapper Kanigeri, Hari
2009-02-22 11:35       ` [PATCH v2 1/4] dsp-bridge: remove unnecessary comments in util.h Hiroshi DOYU

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=1235295144-22097-4-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@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 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.