kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Disabling an interrupt
Date: Wed, 2 Mar 2011 19:51:46 -0700	[thread overview]
Message-ID: <AANLkTik2Q0kw8FfRB6tOmMk_AyoZGKy0O7kCX6x=h5bH@mail.gmail.com> (raw)
In-Reply-To: <4D6EEE42.10909@gmail.com>

Hi Jacky,

On Wed, Mar 2, 2011 at 6:26 PM, Jacky Lam <lamshuyin@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

      reply	other threads:[~2011-03-03  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  8:55 Disabling an interrupt Jacky Lam
2011-03-02 22:15 ` Sri Ram Vemulpali
2011-03-02 22:49 ` Dave Hylands
2011-03-03  1:26   ` Jacky Lam
2011-03-03  2:51     ` Dave Hylands [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTik2Q0kw8FfRB6tOmMk_AyoZGKy0O7kCX6x=h5bH@mail.gmail.com' \
    --to=dhylands@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).