From: Ameya Palande <ameya.palande@nokia.com>
To: ext Deepak Chitriki <deepak.chitriki@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
Omar Ramirez Luna <omar.ramirez@ti.com>,
Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH] DSPBRIDGE: Fix to avoid possible recursive locking
Date: Wed, 10 Feb 2010 15:27:15 +0200 [thread overview]
Message-ID: <1265808435.30481.48.camel@sanganak> (raw)
In-Reply-To: <1265763677-7012-1-git-send-email-deepak.chitriki@ti.com>
Hi Deepak,
On Wed, 2010-02-10 at 02:01 +0100, ext Deepak Chitriki wrote:
> This patch fixes possible recursive locking detection.The implementation
> in which the spinlock is acquired and released is rectified in WMD_MSG_Get()
> to avoid locking contention.
> Added SYNC_EnterCS() and SYNC_LeaveCS()in WMD_MSG_Get()function.
>
> Cc: Ameya Palande <ameya.palande@nokia.com>
> Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
>
> Signed-off-by: Deepak Chitriki <deepak.chitriki@ti.com>
> ---
> drivers/dsp/bridge/wmd/msg_sm.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c
> index 50201e5..8faf5ad 100644
> --- a/drivers/dsp/bridge/wmd/msg_sm.c
> +++ b/drivers/dsp/bridge/wmd/msg_sm.c
> @@ -300,8 +300,10 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
> if (LST_IsEmpty(hMsgQueue->msgUsedList))
> SYNC_ResetEvent(hMsgQueue->hSyncEvent);
> else {
> + (void)SYNC_LeaveCS(hMsgMgr->hSyncCS);
> NTFY_Notify(hMsgQueue->hNtfy,
> DSP_NODEMESSAGEREADY);
> + (void)SYNC_EnterCS(hMsgMgr->hSyncCS);
> SYNC_SetEvent(hMsgQueue->hSyncEvent);
> }
>
> @@ -352,8 +354,10 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue,
> hMsgQueue->refCount--;
> /* Reset the event if there are still queued messages */
> if (!LST_IsEmpty(hMsgQueue->msgUsedList)) {
> + (void)SYNC_LeaveCS(hMsgMgr->hSyncCS);
> NTFY_Notify(hMsgQueue->hNtfy,
> DSP_NODEMESSAGEREADY);
> + (void)SYNC_EnterCS(hMsgMgr->hSyncCS);
> SYNC_SetEvent(hMsgQueue->hSyncEvent);
> }
> /* Exit critical section */
Can you explain the need of calling NTFY_Notify() in WMD_MSG_Get()?
I can see that the InputMsg calls NTFY_Notify() already!
Can we get rid of NTFY_Notify() from WMD_MSG_Get() all together?
Cheers,
Ameya.
next prev parent reply other threads:[~2010-02-10 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 1:01 [PATCH] DSPBRIDGE: Fix to avoid possible recursive locking Deepak Chitriki
2010-02-10 13:27 ` Ameya Palande [this message]
2010-02-10 23:14 ` Chitriki Rudramuni, Deepak
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=1265808435.30481.48.camel@sanganak \
--to=ameya.palande@nokia.com \
--cc=deepak.chitriki@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=omar.ramirez@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