genirq: Move IRQ_SPURIOUS_DISABLED to core state
No users outside. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@@ -64,7 +64,6 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
|
|||||||
#define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */
|
#define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */
|
||||||
#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
|
#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
|
||||||
#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
|
#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
|
||||||
#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
|
|
||||||
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
|
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
|
||||||
#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
|
#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
|
||||||
#define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */
|
#define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */
|
||||||
|
@@ -37,9 +37,12 @@ enum {
|
|||||||
* Bit masks for desc->state
|
* Bit masks for desc->state
|
||||||
*
|
*
|
||||||
* IRQS_AUTODETECT - autodetection in progress
|
* IRQS_AUTODETECT - autodetection in progress
|
||||||
|
* IRQS_SPURIOUS_DISABLED - was disabled due to spurious interrupt
|
||||||
|
* detection
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
IRQS_AUTODETECT = 0x00000001,
|
IRQS_AUTODETECT = 0x00000001,
|
||||||
|
IRQS_SPURIOUS_DISABLED = 0x00000002,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
|
#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
|
||||||
|
@@ -897,9 +897,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
|||||||
desc->status |= IRQ_PER_CPU;
|
desc->status |= IRQ_PER_CPU;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT |
|
desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT | IRQ_INPROGRESS);
|
||||||
IRQ_INPROGRESS | IRQ_SPURIOUS_DISABLED);
|
desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED);
|
||||||
desc->istate &= ~IRQS_AUTODETECT;
|
|
||||||
|
|
||||||
if (new->flags & IRQF_ONESHOT)
|
if (new->flags & IRQF_ONESHOT)
|
||||||
desc->status |= IRQ_ONESHOT;
|
desc->status |= IRQ_ONESHOT;
|
||||||
@@ -937,8 +936,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
|||||||
* Check whether we disabled the irq via the spurious handler
|
* Check whether we disabled the irq via the spurious handler
|
||||||
* before. Reenable it and give it another chance.
|
* before. Reenable it and give it another chance.
|
||||||
*/
|
*/
|
||||||
if (shared && (desc->status & IRQ_SPURIOUS_DISABLED)) {
|
if (shared && (desc->istate & IRQS_SPURIOUS_DISABLED)) {
|
||||||
desc->status &= ~IRQ_SPURIOUS_DISABLED;
|
desc->istate &= ~IRQS_SPURIOUS_DISABLED;
|
||||||
__enable_irq(desc, irq, false);
|
__enable_irq(desc, irq, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -146,15 +146,15 @@ static void poll_spurious_irqs(unsigned long dummy)
|
|||||||
irq_poll_cpu = smp_processor_id();
|
irq_poll_cpu = smp_processor_id();
|
||||||
|
|
||||||
for_each_irq_desc(i, desc) {
|
for_each_irq_desc(i, desc) {
|
||||||
unsigned int status;
|
unsigned int state;
|
||||||
|
|
||||||
if (!i)
|
if (!i)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Racy but it doesn't matter */
|
/* Racy but it doesn't matter */
|
||||||
status = desc->status;
|
state = desc->istate;
|
||||||
barrier();
|
barrier();
|
||||||
if (!(status & IRQ_SPURIOUS_DISABLED))
|
if (!(state & IRQS_SPURIOUS_DISABLED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
@@ -298,7 +298,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
|
|||||||
* Now kill the IRQ
|
* Now kill the IRQ
|
||||||
*/
|
*/
|
||||||
printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
|
printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
|
||||||
desc->status |= IRQ_SPURIOUS_DISABLED;
|
desc->istate |= IRQS_SPURIOUS_DISABLED;
|
||||||
desc->depth++;
|
desc->depth++;
|
||||||
irq_disable(desc);
|
irq_disable(desc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user