lkml.org 
[lkml]   [2010]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] GIC: Assign correct flow handler type in set_type callback
On 12/29/2010 10:27 PM, Rabin Vincent wrote:
> On Thu, Dec 30, 2010 at 10:59 AM, Abhijeet Dharmapurikar
> <adharmap@codeaurora.org> wrote:
>> There are some interrupts that are true edge triggered in nature. If not
>> marked IRQ_PENDING, when disabled, they will be lost.
>>
>> Use the set_type callback to assign the correct flow type handler for
>> shared peripheral interrupts.
>>
>> Signed-off-by: Abhijeet Dharmapurikar<adharmap@codeaurora.org>
>> ---
>> This came to light when a edge triggered interrupt was supposed to wakeup the
>> sytem. The flow handler was set to the default handle_level_irq. On the resume
>> path the flow handler was invoked right after the I bit was cleared but before
>> each individual interrupts were enabled. This made the handle_level_irq ignore
>
> Why does the flow handler hit when the interrupt is disabled? Have you set
> IRQF_NOSUSPEND on this interrupt?
>
Since GIC doesnt have disable callback it implements lazy disabling. The
interrupt is only marked IRQ_DISABLED in the descriptor but is not
masked in the GIC. Hence the interrupt flow handler is hit.

Now that I re-read the code setting IRQF_NO_SUSPEND would fix the issue.
But shouldnt set_irq_wake() do something similar?

Do I need to request IRQF_NO_SUSPEND for all the interrupts that could
possibly wakeup the system - seems a bit unnecessary. IMO the interrupt
should not be disabled if it is marked IRQF_NO_SUPEND || IRQ_WAKEUP is set.

Abhijeet




\
 
 \ /
  Last update: 2010-12-31 11:41    [W:0.050 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site