public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Ameya Palande <ameya.palande@Nokia.com>
To: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Doyu Hiroshi (Nokia-D/Helsinki)" <hiroshi.doyu@Nokia.com>,
	"Contreras Felipe (Nokia-D/Helsinki)"
	<felipe.contreras@Nokia.com>
Subject: Re: [RESEND] [PATCH] DSPBRIDGE: Adding protection Resource cleanup linked lists
Date: Wed, 17 Feb 2010 12:55:23 +0200	[thread overview]
Message-ID: <1266404123.2063.2.camel@sanganak> (raw)
In-Reply-To: <496565EC904933469F292DDA3F1663E602AA725DC6@dlee06.ent.ti.com>

Hi Fernando,

On Wed, 2010-02-10 at 09:32 +0100, ext Guzman Lugo, Fernando wrote:
> Please discard previous one.
> 
> Regards,
> Fernando.
> 
> From 6bcdc02f6265246e385194433775e75db7ad44cf Mon Sep 17 00:00:00 2001
> From: Fernando Guzman Lugo <x0095840@ti.com>
> Date: Wed, 10 Feb 2010 02:31:40 -0600
> Subject: [PATCH] DSPBRIDGE: Adding protection Resource cleanup linked lists
> 
> This patch protects the Resorce cleanup lists from
> concurrent access
> 
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> ---
>  arch/arm/plat-omap/include/dspbridge/drv.h |    3 +
>  drivers/dsp/bridge/pmgr/wcd.c              |   16 ++++++-
>  drivers/dsp/bridge/rmgr/drv.c              |   71 +++++++++++++++++++++++----
>  drivers/dsp/bridge/rmgr/drv_interface.c    |    8 ++-
>  4 files changed, 83 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h
> index b6a5fd2..b044291 100644
> --- a/arch/arm/plat-omap/include/dspbridge/drv.h
> +++ b/arch/arm/plat-omap/include/dspbridge/drv.h
> @@ -137,15 +137,18 @@ struct PROCESS_CONTEXT{
>  
>  	/* DSP Node resources */
>  	struct NODE_RES_OBJECT *pNodeList;
> +	struct mutex node_mutex;
>  
>  	/* DMM resources */
>  	struct DMM_RES_OBJECT *pDMMList;
> +	struct mutex dmm_mutex;
>  
>  	/* DSP Heap resources */
>  	struct DSPHEAP_RES_OBJECT *pDSPHEAPList;
>  
>  	/* Stream resources */
>  	struct STRM_RES_OBJECT *pSTRMList;
> +	struct mutex strm_mutex;
>  } ;

Is there a specific reason for using mutex instead of spin_lock?

AFAIU these locks are help for very short time, for inserting / removing
elements from linked list, or traversing a linked list.

Cheers,
Ameya.


  parent reply	other threads:[~2010-02-17 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10  8:32 [RESEND] [PATCH] DSPBRIDGE: Adding protection Resource cleanup linked lists Guzman Lugo, Fernando
2010-02-16 23:56 ` Omar Ramirez Luna
2010-02-17 10:55 ` Ameya Palande [this message]
2010-02-18  1:56   ` Guzman Lugo, Fernando

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=1266404123.2063.2.camel@sanganak \
    --to=ameya.palande@nokia.com \
    --cc=felipe.contreras@Nokia.com \
    --cc=hiroshi.doyu@Nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=x0095840@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