No users outside of core.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
#define IRQ_INPROGRESS 0x00000100 /* DEPRECATED */
+#define IRQ_REPLAY 0x00000200 /* DEPRECATED */
+#define IRQ_WAITING 0x00000400 /* DEPRECATED */
#endif
-#define IRQ_DISABLED 0x00000200 /* IRQ disabled - do not enter! */
-#define IRQ_PENDING 0x00000400 /* IRQ pending - replay on enable */
-#define IRQ_REPLAY 0x00000800 /* IRQ has been replayed but not acked yet */
-#define IRQ_WAITING 0x00002000 /* IRQ not yet seen - for autodetection */
+#define IRQ_DISABLED 0x00000800 /* IRQ disabled - do not enter! */
+#define IRQ_PENDING 0x00001000 /* IRQ pending - replay on enable */
+
#define IRQ_LEVEL 0x00004000 /* IRQ level triggered */
#define IRQ_MASKED 0x00008000 /* IRQ masked - shouldn't be seen again */
#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
/*
* Autodetection depends on the fact that any interrupt that
* comes in on to an unassigned handler will get stuck with
- * "IRQ_WAITING" cleared and the interrupt disabled.
+ * "IRQS_WAITING" cleared and the interrupt disabled.
*/
static DEFINE_MUTEX(probing_active);
for_each_irq_desc_reverse(i, desc) {
raw_spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
- desc->istate |= IRQS_AUTODETECT;
- desc->status |= IRQ_WAITING;
+ desc->istate |= IRQS_AUTODETECT | IRQS_WAITING;
if (irq_startup(desc))
desc->status |= IRQ_PENDING;
}
if (desc->istate & IRQS_AUTODETECT) {
/* It triggered already - consider it spurious. */
- if (!(desc->status & IRQ_WAITING)) {
+ if (!(desc->istate & IRQS_WAITING)) {
desc->istate &= ~IRQS_AUTODETECT;
irq_shutdown(desc);
} else
for_each_irq_desc(i, desc) {
raw_spin_lock_irq(&desc->lock);
if (desc->istate & IRQS_AUTODETECT) {
- if (i < 16 && !(desc->status & IRQ_WAITING))
+ if (i < 16 && !(desc->istate & IRQS_WAITING))
mask |= 1 << i;
desc->istate &= ~IRQS_AUTODETECT;
raw_spin_lock_irq(&desc->lock);
if (desc->istate & IRQS_AUTODETECT) {
- if (!(desc->status & IRQ_WAITING)) {
+ if (!(desc->istate & IRQS_WAITING)) {
if (!nr_of_irqs)
irq_found = i;
nr_of_irqs++;
if (!irq_check_poll(desc))
goto out_unlock;
- desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+ desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
kstat_incr_irqs_this_cpu(irq, desc);
if (unlikely(!desc->action || (desc->status & IRQ_DISABLED)))
if (!irq_check_poll(desc))
goto out_unlock;
- desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+ desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
kstat_incr_irqs_this_cpu(irq, desc);
/*
if (!irq_check_poll(desc))
goto out;
- desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
+ desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
kstat_incr_irqs_this_cpu(irq, desc);
/*
{
raw_spin_lock(&desc->lock);
- desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
-
+ desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
/*
* If we're currently running this IRQ, or its disabled,
* we shouldn't process the IRQ. Mark it pending, handle
* IRQS_POLL_INPROGRESS - polling in progress
* IRQS_INPROGRESS - Interrupt in progress
* IRQS_ONESHOT - irq is not unmasked in primary handler
+ * IRQS_REPLAY - irq is replayed
+ * IRQS_WAITING - irq is waiting
*/
enum {
IRQS_AUTODETECT = 0x00000001,
IRQS_POLL_INPROGRESS = 0x00000008,
IRQS_INPROGRESS = 0x00000010,
IRQS_ONESHOT = 0x00000020,
+ IRQS_REPLAY = 0x00000040,
+ IRQS_WAITING = 0x00000080,
};
#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
P(IRQ_DISABLED);
P(IRQ_PENDING);
- P(IRQ_REPLAY);
- P(IRQ_WAITING);
P(IRQ_LEVEL);
P(IRQ_MASKED);
#ifdef CONFIG_IRQ_PER_CPU
PS(IRQS_AUTODETECT);
PS(IRQS_INPROGRESS);
+ PS(IRQS_REPLAY);
+ PS(IRQS_WAITING);
}
#undef P
desc->status |= IRQ_PER_CPU;
#endif
- desc->status &= ~IRQ_WAITING;
desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
- IRQS_INPROGRESS | IRQS_ONESHOT);
+ IRQS_INPROGRESS | IRQS_ONESHOT | \
+ IRQS_WAITING);
if (new->flags & IRQF_ONESHOT)
desc->istate |= IRQS_ONESHOT;
*/
if (desc->status & IRQ_LEVEL)
return;
- if ((desc->status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
- desc->status = (desc->status & ~IRQ_PENDING) | IRQ_REPLAY;
+ if (desc->istate & IRQS_REPLAY)
+ return;
+ if (desc->status & IRQ_PENDING) {
+ desc->status &= ~IRQ_PENDING;
+ desc->istate |= IRQS_REPLAY;
if (!desc->irq_data.chip->irq_retrigger ||
!desc->irq_data.chip->irq_retrigger(&desc->irq_data)) {
#undef IRQ_INPROGRESS
#define IRQ_INPROGRESS GOT_YOU_MORON
+#undef IRQ_REPLAY
+#define IRQ_REPLAY GOT_YOU_MORON
+#undef IRQ_WAITING
+#define IRQ_WAITING GOT_YOU_MORON