All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Policy for interrupts detected whilst disable_irq() in force
Date: Wed, 19 Mar 2008 12:11:03 +0000	[thread overview]
Message-ID: <29183.1205928663@redhat.com> (raw)


What's the policy for interrupts that are detected by the interrupt controller
on a channel that has disable_irq() in force?  Should the device driver expect
the interrupts to be lost?  Or can it expect that they'll be remembered and
that the CPU will process them when the IRQ channel is enabled?

Furthermore, what about an interrupt that is already pending when
disable_irq() is called?  Is it okay for that to be discarded?  Or must that
be processed upon enable_irq()?

MEI queried me about mn10300_cpupic_disable() in the MN10300 arch.  It clears
the channel enable bit and also clears the request and detect bits, thus losing
any pending interrupt.  Possibly I should introduce a separate shutdown()
method that discards any pending interrupt and modify disable() to merely clear
the enablement flag.

I would guess, however, that some hardware may not remember interrupts that
come in on disabled channels, in which case the driver cannot assume that
interrupts won't be lost.

Any thoughts?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: linux-arch@vger.kernel.org
Cc: dhowells@redhat.com
Subject: Policy for interrupts detected whilst disable_irq() in force
Date: Wed, 19 Mar 2008 12:11:03 +0000	[thread overview]
Message-ID: <29183.1205928663@redhat.com> (raw)
Message-ID: <20080319121103.vPGyfd5ZxC1lDDLeNl3msDFWfE0duwMVmWjXFJhuxlM@z> (raw)


What's the policy for interrupts that are detected by the interrupt controller
on a channel that has disable_irq() in force?  Should the device driver expect
the interrupts to be lost?  Or can it expect that they'll be remembered and
that the CPU will process them when the IRQ channel is enabled?

Furthermore, what about an interrupt that is already pending when
disable_irq() is called?  Is it okay for that to be discarded?  Or must that
be processed upon enable_irq()?

MEI queried me about mn10300_cpupic_disable() in the MN10300 arch.  It clears
the channel enable bit and also clears the request and detect bits, thus losing
any pending interrupt.  Possibly I should introduce a separate shutdown()
method that discards any pending interrupt and modify disable() to merely clear
the enablement flag.

I would guess, however, that some hardware may not remember interrupts that
come in on disabled channels, in which case the driver cannot assume that
interrupts won't be lost.

Any thoughts?

David

             reply	other threads:[~2008-03-19 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 12:11 David Howells [this message]
2008-03-19 12:11 ` Policy for interrupts detected whilst disable_irq() in force David Howells

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=29183.1205928663@redhat.com \
    --to=dhowells-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.