Thread (5 messages) 5 messages, 3 authors, 2011-03-03

Disabling an interrupt

From: Dave Hylands <hidden>
Date: 2011-03-03 02:51:46

Hi Jacky,

On Wed, Mar 2, 2011 at 6:26 PM, Jacky Lam [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help