public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [ARM][OMAP] TWL4030 IRQ
@ 2009-06-24  7:46 Shilimkar, Santosh
  2009-06-24  7:57 ` Russell King - ARM Linux
  0 siblings, 1 reply; 15+ messages in thread
From: Shilimkar, Santosh @ 2009-06-24  7:46 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org

(resending wrapped message)

Russell, 
> -----Original Message-----
> From: Shilimkar, Santosh 
> Sent: Saturday, June 20, 2009 8:55 PM
> To: 'Tony Lindgren'; 'linux-omap@vger.kernel.org'
> Cc: 'Russell King - ARM Linux'
> Subject: [ARM][OMAP] TWL4030 IRQ
> 
> Just to brief you all, I came across a dead lock scenario on 
> the arm-smp kernel. After discussing with Russell on mailing 
> list, the actual bug seems be located in twl4030 IRQ implementation.
> 
> Initially I was suspecting the arm-generic area and hence 
> didn't include linux-omap list in the mail thread
> 
> For more information on this issue, please read this email thread.
> http://marc.info/?l=linux-arm-kernel&m=124550947525299&w=2
> 
> I will create a patch for "twl4030" and also would be 
> correcting upcoming "twl6030" accordingly.
> 
> If anyone on this mailing list has any other opinion, please 
> react to the email thread. 


After digging a bit, the proposed twl_irq change would need some major 
changes.

1. All the T2(TWL)drivers ( rtc, madc, bci, gpio, keypad, usb, mmc)needs
modification.Currently twl_irq fw implements kind of "twl4030_irq_chip" 
which allows all the T2 drivers to get virtual interrupt numbers and can
make use of standard "request_irq" linux api.
2.Above also helps to have useful entries 
like /proc/interrupts/rtc etc.
With proposed change this also won't be available.
3. Register/unregister irq handlers to T2 from all the drivers

On the reported lock-up issue, I tried alternative to call mask/unmask 
functions with disabling local cpu interrupts.
This worked for me but not sure whether it is entirely correct.

Something like this:
 static void handle_twl4030_pih(unsigned int irq, irq_desc_t *desc)
 {
+	unsigned long flags;
+
 	/* Acknowledge, clear *AND* mask the interrupt... */
+	local_irq_save(flags);
 	desc->chip->ack(irq);
+	local_irq_restore(flags);
 	complete(&irq_event);
 }

Do you think above approach is fine to get around the spin-lock lockup
issue ? 
 
Regards,
Santosh

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: [ARM][OMAP] TWL4030 IRQ
@ 2009-06-24  5:07 Shilimkar, Santosh
  2009-06-24  7:31 ` Russell King - ARM Linux
  0 siblings, 1 reply; 15+ messages in thread
From: Shilimkar, Santosh @ 2009-06-24  5:07 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.arm.linux.org.uk, Tony Lindgren

Russell, 

After digging a bit, the proposed twl_irq change would need some major changes.

1. All the T2(TWL)drivers ( rtc, madc, bci, gpio, keypad, usb, mmc)needs modification. Currently twl_irq fw implements kind of "twl4030_irq_chip" which allows all the T2 drivers to get virtual interrupt numbers and can make use of standard "request_irq" linux api.
2.Above also helps to have useful entries like /proc/interrupts/rtc etc. With proposed change this also won't be available.
3. Register/unregister irq handlers to T2 from all the drivers


On the reported lock-up issue, I tried alternative to call mask/unmask functions with disabling local cpu interrupts. This worked for me but not sure whether it is entirely correct.

Something like this:
 static void handle_twl4030_pih(unsigned int irq, irq_desc_t *desc)
 {
+	unsigned long flags;
+
 	/* Acknowledge, clear *AND* mask the interrupt... */
+	local_irq_save(flags);
 	desc->chip->ack(irq);
+	local_irq_restore(flags);
 	complete(&irq_event);
 }

Do you think above approach is fine to get around the spin-lock lockup issue ? 
 
> -----Original Message-----
> From: Shilimkar, Santosh 
> Sent: Saturday, June 20, 2009 8:55 PM
> To: 'Tony Lindgren'; 'linux-omap@vger.kernel.org'
> Cc: 'Russell King - ARM Linux'
> Subject: [ARM][OMAP] TWL4030 IRQ
> 
> Just to brief you all, I came across a dead lock scenario on 
> the arm-smp kernel. After discussing with Russell on mailing 
> list, the actual bug seems be located in twl4030 IRQ implementation.
> 
> Initially I was suspecting the arm-generic area and hence 
> didn't include linux-omap list in the mail thread
> 
> For more information on this issue, please read this email thread.
> http://marc.info/?l=linux-arm-kernel&m=124550947525299&w=2
> 
> I will create a patch for "twl4030" and also would be 
> correcting upcoming "twl6030" accordingly.
> 
> If anyone on this mailing list has any other opinion, please 
> react to the email thread. 


Regards,
Santosh 

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [ARM][OMAP] TWL4030 IRQ
@ 2009-06-20 15:24 Shilimkar, Santosh
  0 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2009-06-20 15:24 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap@vger.kernel.org; +Cc: Russell King - ARM Linux

Just to brief you all, I came across a dead lock scenario on the arm-smp kernel. After discussing with Russell on mailing list, the actual bug seems be located in twl4030 IRQ implementation.

Initially I was suspecting the arm-generic area and hence didn't include linux-omap list in the mail thread

For more information on this issue, please read this email thread.
http://marc.info/?l=linux-arm-kernel&m=124550947525299&w=2

I will create a patch for "twl4030" and also would be correcting upcoming "twl6030" accordingly.

If anyone on this mailing list has any other opinion, please react to the email thread. 

Thanks !!

Regards,
Santosh

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

end of thread, other threads:[~2009-07-01 13:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24  7:46 [ARM][OMAP] TWL4030 IRQ Shilimkar, Santosh
2009-06-24  7:57 ` Russell King - ARM Linux
2009-06-29  9:30   ` Russell King - ARM Linux
2009-06-29 15:34     ` Shilimkar, Santosh
2009-06-29 15:43       ` Russell King - ARM Linux
2009-06-29 17:51       ` Kevin Hilman
2009-06-29 17:52         ` Russell King - ARM Linux
2009-06-29 17:58           ` Kevin Hilman
2009-06-30  6:31     ` Shilimkar, Santosh
2009-06-30 23:05       ` Kevin Hilman
2009-07-01  5:03         ` Shilimkar, Santosh
2009-07-01 13:51           ` Kevin Hilman
  -- strict thread matches above, loose matches on Subject: below --
2009-06-24  5:07 Shilimkar, Santosh
2009-06-24  7:31 ` Russell King - ARM Linux
2009-06-20 15:24 Shilimkar, Santosh

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