* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-06-14 16:51 ` Fernando Guzman Lugo
0 siblings, 0 replies; 13+ messages in thread
From: Fernando Guzman Lugo @ 2010-06-14 16:51 UTC (permalink / raw)
To: linux-arm-kernel, linux-omap; +Cc: hiroshi.doyu, ohad, Fernando Guzman Lugo
As pointed by Ben Ohand, the variable rq_full flag is a global
variable, so if there are multiple mailbox users there will be
conflics. Now there is a full flag per mailbox queue.
Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
---
arch/arm/plat-omap/include/plat/mailbox.h | 1 +
arch/arm/plat-omap/mailbox.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
index 729166b..a6144b8 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -47,6 +47,7 @@ struct omap_mbox_queue {
struct tasklet_struct tasklet;
int (*callback)(void *);
struct omap_mbox *mbox;
+ bool full;
};
struct omap_mbox {
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 8d86b0b..a1e274e 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -30,7 +30,6 @@
static struct omap_mbox *mboxes;
static DEFINE_RWLOCK(mboxes_lock);
-static bool rq_full;
static int mbox_configured;
static DEFINE_MUTEX(mbox_configured_lock);
@@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
while (1) {
spin_lock_irqsave(q->queue_lock, flags);
rq = blk_fetch_request(q);
- if (rq_full) {
+ if (mbox->rxq->full) {
omap_mbox_enable_irq(mbox, IRQ_RX);
- rq_full = false;
+ mbox->rxq->full = false;
}
spin_unlock_irqrestore(q->queue_lock, flags);
if (!rq)
@@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
if (unlikely(!rq)) {
omap_mbox_disable_irq(mbox, IRQ_RX);
- rq_full = true;
+ mbox->rxq->full = true;
goto nomem;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-06-14 16:51 ` Fernando Guzman Lugo
0 siblings, 0 replies; 13+ messages in thread
From: Fernando Guzman Lugo @ 2010-06-14 16:51 UTC (permalink / raw)
To: linux-arm-kernel
As pointed by Ben Ohand, the variable rq_full flag is a global
variable, so if there are multiple mailbox users there will be
conflics. Now there is a full flag per mailbox queue.
Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
---
arch/arm/plat-omap/include/plat/mailbox.h | 1 +
arch/arm/plat-omap/mailbox.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
index 729166b..a6144b8 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -47,6 +47,7 @@ struct omap_mbox_queue {
struct tasklet_struct tasklet;
int (*callback)(void *);
struct omap_mbox *mbox;
+ bool full;
};
struct omap_mbox {
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 8d86b0b..a1e274e 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -30,7 +30,6 @@
static struct omap_mbox *mboxes;
static DEFINE_RWLOCK(mboxes_lock);
-static bool rq_full;
static int mbox_configured;
static DEFINE_MUTEX(mbox_configured_lock);
@@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
while (1) {
spin_lock_irqsave(q->queue_lock, flags);
rq = blk_fetch_request(q);
- if (rq_full) {
+ if (mbox->rxq->full) {
omap_mbox_enable_irq(mbox, IRQ_RX);
- rq_full = false;
+ mbox->rxq->full = false;
}
spin_unlock_irqrestore(q->queue_lock, flags);
if (!rq)
@@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
if (unlikely(!rq)) {
omap_mbox_disable_irq(mbox, IRQ_RX);
- rq_full = true;
+ mbox->rxq->full = true;
goto nomem;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] mailbox: change full flag per mailbox queue instead of global
2010-06-14 16:51 ` Fernando Guzman Lugo
@ 2010-06-16 21:17 ` Ohad Ben-Cohen
-1 siblings, 0 replies; 13+ messages in thread
From: Ohad Ben-Cohen @ 2010-06-16 21:17 UTC (permalink / raw)
To: Fernando Guzman Lugo; +Cc: linux-arm-kernel, linux-omap, hiroshi.doyu
On Mon, Jun 14, 2010 at 11:51 AM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
> As pointed by Ben Ohand, the variable rq_full flag is a global
> variable, so if there are multiple mailbox users there will be
> conflics. Now there is a full flag per mailbox queue.
>
> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> ---
> arch/arm/plat-omap/include/plat/mailbox.h | 1 +
> arch/arm/plat-omap/mailbox.c | 7 +++----
> 2 files changed, 4 insertions(+), 4 deletions(-)
Thanks, Fernando, it looks good !
Since the original patch wasn't merged yet, it might make more sense
to squash it with this fix into a single patch, instead of introducing
this fix as a new patch. what do you think ?
>
> diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
> index 729166b..a6144b8 100644
> --- a/arch/arm/plat-omap/include/plat/mailbox.h
> +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> struct tasklet_struct tasklet;
> int (*callback)(void *);
> struct omap_mbox *mbox;
> + bool full;
> };
>
> struct omap_mbox {
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 8d86b0b..a1e274e 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -30,7 +30,6 @@
>
> static struct omap_mbox *mboxes;
> static DEFINE_RWLOCK(mboxes_lock);
> -static bool rq_full;
>
> static int mbox_configured;
> static DEFINE_MUTEX(mbox_configured_lock);
> @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> while (1) {
> spin_lock_irqsave(q->queue_lock, flags);
> rq = blk_fetch_request(q);
> - if (rq_full) {
> + if (mbox->rxq->full) {
> omap_mbox_enable_irq(mbox, IRQ_RX);
> - rq_full = false;
> + mbox->rxq->full = false;
> }
> spin_unlock_irqrestore(q->queue_lock, flags);
> if (!rq)
> @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
> rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> if (unlikely(!rq)) {
> omap_mbox_disable_irq(mbox, IRQ_RX);
> - rq_full = true;
> + mbox->rxq->full = true;
> goto nomem;
> }
>
> --
> 1.6.3.3
>
>
--
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] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-06-16 21:17 ` Ohad Ben-Cohen
0 siblings, 0 replies; 13+ messages in thread
From: Ohad Ben-Cohen @ 2010-06-16 21:17 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 14, 2010 at 11:51 AM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
> As pointed by Ben Ohand, the variable rq_full flag is a global
> variable, so if there are multiple mailbox users there will be
> conflics. Now there is a full flag per mailbox queue.
>
> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> ---
> ?arch/arm/plat-omap/include/plat/mailbox.h | ? ?1 +
> ?arch/arm/plat-omap/mailbox.c ? ? ? ? ? ? ?| ? ?7 +++----
> ?2 files changed, 4 insertions(+), 4 deletions(-)
Thanks, Fernando, it looks good !
Since the original patch wasn't merged yet, it might make more sense
to squash it with this fix into a single patch, instead of introducing
this fix as a new patch. what do you think ?
>
> diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
> index 729166b..a6144b8 100644
> --- a/arch/arm/plat-omap/include/plat/mailbox.h
> +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> ? ? ? ?struct tasklet_struct ? tasklet;
> ? ? ? ?int ? ? (*callback)(void *);
> ? ? ? ?struct omap_mbox ? ? ? ?*mbox;
> + ? ? ? bool ? ?full;
> ?};
>
> ?struct omap_mbox {
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 8d86b0b..a1e274e 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -30,7 +30,6 @@
>
> ?static struct omap_mbox *mboxes;
> ?static DEFINE_RWLOCK(mboxes_lock);
> -static bool rq_full;
>
> ?static int mbox_configured;
> ?static DEFINE_MUTEX(mbox_configured_lock);
> @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> ? ? ? ?while (1) {
> ? ? ? ? ? ? ? ?spin_lock_irqsave(q->queue_lock, flags);
> ? ? ? ? ? ? ? ?rq = blk_fetch_request(q);
> - ? ? ? ? ? ? ? if (rq_full) {
> + ? ? ? ? ? ? ? if (mbox->rxq->full) {
> ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_enable_irq(mbox, IRQ_RX);
> - ? ? ? ? ? ? ? ? ? ? ? rq_full = false;
> + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = false;
> ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ?spin_unlock_irqrestore(q->queue_lock, flags);
> ? ? ? ? ? ? ? ?if (!rq)
> @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
> ? ? ? ? ? ? ? ?rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> ? ? ? ? ? ? ? ?if (unlikely(!rq)) {
> ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_disable_irq(mbox, IRQ_RX);
> - ? ? ? ? ? ? ? ? ? ? ? rq_full = true;
> + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = true;
> ? ? ? ? ? ? ? ? ? ? ? ?goto nomem;
> ? ? ? ? ? ? ? ?}
>
> --
> 1.6.3.3
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] mailbox: change full flag per mailbox queue instead of global
2010-06-16 21:17 ` Ohad Ben-Cohen
@ 2010-06-17 16:42 ` Guzman Lugo, Fernando
-1 siblings, 0 replies; 13+ messages in thread
From: Guzman Lugo, Fernando @ 2010-06-17 16:42 UTC (permalink / raw)
To: Ohad Ben-Cohen; +Cc: linux-arm-kernel, linux-omap, hiroshi.doyu
Hi Ohad,
> -----Original Message-----
> From: Ohad Ben-Cohen [mailto:ohad@wizery.com]
> Sent: Wednesday, June 16, 2010 4:18 PM
> To: Guzman Lugo, Fernando
> Cc: linux-arm-kernel@lists.infradead.org; linux-omap@vger.kernel.org;
> hiroshi.doyu@nokia.com
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
>
> On Mon, Jun 14, 2010 at 11:51 AM, Fernando Guzman Lugo <x0095840@ti.com>
> wrote:
> > As pointed by Ben Ohand, the variable rq_full flag is a global
> > variable, so if there are multiple mailbox users there will be
> > conflics. Now there is a full flag per mailbox queue.
> >
> > Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> > Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> > ---
> > arch/arm/plat-omap/include/plat/mailbox.h | 1 +
> > arch/arm/plat-omap/mailbox.c | 7 +++----
> > 2 files changed, 4 insertions(+), 4 deletions(-)
>
>
> Thanks, Fernando, it looks good !
>
> Since the original patch wasn't merged yet, it might make more sense
> to squash it with this fix into a single patch, instead of introducing
> this fix as a new patch. what do you think ?
Sound good. I will send that patch again then. Please discard this pathc.
Regards,
Fernando.
>
> >
> > diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-
> omap/include/plat/mailbox.h
> > index 729166b..a6144b8 100644
> > --- a/arch/arm/plat-omap/include/plat/mailbox.h
> > +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> > @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> > struct tasklet_struct tasklet;
> > int (*callback)(void *);
> > struct omap_mbox *mbox;
> > + bool full;
> > };
> >
> > struct omap_mbox {
> > diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> > index 8d86b0b..a1e274e 100644
> > --- a/arch/arm/plat-omap/mailbox.c
> > +++ b/arch/arm/plat-omap/mailbox.c
> > @@ -30,7 +30,6 @@
> >
> > static struct omap_mbox *mboxes;
> > static DEFINE_RWLOCK(mboxes_lock);
> > -static bool rq_full;
> >
> > static int mbox_configured;
> > static DEFINE_MUTEX(mbox_configured_lock);
> > @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> > while (1) {
> > spin_lock_irqsave(q->queue_lock, flags);
> > rq = blk_fetch_request(q);
> > - if (rq_full) {
> > + if (mbox->rxq->full) {
> > omap_mbox_enable_irq(mbox, IRQ_RX);
> > - rq_full = false;
> > + mbox->rxq->full = false;
> > }
> > spin_unlock_irqrestore(q->queue_lock, flags);
> > if (!rq)
> > @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox
> *mbox)
> > rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> > if (unlikely(!rq)) {
> > omap_mbox_disable_irq(mbox, IRQ_RX);
> > - rq_full = true;
> > + mbox->rxq->full = true;
> > goto nomem;
> > }
> >
> > --
> > 1.6.3.3
> >
> >
--
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] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-06-17 16:42 ` Guzman Lugo, Fernando
0 siblings, 0 replies; 13+ messages in thread
From: Guzman Lugo, Fernando @ 2010-06-17 16:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi Ohad,
> -----Original Message-----
> From: Ohad Ben-Cohen [mailto:ohad at wizery.com]
> Sent: Wednesday, June 16, 2010 4:18 PM
> To: Guzman Lugo, Fernando
> Cc: linux-arm-kernel at lists.infradead.org; linux-omap at vger.kernel.org;
> hiroshi.doyu at nokia.com
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
>
> On Mon, Jun 14, 2010 at 11:51 AM, Fernando Guzman Lugo <x0095840@ti.com>
> wrote:
> > As pointed by Ben Ohand, the variable rq_full flag is a global
> > variable, so if there are multiple mailbox users there will be
> > conflics. Now there is a full flag per mailbox queue.
> >
> > Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> > Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> > ---
> > ?arch/arm/plat-omap/include/plat/mailbox.h | ? ?1 +
> > ?arch/arm/plat-omap/mailbox.c ? ? ? ? ? ? ?| ? ?7 +++----
> > ?2 files changed, 4 insertions(+), 4 deletions(-)
>
>
> Thanks, Fernando, it looks good !
>
> Since the original patch wasn't merged yet, it might make more sense
> to squash it with this fix into a single patch, instead of introducing
> this fix as a new patch. what do you think ?
Sound good. I will send that patch again then. Please discard this pathc.
Regards,
Fernando.
>
> >
> > diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-
> omap/include/plat/mailbox.h
> > index 729166b..a6144b8 100644
> > --- a/arch/arm/plat-omap/include/plat/mailbox.h
> > +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> > @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> > ? ? ? ?struct tasklet_struct ? tasklet;
> > ? ? ? ?int ? ? (*callback)(void *);
> > ? ? ? ?struct omap_mbox ? ? ? ?*mbox;
> > + ? ? ? bool ? ?full;
> > ?};
> >
> > ?struct omap_mbox {
> > diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> > index 8d86b0b..a1e274e 100644
> > --- a/arch/arm/plat-omap/mailbox.c
> > +++ b/arch/arm/plat-omap/mailbox.c
> > @@ -30,7 +30,6 @@
> >
> > ?static struct omap_mbox *mboxes;
> > ?static DEFINE_RWLOCK(mboxes_lock);
> > -static bool rq_full;
> >
> > ?static int mbox_configured;
> > ?static DEFINE_MUTEX(mbox_configured_lock);
> > @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> > ? ? ? ?while (1) {
> > ? ? ? ? ? ? ? ?spin_lock_irqsave(q->queue_lock, flags);
> > ? ? ? ? ? ? ? ?rq = blk_fetch_request(q);
> > - ? ? ? ? ? ? ? if (rq_full) {
> > + ? ? ? ? ? ? ? if (mbox->rxq->full) {
> > ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_enable_irq(mbox, IRQ_RX);
> > - ? ? ? ? ? ? ? ? ? ? ? rq_full = false;
> > + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = false;
> > ? ? ? ? ? ? ? ?}
> > ? ? ? ? ? ? ? ?spin_unlock_irqrestore(q->queue_lock, flags);
> > ? ? ? ? ? ? ? ?if (!rq)
> > @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox
> *mbox)
> > ? ? ? ? ? ? ? ?rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> > ? ? ? ? ? ? ? ?if (unlikely(!rq)) {
> > ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_disable_irq(mbox, IRQ_RX);
> > - ? ? ? ? ? ? ? ? ? ? ? rq_full = true;
> > + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = true;
> > ? ? ? ? ? ? ? ? ? ? ? ?goto nomem;
> > ? ? ? ? ? ? ? ?}
> >
> > --
> > 1.6.3.3
> >
> >
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] mailbox: change full flag per mailbox queue instead of global
2010-06-14 16:51 ` Fernando Guzman Lugo
@ 2010-08-10 14:36 ` Ohad Ben-Cohen
-1 siblings, 0 replies; 13+ messages in thread
From: Ohad Ben-Cohen @ 2010-08-10 14:36 UTC (permalink / raw)
To: Hiroshi DOYU; +Cc: linux-arm-kernel, linux-omap, Fernando Guzman Lugo
Hi Hiroshi,
On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
> As pointed by Ben Ohand, the variable rq_full flag is a global
> variable, so if there are multiple mailbox users there will be
> conflics. Now there is a full flag per mailbox queue.
>
> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
It looks like this fix didn't get thru - can you please review and ack/nack ?
Thanks,
Ohad.
> ---
> arch/arm/plat-omap/include/plat/mailbox.h | 1 +
> arch/arm/plat-omap/mailbox.c | 7 +++----
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
> index 729166b..a6144b8 100644
> --- a/arch/arm/plat-omap/include/plat/mailbox.h
> +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> struct tasklet_struct tasklet;
> int (*callback)(void *);
> struct omap_mbox *mbox;
> + bool full;
> };
>
> struct omap_mbox {
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 8d86b0b..a1e274e 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -30,7 +30,6 @@
>
> static struct omap_mbox *mboxes;
> static DEFINE_RWLOCK(mboxes_lock);
> -static bool rq_full;
>
> static int mbox_configured;
> static DEFINE_MUTEX(mbox_configured_lock);
> @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> while (1) {
> spin_lock_irqsave(q->queue_lock, flags);
> rq = blk_fetch_request(q);
> - if (rq_full) {
> + if (mbox->rxq->full) {
> omap_mbox_enable_irq(mbox, IRQ_RX);
> - rq_full = false;
> + mbox->rxq->full = false;
> }
> spin_unlock_irqrestore(q->queue_lock, flags);
> if (!rq)
> @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
> rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> if (unlikely(!rq)) {
> omap_mbox_disable_irq(mbox, IRQ_RX);
> - rq_full = true;
> + mbox->rxq->full = true;
> goto nomem;
> }
>
> --
> 1.6.3.3
>
>
--
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] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-08-10 14:36 ` Ohad Ben-Cohen
0 siblings, 0 replies; 13+ messages in thread
From: Ohad Ben-Cohen @ 2010-08-10 14:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi Hiroshi,
On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
> As pointed by Ben Ohand, the variable rq_full flag is a global
> variable, so if there are multiple mailbox users there will be
> conflics. Now there is a full flag per mailbox queue.
>
> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
It looks like this fix didn't get thru - can you please review and ack/nack ?
Thanks,
Ohad.
> ---
> ?arch/arm/plat-omap/include/plat/mailbox.h | ? ?1 +
> ?arch/arm/plat-omap/mailbox.c ? ? ? ? ? ? ?| ? ?7 +++----
> ?2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
> index 729166b..a6144b8 100644
> --- a/arch/arm/plat-omap/include/plat/mailbox.h
> +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> @@ -47,6 +47,7 @@ struct omap_mbox_queue {
> ? ? ? ?struct tasklet_struct ? tasklet;
> ? ? ? ?int ? ? (*callback)(void *);
> ? ? ? ?struct omap_mbox ? ? ? ?*mbox;
> + ? ? ? bool ? ?full;
> ?};
>
> ?struct omap_mbox {
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 8d86b0b..a1e274e 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -30,7 +30,6 @@
>
> ?static struct omap_mbox *mboxes;
> ?static DEFINE_RWLOCK(mboxes_lock);
> -static bool rq_full;
>
> ?static int mbox_configured;
> ?static DEFINE_MUTEX(mbox_configured_lock);
> @@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
> ? ? ? ?while (1) {
> ? ? ? ? ? ? ? ?spin_lock_irqsave(q->queue_lock, flags);
> ? ? ? ? ? ? ? ?rq = blk_fetch_request(q);
> - ? ? ? ? ? ? ? if (rq_full) {
> + ? ? ? ? ? ? ? if (mbox->rxq->full) {
> ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_enable_irq(mbox, IRQ_RX);
> - ? ? ? ? ? ? ? ? ? ? ? rq_full = false;
> + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = false;
> ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ?spin_unlock_irqrestore(q->queue_lock, flags);
> ? ? ? ? ? ? ? ?if (!rq)
> @@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
> ? ? ? ? ? ? ? ?rq = blk_get_request(q, WRITE, GFP_ATOMIC);
> ? ? ? ? ? ? ? ?if (unlikely(!rq)) {
> ? ? ? ? ? ? ? ? ? ? ? ?omap_mbox_disable_irq(mbox, IRQ_RX);
> - ? ? ? ? ? ? ? ? ? ? ? rq_full = true;
> + ? ? ? ? ? ? ? ? ? ? ? mbox->rxq->full = true;
> ? ? ? ? ? ? ? ? ? ? ? ?goto nomem;
> ? ? ? ? ? ? ? ?}
>
> --
> 1.6.3.3
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] mailbox: change full flag per mailbox queue instead of global
2010-08-10 14:36 ` Ohad Ben-Cohen
@ 2010-08-10 15:58 ` Hiroshi DOYU
-1 siblings, 0 replies; 13+ messages in thread
From: Hiroshi DOYU @ 2010-08-10 15:58 UTC (permalink / raw)
To: x0095840, ohad; +Cc: linux-arm-kernel, linux-omap
From: ext Ohad Ben-Cohen <ohad@wizery.com>
Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead of global
Date: Tue, 10 Aug 2010 16:36:42 +0200
> Hi Hiroshi,
>
> On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
>> As pointed by Ben Ohand, the variable rq_full flag is a global
>> variable, so if there are multiple mailbox users there will be
>> conflics. Now there is a full flag per mailbox queue.
>>
>> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
>> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
>
> It looks like this fix didn't get thru - can you please review and ack/nack ?
Sure.
Fernando, could you rebase this patch against the latest omap/master?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-08-10 15:58 ` Hiroshi DOYU
0 siblings, 0 replies; 13+ messages in thread
From: Hiroshi DOYU @ 2010-08-10 15:58 UTC (permalink / raw)
To: linux-arm-kernel
From: ext Ohad Ben-Cohen <ohad@wizery.com>
Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead of global
Date: Tue, 10 Aug 2010 16:36:42 +0200
> Hi Hiroshi,
>
> On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com> wrote:
>> As pointed by Ben Ohand, the variable rq_full flag is a global
>> variable, so if there are multiple mailbox users there will be
>> conflics. Now there is a full flag per mailbox queue.
>>
>> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
>> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
>
> It looks like this fix didn't get thru - can you please review and ack/nack ?
Sure.
Fernando, could you rebase this patch against the latest omap/master?
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH] mailbox: change full flag per mailbox queue instead of global
2010-08-10 15:58 ` Hiroshi DOYU
@ 2010-08-10 16:22 ` Guzman Lugo, Fernando
-1 siblings, 0 replies; 13+ messages in thread
From: Guzman Lugo, Fernando @ 2010-08-10 16:22 UTC (permalink / raw)
To: Hiroshi DOYU, ohad; +Cc: linux-arm-kernel, linux-omap
> -----Original Message-----
> From: Hiroshi DOYU [mailto:Hiroshi.DOYU@nokia.com]
> Sent: Tuesday, August 10, 2010 10:58 AM
> To: Guzman Lugo, Fernando; ohad@wizery.com
> Cc: linux-arm-kernel@lists.infradead.org; linux-omap@vger.kernel.org
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
>
> From: ext Ohad Ben-Cohen <ohad@wizery.com>
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
> Date: Tue, 10 Aug 2010 16:36:42 +0200
>
> > Hi Hiroshi,
> >
> > On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com>
> wrote:
> >> As pointed by Ben Ohand, the variable rq_full flag is a global
> >> variable, so if there are multiple mailbox users there will be
> >> conflics. Now there is a full flag per mailbox queue.
> >>
> >> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> >> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> >
> > It looks like this fix didn't get thru - can you please review and
> ack/nack ?
>
> Sure.
>
> Fernando, could you rebase this patch against the latest omap/master?
No problem, I will send it again.
Regards,
Fernando.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-08-10 16:22 ` Guzman Lugo, Fernando
0 siblings, 0 replies; 13+ messages in thread
From: Guzman Lugo, Fernando @ 2010-08-10 16:22 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Hiroshi DOYU [mailto:Hiroshi.DOYU at nokia.com]
> Sent: Tuesday, August 10, 2010 10:58 AM
> To: Guzman Lugo, Fernando; ohad at wizery.com
> Cc: linux-arm-kernel at lists.infradead.org; linux-omap at vger.kernel.org
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
>
> From: ext Ohad Ben-Cohen <ohad@wizery.com>
> Subject: Re: [PATCH] mailbox: change full flag per mailbox queue instead
> of global
> Date: Tue, 10 Aug 2010 16:36:42 +0200
>
> > Hi Hiroshi,
> >
> > On Mon, Jun 14, 2010 at 7:51 PM, Fernando Guzman Lugo <x0095840@ti.com>
> wrote:
> >> As pointed by Ben Ohand, the variable rq_full flag is a global
> >> variable, so if there are multiple mailbox users there will be
> >> conflics. Now there is a full flag per mailbox queue.
> >>
> >> Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
> >> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> >
> > It looks like this fix didn't get thru - can you please review and
> ack/nack ?
>
> Sure.
>
> Fernando, could you rebase this patch against the latest omap/master?
No problem, I will send it again.
Regards,
Fernando.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] mailbox: change full flag per mailbox queue instead of global
@ 2010-06-11 21:17 Fernando Guzman Lugo
0 siblings, 0 replies; 13+ messages in thread
From: Fernando Guzman Lugo @ 2010-06-11 21:17 UTC (permalink / raw)
To: linux-omap; +Cc: hiroshi.doyu, ohad, Fernando Guzman Lugo
As pointer by Ben Ohand, the variable rq_full flag is a global
variable, so if there are multiple mailbox user there will be
conflics. Now there is a full flag per mailbox queue.
Reported-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
---
arch/arm/plat-omap/include/plat/mailbox.h | 1 +
arch/arm/plat-omap/mailbox.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
index 729166b..a6144b8 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -47,6 +47,7 @@ struct omap_mbox_queue {
struct tasklet_struct tasklet;
int (*callback)(void *);
struct omap_mbox *mbox;
+ bool full;
};
struct omap_mbox {
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 8d86b0b..a1e274e 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -30,7 +30,6 @@
static struct omap_mbox *mboxes;
static DEFINE_RWLOCK(mboxes_lock);
-static bool rq_full;
static int mbox_configured;
static DEFINE_MUTEX(mbox_configured_lock);
@@ -140,9 +139,9 @@ static void mbox_rx_work(struct work_struct *work)
while (1) {
spin_lock_irqsave(q->queue_lock, flags);
rq = blk_fetch_request(q);
- if (rq_full) {
+ if (mbox->rxq->full) {
omap_mbox_enable_irq(mbox, IRQ_RX);
- rq_full = false;
+ mbox->rxq->full = false;
}
spin_unlock_irqrestore(q->queue_lock, flags);
if (!rq)
@@ -183,7 +182,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
if (unlikely(!rq)) {
omap_mbox_disable_irq(mbox, IRQ_RX);
- rq_full = true;
+ mbox->rxq->full = true;
goto nomem;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-08-10 16:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14 16:51 [PATCH] mailbox: change full flag per mailbox queue instead of global Fernando Guzman Lugo
2010-06-14 16:51 ` Fernando Guzman Lugo
2010-06-16 21:17 ` Ohad Ben-Cohen
2010-06-16 21:17 ` Ohad Ben-Cohen
2010-06-17 16:42 ` Guzman Lugo, Fernando
2010-06-17 16:42 ` Guzman Lugo, Fernando
2010-08-10 14:36 ` Ohad Ben-Cohen
2010-08-10 14:36 ` Ohad Ben-Cohen
2010-08-10 15:58 ` Hiroshi DOYU
2010-08-10 15:58 ` Hiroshi DOYU
2010-08-10 16:22 ` Guzman Lugo, Fernando
2010-08-10 16:22 ` Guzman Lugo, Fernando
-- strict thread matches above, loose matches on Subject: below --
2010-06-11 21:17 Fernando Guzman Lugo
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.