public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCHv2] omap:mailbox: resolve hang issue
@ 2011-03-02 22:14 Armando Uribe
  2011-03-03  1:44 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Armando Uribe @ 2011-03-02 22:14 UTC (permalink / raw)
  To: linux-arm-kernel

From: Hari Kanigeri <h-kanigeri2@ti.com>

omap4 interrupt disable bits is different. On rx kfifo full, the mbox rx
interrupts wasn't getting disabled, and this is causing the rcm stress tests
to hang.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
---
 arch/arm/mach-omap2/mailbox.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 394413d..011ca50 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -193,10 +193,12 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
 		omap_mbox_type_t irq)
 {
 	struct omap_mbox2_priv *p = mbox->priv;
-	u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
-	l = mbox_read_reg(p->irqdisable);
-	l &= ~bit;
-	mbox_write_reg(l, p->irqdisable);
+	u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
+
+	if (!cpu_is_omap44xx())
+		bit = mbox_read_reg(p->irqdisable) & ~bit;
+
+	mbox_write_reg(bit, p->irqdisable);
 }
 
 static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
-- 
1.7.0.4

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

* [PATCHv2] omap:mailbox: resolve hang issue
  2011-03-02 22:14 [PATCHv2] omap:mailbox: resolve hang issue Armando Uribe
@ 2011-03-03  1:44 ` Tony Lindgren
  2011-03-03  2:51   ` Guzman Lugo, Fernando
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2011-03-03  1:44 UTC (permalink / raw)
  To: linux-arm-kernel

* Armando Uribe <x0095078@ti.com> [110302 13:54]:
> From: Hari Kanigeri <h-kanigeri2@ti.com>
> 
> omap4 interrupt disable bits is different. On rx kfifo full, the mbox rx
> interrupts wasn't getting disabled, and this is causing the rcm stress tests
> to hang.
> 
> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
> Signed-off-by: Armando Uribe <x0095078@ti.com>
> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>

Should we merge this as a fix for the 2.6.38 still?

Tony

> ---
>  arch/arm/mach-omap2/mailbox.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> index 394413d..011ca50 100644
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -193,10 +193,12 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
>  		omap_mbox_type_t irq)
>  {
>  	struct omap_mbox2_priv *p = mbox->priv;
> -	u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
> -	l = mbox_read_reg(p->irqdisable);
> -	l &= ~bit;
> -	mbox_write_reg(l, p->irqdisable);
> +	u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
> +
> +	if (!cpu_is_omap44xx())
> +		bit = mbox_read_reg(p->irqdisable) & ~bit;
> +
> +	mbox_write_reg(bit, p->irqdisable);
>  }
>  
>  static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
> -- 
> 1.7.0.4
> 

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

* [PATCHv2] omap:mailbox: resolve hang issue
  2011-03-03  1:44 ` Tony Lindgren
@ 2011-03-03  2:51   ` Guzman Lugo, Fernando
  0 siblings, 0 replies; 3+ messages in thread
From: Guzman Lugo, Fernando @ 2011-03-03  2:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 2, 2011 at 7:44 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Armando Uribe <x0095078@ti.com> [110302 13:54]:
>> From: Hari Kanigeri <h-kanigeri2@ti.com>
>>
>> omap4 interrupt disable bits is different. On rx kfifo full, the mbox rx
>> interrupts wasn't getting disabled, and this is causing the rcm stress tests
>> to hang.
>>
>> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
>> Signed-off-by: Armando Uribe <x0095078@ti.com>
>> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
>
> Should we merge this as a fix for the 2.6.38 still?

yeah, if it can still be merged in 2.6.38 because it is a fix it would be great.

Regards,
Fernando.

>
> Tony
>
>> ---
>> ?arch/arm/mach-omap2/mailbox.c | ? 10 ++++++----
>> ?1 files changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
>> index 394413d..011ca50 100644
>> --- a/arch/arm/mach-omap2/mailbox.c
>> +++ b/arch/arm/mach-omap2/mailbox.c
>> @@ -193,10 +193,12 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
>> ? ? ? ? ? ? ? omap_mbox_type_t irq)
>> ?{
>> ? ? ? struct omap_mbox2_priv *p = mbox->priv;
>> - ? ? u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
>> - ? ? l = mbox_read_reg(p->irqdisable);
>> - ? ? l &= ~bit;
>> - ? ? mbox_write_reg(l, p->irqdisable);
>> + ? ? u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
>> +
>> + ? ? if (!cpu_is_omap44xx())
>> + ? ? ? ? ? ? bit = mbox_read_reg(p->irqdisable) & ~bit;
>> +
>> + ? ? mbox_write_reg(bit, p->irqdisable);
>> ?}
>>
>> ?static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
>> --
>> 1.7.0.4
>>
>

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

end of thread, other threads:[~2011-03-03  2:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 22:14 [PATCHv2] omap:mailbox: resolve hang issue Armando Uribe
2011-03-03  1:44 ` Tony Lindgren
2011-03-03  2:51   ` Guzman Lugo, Fernando

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox