From patchwork Sun Feb 22 09:32:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 8306 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1M9WbAJ024910 for ; Sun, 22 Feb 2009 09:32:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531AbZBVJch (ORCPT ); Sun, 22 Feb 2009 04:32:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752655AbZBVJch (ORCPT ); Sun, 22 Feb 2009 04:32:37 -0500 Received: from mail-bw0-f161.google.com ([209.85.218.161]:64397 "EHLO mail-bw0-f161.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbZBVJcf (ORCPT ); Sun, 22 Feb 2009 04:32:35 -0500 Received: by mail-bw0-f161.google.com with SMTP id 5so3877969bwz.13 for ; Sun, 22 Feb 2009 01:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=LrQ3DdxG64/NoXN0JexSbhJ1jqfaZ6jmFKzhQMWd9KY=; b=fbUG+vxHsmVKoi9HtLHXuN0zTZuwI4U6MskQYLG24y+o2LGQp+CcE5YfPNksquVaEw UWd977qRKT59zll7V7eilBMPk6UuzrflIspky1e2Si9CGmM7D1I25xelGE0njnNpp13z qAYBKPCZwkTu+cLoexD3yq3Y2Xs6/1QwtbJDo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=ox0mlmv1n3Xf5ahS9Jhlefv7SO8J6Ts71ahIy9rOtFXmjOLDJ4szeCL0TwsZrt250f mvAqgGp/4PTGDVpJYAkcpFgT3EFw4RdIxU00sAV1isdx2TPc+qXLbvy18Jgpe7dpZO65 BcVaF6VAlfPKh/nkbSknrAB8a+61/p3X/pliU= Received: by 10.180.218.15 with SMTP id q15mr1040198bkg.194.1235295154158; Sun, 22 Feb 2009 01:32:34 -0800 (PST) Received: from localhost (a91-153-251-222.elisa-laajakaista.fi [91.153.251.222]) by mx.google.com with ESMTPS id p9sm7628180fkb.21.2009.02.22.01.32.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Feb 2009 01:32:33 -0800 (PST) From: Felipe Contreras To: linux-omap@vger.kernel.org Cc: Hiroshi DOYU , h-kanigeri2@ti.com, ameya.palande@nokia.com, Felipe Contreras Subject: [PATCH v2 4/4] dsp-bridge: wait less and check the mailbox more Date: Sun, 22 Feb 2009 11:32:24 +0200 Message-Id: <1235295144-22097-4-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1235295144-22097-3-git-send-email-felipe.contreras@gmail.com> References: <94a0d4530902212246h4160ae83pf435b5c6faf88237@mail.gmail.com> <1235295144-22097-1-git-send-email-felipe.contreras@gmail.com> <1235295144-22097-2-git-send-email-felipe.contreras@gmail.com> <1235295144-22097-3-git-send-email-felipe.contreras@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Felipe Contreras 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 --- 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");