Disabling an interrupt
    Dave Hylands 
    dhylands at gmail.com
       
    Wed Mar  2 21:51:46 EST 2011
    
    
  
Hi Jacky,
On Wed, Mar 2, 2011 at 6:26 PM, Jacky Lam <lamshuyin at gmail.com> wrote:
> Hi Dave,
>
>     I have confirmed the execution has go into
>         desc->irq_data.chip->irq_disable(&desc->irq_data);
>
>   However, irq_disable points to kernel/irq/chip.c:default_disable() which
> do nothings.
>   Unlike default_enable() which called by enable_irq() will unmask the IRQ
> accordingly.
>
>   I don't understand the reason behind.
Which irq chip is being used?
It's really up to the individual irq chip driver to implement things
in an appropriate manner.
Since the IRQ_DISABLED flag is set, if the interrupt happens to fire
again, your handler shouldn't be called. The generic handler masks
interrupts when they occur, and if the IRQ_DISABLED flag is set then
it will leave the interrupt masked (i.e. disabled). Look at the the
__do_IRQ function in handle.c
<http://lxr.linux.no/linux+v2.6.36.4/kernel/irq/handle.c#L446>
So even though it looks like its not doing things, the interrupt is
still effectively disabled.
-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
    
    
More information about the Kernelnewbies
mailing list