提交 3418d724 编写于 作者: T Thomas Gleixner 提交者: Linus Torvalds

[PATCH] genirq: add IRQ_NOPROBE support

Introduce IRQ_NOPROBE: enables platforms to control chip-probing.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a4633adc
......@@ -40,6 +40,7 @@
# define CHECK_IRQ_PER_CPU(var) 0
#endif
#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
/**
* struct hw_interrupt_type - hardware interrupt type descriptor
*
......
......@@ -40,7 +40,7 @@ unsigned long probe_irq_on(void)
desc = irq_desc + i;
spin_lock_irq(&desc->lock);
if (!desc->action)
if (!desc->action && !(desc->status & IRQ_NOPROBE))
desc->chip->startup(i);
spin_unlock_irq(&desc->lock);
}
......@@ -57,7 +57,7 @@ unsigned long probe_irq_on(void)
desc = irq_desc + i;
spin_lock_irq(&desc->lock);
if (!desc->action) {
if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
if (desc->chip->startup(i))
desc->status |= IRQ_PENDING;
......
......@@ -118,6 +118,10 @@ void enable_irq(unsigned int irq)
WARN_ON(1);
break;
case 1: {
unsigned int status = desc->status & ~IRQ_DISABLED;
/* Prevent probing on this irq: */
desc->status = status | IRQ_NOPROBE;
check_irq_resend(desc, irq);
/* fall-through */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册