All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
@ 2010-02-13  1:42 Guzman Lugo, Fernando
  2010-02-15 13:48 ` Hiroshi DOYU
  0 siblings, 1 reply; 6+ messages in thread
From: Guzman Lugo, Fernando @ 2010-02-13  1:42 UTC (permalink / raw)
  To: linux-omap; +Cc: Hiroshi Doyu

>From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo <x0095840@ti.com>
Date: Fri, 29 Jan 2010 17:12:24 -0600
Subject: [PATCH] Mailbox: sleeping function called from invalid context fix

This patch fixes this bug:
BUG: sleeping function called from invalid context
Inside omap2_mbox_startup is called clk_get_sys that can sleep,
therefore omap2_mbox_startup can sleep but it is call in an atomic
context . So the spinlock is change for a semaphore.

Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
---
 arch/arm/plat-omap/mailbox.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 8136ee3..d8bfa45 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -29,7 +29,7 @@
 #include <plat/mailbox.h>
 
 static struct omap_mbox *mboxes;
-static DEFINE_RWLOCK(mboxes_lock);
+static DECLARE_RWSEM(mboxes_sem);
 
 static int mbox_configured;
 
@@ -248,16 +248,16 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
 	struct omap_mbox_queue *mq;
 
 	if (likely(mbox->ops->startup)) {
-		write_lock(&mboxes_lock);
+		down_write(&mboxes_sem);
 		if (!mbox_configured)
 			ret = mbox->ops->startup(mbox);
 
 		if (unlikely(ret)) {
-			write_unlock(&mboxes_lock);
+			up_write(&mboxes_sem);
 			return ret;
 		}
 		mbox_configured++;
-		write_unlock(&mboxes_lock);
+		up_write(&mboxes_sem);
 	}
 
 	ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
@@ -304,12 +304,12 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
 	mbox_queue_free(mbox->rxq);
 
 	if (unlikely(mbox->ops->shutdown)) {
-		write_lock(&mboxes_lock);
+		down_write(&mboxes_sem);
 		if (mbox_configured > 0)
 			mbox_configured--;
 		if (!mbox_configured)
 			mbox->ops->shutdown(mbox);
-		write_unlock(&mboxes_lock);
+		up_write(&mboxes_sem);
 	}
 }
 
@@ -330,14 +330,14 @@ struct omap_mbox *omap_mbox_get(const char *name)
 	struct omap_mbox *mbox;
 	int ret;
 
-	read_lock(&mboxes_lock);
+	down_read(&mboxes_sem);
 	mbox = *(find_mboxes(name));
 	if (mbox == NULL) {
-		read_unlock(&mboxes_lock);
+		up_read(&mboxes_sem);
 		return ERR_PTR(-ENOENT);
 	}
 
-	read_unlock(&mboxes_lock);
+	up_read(&mboxes_sem);
 
 	ret = omap_mbox_startup(mbox);
 	if (ret)
@@ -363,15 +363,15 @@ int omap_mbox_register(struct device *parent, struct omap_mbox *mbox)
 	if (mbox->next)
 		return -EBUSY;
 
-	write_lock(&mboxes_lock);
+	down_write(&mboxes_sem);
 	tmp = find_mboxes(mbox->name);
 	if (*tmp) {
 		ret = -EBUSY;
-		write_unlock(&mboxes_lock);
+		up_write(&mboxes_sem);
 		goto err_find;
 	}
 	*tmp = mbox;
-	write_unlock(&mboxes_lock);
+	up_write(&mboxes_sem);
 
 	return 0;
 
@@ -384,18 +384,18 @@ int omap_mbox_unregister(struct omap_mbox *mbox)
 {
 	struct omap_mbox **tmp;
 
-	write_lock(&mboxes_lock);
+	down_write(&mboxes_sem);
 	tmp = &mboxes;
 	while (*tmp) {
 		if (mbox == *tmp) {
 			*tmp = mbox->next;
 			mbox->next = NULL;
-			write_unlock(&mboxes_lock);
+			up_write(&mboxes_sem);
 			return 0;
 		}
 		tmp = &(*tmp)->next;
 	}
-	write_unlock(&mboxes_lock);
+	up_write(&mboxes_sem);
 
 	return -EINVAL;
 }
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
  2010-02-13  1:42 [PATCH 5/6] Mailbox: sleeping function called from invalid context fix Guzman Lugo, Fernando
@ 2010-02-15 13:48 ` Hiroshi DOYU
  2010-02-16  7:25   ` Guzman Lugo, Fernando
  0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi DOYU @ 2010-02-15 13:48 UTC (permalink / raw)
  To: x0095840; +Cc: linux-omap

Hi Fernando,

From: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
Subject: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
Date: Sat, 13 Feb 2010 02:42:16 +0100

> From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00 2001
> From: Fernando Guzman Lugo <x0095840@ti.com>
> Date: Fri, 29 Jan 2010 17:12:24 -0600
> Subject: [PATCH] Mailbox: sleeping function called from invalid context fix
> 
> This patch fixes this bug:
> BUG: sleeping function called from invalid context
> Inside omap2_mbox_startup is called clk_get_sys that can sleep,
> therefore omap2_mbox_startup can sleep but it is call in an atomic
> context . So the spinlock is change for a semaphore.

"mboxes_lock" is used to maintain the global list of mailbox
instances, which belong to a single mailbox H/W module, but they are
logical channels from S/W perspective. Both "->ops->startup()" and
"->ops->shutdown()" are being executed against the above single H/W
module, and a mailbox H/W module is totally __independent__ of the
registration of logical mailboxes, which are (un)registered with
"omap_mbox_(un)register()". IOW, a mbox instance can be registered at
anytime(before/after) H/W initialization. This H/W initialization is
taken care of by "mbox_configured" variable. So I might think that the
right solution is to introduce a new mutex lock __just for__ h/w
configuration as below:

	Modified arch/arm/plat-omap/mailbox.c
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 8e90633..19530de 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -32,6 +32,7 @@ static struct omap_mbox *mboxes;
 static DEFINE_RWLOCK(mboxes_lock);
 
 static int mbox_configured;
+static DEFINE_MUTEX(mbox_configured_lock);
 
 /* Mailbox FIFO handle functions */
 static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
@@ -247,16 +248,16 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
 	struct omap_mbox_queue *mq;
 
 	if (likely(mbox->ops->startup)) {
-		write_lock(&mboxes_lock);
+		mutex_lock(&mbox_configured_lock);
 		if (!mbox_configured)
 			ret = mbox->ops->startup(mbox);
 
 		if (unlikely(ret)) {
-			write_unlock(&mboxes_lock);
+			mutex_unlock(&mbox_configured_lock);
 			return ret;
 		}
 		mbox_configured++;
-		write_unlock(&mboxes_lock);
+		mutex_unlock(&mbox_configured_lock);
 	}
 
 	ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
@@ -302,12 +303,12 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
 	free_irq(mbox->irq, mbox);
 
 	if (unlikely(mbox->ops->shutdown)) {
-		write_lock(&mboxes_lock);
+		mutex_lock(&mbox_configured_lock);
 		if (mbox_configured > 0)
 			mbox_configured--;
 		if (!mbox_configured)
 			mbox->ops->shutdown(mbox);
-		write_unlock(&mboxes_lock);
+		mutex_unlock(&mbox_configured_lock);
 	}
 }

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
  2010-02-15 13:48 ` Hiroshi DOYU
@ 2010-02-16  7:25   ` Guzman Lugo, Fernando
  2010-02-18  1:05     ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Guzman Lugo, Fernando @ 2010-02-16  7:25 UTC (permalink / raw)
  To: Hiroshi DOYU; +Cc: linux-omap


Hi,

>-----Original Message-----
>From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
>Sent: Monday, February 15, 2010 7:49 AM
>To: Guzman Lugo, Fernando
>Cc: linux-omap@vger.kernel.org
>Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
>context fix
>
>Hi Fernando,
>
>From: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
>Subject: [PATCH 5/6] Mailbox: sleeping function called from invalid context
>fix
>Date: Sat, 13 Feb 2010 02:42:16 +0100
>
>> From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00 2001
>> From: Fernando Guzman Lugo <x0095840@ti.com>
>> Date: Fri, 29 Jan 2010 17:12:24 -0600
>> Subject: [PATCH] Mailbox: sleeping function called from invalid context
>fix
>>
>> This patch fixes this bug:
>> BUG: sleeping function called from invalid context
>> Inside omap2_mbox_startup is called clk_get_sys that can sleep,
>> therefore omap2_mbox_startup can sleep but it is call in an atomic
>> context . So the spinlock is change for a semaphore.
>
>"mboxes_lock" is used to maintain the global list of mailbox
>instances, which belong to a single mailbox H/W module, but they are
>logical channels from S/W perspective. Both "->ops->startup()" and
>"->ops->shutdown()" are being executed against the above single H/W
>module, and a mailbox H/W module is totally __independent__ of the
>registration of logical mailboxes, which are (un)registered with

Yes, they are independent of each other, and can be executed at the same time. I am agreed with your patch; that should be the right solution, so you can drop my patch.

Thanks and regards,
Fernando.

>"omap_mbox_(un)register()". IOW, a mbox instance can be registered at
>anytime(before/after) H/W initialization. This H/W initialization is
>taken care of by "mbox_configured" variable. So I might think that the
>right solution is to introduce a new mutex lock __just for__ h/w
>configuration as below:
>
>	Modified arch/arm/plat-omap/mailbox.c
>diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
>index 8e90633..19530de 100644
>--- a/arch/arm/plat-omap/mailbox.c
>+++ b/arch/arm/plat-omap/mailbox.c
>@@ -32,6 +32,7 @@ static struct omap_mbox *mboxes;
> static DEFINE_RWLOCK(mboxes_lock);
>
> static int mbox_configured;
>+static DEFINE_MUTEX(mbox_configured_lock);
>
> /* Mailbox FIFO handle functions */
> static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
>@@ -247,16 +248,16 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
> 	struct omap_mbox_queue *mq;
>
> 	if (likely(mbox->ops->startup)) {
>-		write_lock(&mboxes_lock);
>+		mutex_lock(&mbox_configured_lock);
> 		if (!mbox_configured)
> 			ret = mbox->ops->startup(mbox);
>
> 		if (unlikely(ret)) {
>-			write_unlock(&mboxes_lock);
>+			mutex_unlock(&mbox_configured_lock);
> 			return ret;
> 		}
> 		mbox_configured++;
>-		write_unlock(&mboxes_lock);
>+		mutex_unlock(&mbox_configured_lock);
> 	}
>
> 	ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
>@@ -302,12 +303,12 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
> 	free_irq(mbox->irq, mbox);
>
> 	if (unlikely(mbox->ops->shutdown)) {
>-		write_lock(&mboxes_lock);
>+		mutex_lock(&mbox_configured_lock);
> 		if (mbox_configured > 0)
> 			mbox_configured--;
> 		if (!mbox_configured)
> 			mbox->ops->shutdown(mbox);
>-		write_unlock(&mboxes_lock);
>+		mutex_unlock(&mbox_configured_lock);
> 	}
> }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
  2010-02-16  7:25   ` Guzman Lugo, Fernando
@ 2010-02-18  1:05     ` Tony Lindgren
  2010-02-18  5:11       ` Hiroshi DOYU
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-02-18  1:05 UTC (permalink / raw)
  To: Guzman Lugo, Fernando; +Cc: Hiroshi DOYU, linux-omap

* Guzman Lugo, Fernando <x0095840@ti.com> [100215 23:22]:
> 
> Hi,
> 
> >-----Original Message-----
> >From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
> >Sent: Monday, February 15, 2010 7:49 AM
> >To: Guzman Lugo, Fernando
> >Cc: linux-omap@vger.kernel.org
> >Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
> >context fix
> >
> >Hi Fernando,
> >
> >From: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
> >Subject: [PATCH 5/6] Mailbox: sleeping function called from invalid context
> >fix
> >Date: Sat, 13 Feb 2010 02:42:16 +0100
> >
> >> From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00 2001
> >> From: Fernando Guzman Lugo <x0095840@ti.com>
> >> Date: Fri, 29 Jan 2010 17:12:24 -0600
> >> Subject: [PATCH] Mailbox: sleeping function called from invalid context
> >fix
> >>
> >> This patch fixes this bug:
> >> BUG: sleeping function called from invalid context
> >> Inside omap2_mbox_startup is called clk_get_sys that can sleep,
> >> therefore omap2_mbox_startup can sleep but it is call in an atomic
> >> context . So the spinlock is change for a semaphore.
> >
> >"mboxes_lock" is used to maintain the global list of mailbox
> >instances, which belong to a single mailbox H/W module, but they are
> >logical channels from S/W perspective. Both "->ops->startup()" and
> >"->ops->shutdown()" are being executed against the above single H/W
> >module, and a mailbox H/W module is totally __independent__ of the
> >registration of logical mailboxes, which are (un)registered with
> 
> Yes, they are independent of each other, and can be executed at the same time. I am agreed with your patch; that should be the right solution, so you can drop my patch.

Hiroshi & Fernando, if you want me to merge this series, please post
it one more time with right patches and ack's from Hiroshi. Please
Cc also linux-arm-kernel so it gets reviewed there. The merge window
is about to open, so we're running out of time..

Regards,

Tony


 
> Thanks and regards,
> Fernando.
> 
> >"omap_mbox_(un)register()". IOW, a mbox instance can be registered at
> >anytime(before/after) H/W initialization. This H/W initialization is
> >taken care of by "mbox_configured" variable. So I might think that the
> >right solution is to introduce a new mutex lock __just for__ h/w
> >configuration as below:
> >
> >	Modified arch/arm/plat-omap/mailbox.c
> >diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> >index 8e90633..19530de 100644
> >--- a/arch/arm/plat-omap/mailbox.c
> >+++ b/arch/arm/plat-omap/mailbox.c
> >@@ -32,6 +32,7 @@ static struct omap_mbox *mboxes;
> > static DEFINE_RWLOCK(mboxes_lock);
> >
> > static int mbox_configured;
> >+static DEFINE_MUTEX(mbox_configured_lock);
> >
> > /* Mailbox FIFO handle functions */
> > static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
> >@@ -247,16 +248,16 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
> > 	struct omap_mbox_queue *mq;
> >
> > 	if (likely(mbox->ops->startup)) {
> >-		write_lock(&mboxes_lock);
> >+		mutex_lock(&mbox_configured_lock);
> > 		if (!mbox_configured)
> > 			ret = mbox->ops->startup(mbox);
> >
> > 		if (unlikely(ret)) {
> >-			write_unlock(&mboxes_lock);
> >+			mutex_unlock(&mbox_configured_lock);
> > 			return ret;
> > 		}
> > 		mbox_configured++;
> >-		write_unlock(&mboxes_lock);
> >+		mutex_unlock(&mbox_configured_lock);
> > 	}
> >
> > 	ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
> >@@ -302,12 +303,12 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
> > 	free_irq(mbox->irq, mbox);
> >
> > 	if (unlikely(mbox->ops->shutdown)) {
> >-		write_lock(&mboxes_lock);
> >+		mutex_lock(&mbox_configured_lock);
> > 		if (mbox_configured > 0)
> > 			mbox_configured--;
> > 		if (!mbox_configured)
> > 			mbox->ops->shutdown(mbox);
> >-		write_unlock(&mboxes_lock);
> >+		mutex_unlock(&mbox_configured_lock);
> > 	}
> > }
> --
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
  2010-02-18  1:05     ` Tony Lindgren
@ 2010-02-18  5:11       ` Hiroshi DOYU
  2010-02-18  6:16         ` Guzman Lugo, Fernando
  0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi DOYU @ 2010-02-18  5:11 UTC (permalink / raw)
  To: tony; +Cc: x0095840, linux-omap

From: ext Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
Date: Thu, 18 Feb 2010 02:05:10 +0100

> * Guzman Lugo, Fernando <x0095840@ti.com> [100215 23:22]:
>> 
>> Hi,
>> 
>> >-----Original Message-----
>> >From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
>> >Sent: Monday, February 15, 2010 7:49 AM
>> >To: Guzman Lugo, Fernando
>> >Cc: linux-omap@vger.kernel.org
>> >Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
>> >context fix
>> >
>> >Hi Fernando,
>> >
>> >From: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
>> >Subject: [PATCH 5/6] Mailbox: sleeping function called from invalid context
>> >fix
>> >Date: Sat, 13 Feb 2010 02:42:16 +0100
>> >
>> >> From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00 2001
>> >> From: Fernando Guzman Lugo <x0095840@ti.com>
>> >> Date: Fri, 29 Jan 2010 17:12:24 -0600
>> >> Subject: [PATCH] Mailbox: sleeping function called from invalid context
>> >fix
>> >>
>> >> This patch fixes this bug:
>> >> BUG: sleeping function called from invalid context
>> >> Inside omap2_mbox_startup is called clk_get_sys that can sleep,
>> >> therefore omap2_mbox_startup can sleep but it is call in an atomic
>> >> context . So the spinlock is change for a semaphore.
>> >
>> >"mboxes_lock" is used to maintain the global list of mailbox
>> >instances, which belong to a single mailbox H/W module, but they are
>> >logical channels from S/W perspective. Both "->ops->startup()" and
>> >"->ops->shutdown()" are being executed against the above single H/W
>> >module, and a mailbox H/W module is totally __independent__ of the
>> >registration of logical mailboxes, which are (un)registered with
>> 
>> Yes, they are independent of each other, and can be executed at the same time. I am agreed with your patch; that should be the right solution, so you can drop my patch.
> 
> Hiroshi & Fernando, if you want me to merge this series, please post
> it one more time with right patches and ack's from Hiroshi. Please
> Cc also linux-arm-kernel so it gets reviewed there. The merge window
> is about to open, so we're running out of time..

Ok, I'll take care of them.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 5/6] Mailbox: sleeping function called from invalid context fix
  2010-02-18  5:11       ` Hiroshi DOYU
@ 2010-02-18  6:16         ` Guzman Lugo, Fernando
  0 siblings, 0 replies; 6+ messages in thread
From: Guzman Lugo, Fernando @ 2010-02-18  6:16 UTC (permalink / raw)
  To: Hiroshi DOYU, tony; +Cc: linux-omap


Hi,

>-----Original Message-----
>From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
>Sent: Wednesday, February 17, 2010 11:11 PM
>To: tony@atomide.com
>Cc: Guzman Lugo, Fernando; linux-omap@vger.kernel.org
>Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
>context fix
>
>From: ext Tony Lindgren <tony@atomide.com>
>Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
>context fix
>Date: Thu, 18 Feb 2010 02:05:10 +0100
>
>> * Guzman Lugo, Fernando <x0095840@ti.com> [100215 23:22]:
>>>
>>> Hi,
>>>
>>> >-----Original Message-----
>>> >From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
>>> >Sent: Monday, February 15, 2010 7:49 AM
>>> >To: Guzman Lugo, Fernando
>>> >Cc: linux-omap@vger.kernel.org
>>> >Subject: Re: [PATCH 5/6] Mailbox: sleeping function called from invalid
>>> >context fix
>>> >
>>> >Hi Fernando,
>>> >
>>> >From: "ext Guzman Lugo, Fernando" <x0095840@ti.com>
>>> >Subject: [PATCH 5/6] Mailbox: sleeping function called from invalid
>context
>>> >fix
>>> >Date: Sat, 13 Feb 2010 02:42:16 +0100
>>> >
>>> >> From e06b2716824f225747c4dc83ed2623d0160ae132 Mon Sep 17 00:00:00
>2001
>>> >> From: Fernando Guzman Lugo <x0095840@ti.com>
>>> >> Date: Fri, 29 Jan 2010 17:12:24 -0600
>>> >> Subject: [PATCH] Mailbox: sleeping function called from invalid
>context
>>> >fix
>>> >>
>>> >> This patch fixes this bug:
>>> >> BUG: sleeping function called from invalid context
>>> >> Inside omap2_mbox_startup is called clk_get_sys that can sleep,
>>> >> therefore omap2_mbox_startup can sleep but it is call in an atomic
>>> >> context . So the spinlock is change for a semaphore.
>>> >
>>> >"mboxes_lock" is used to maintain the global list of mailbox
>>> >instances, which belong to a single mailbox H/W module, but they are
>>> >logical channels from S/W perspective. Both "->ops->startup()" and
>>> >"->ops->shutdown()" are being executed against the above single H/W
>>> >module, and a mailbox H/W module is totally __independent__ of the
>>> >registration of logical mailboxes, which are (un)registered with
>>>
>>> Yes, they are independent of each other, and can be executed at the same
>time. I am agreed with your patch; that should be the right solution, so
>you can drop my patch.
>>
>> Hiroshi & Fernando, if you want me to merge this series, please post
>> it one more time with right patches and ack's from Hiroshi. Please
>> Cc also linux-arm-kernel so it gets reviewed there. The merge window
>> is about to open, so we're running out of time..
>
>Ok, I'll take care of them.

Let me send the set of patches again.

Regards,
Fernando.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-18  6:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13  1:42 [PATCH 5/6] Mailbox: sleeping function called from invalid context fix Guzman Lugo, Fernando
2010-02-15 13:48 ` Hiroshi DOYU
2010-02-16  7:25   ` Guzman Lugo, Fernando
2010-02-18  1:05     ` Tony Lindgren
2010-02-18  5:11       ` Hiroshi DOYU
2010-02-18  6:16         ` Guzman Lugo, Fernando

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.