mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	genirq: Use handle_irq_event() in the spurious poll code
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
		
							parent
							
								
									849f061c25
								
							
						
					
					
						commit
						0877d66257
					
				
					 1 changed files with 9 additions and 12 deletions
				
			
		| 
						 | 
					@ -56,13 +56,14 @@ bool irq_wait_for_poll(struct irq_desc *desc)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Recovery handler for misrouted interrupts.
 | 
					 * Recovery handler for misrouted interrupts.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int try_one_irq(int irq, struct irq_desc *desc, bool force)
 | 
					static int try_one_irq(int irq, struct irq_desc *desc, bool force)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						irqreturn_t ret = IRQ_NONE;
 | 
				
			||||||
	struct irqaction *action;
 | 
						struct irqaction *action;
 | 
				
			||||||
	int ok = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	raw_spin_lock(&desc->lock);
 | 
						raw_spin_lock(&desc->lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -96,21 +97,17 @@ static int try_one_irq(int irq, struct irq_desc *desc, bool force)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Honour the normal IRQ locking and mark it poll in progress */
 | 
						/* Mark it poll in progress */
 | 
				
			||||||
	desc->status |= IRQ_INPROGRESS | IRQ_POLL_INPROGRESS;
 | 
						desc->status |= IRQ_POLL_INPROGRESS;
 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		desc->status &= ~IRQ_PENDING;
 | 
							if (handle_irq_event(desc) == IRQ_HANDLED)
 | 
				
			||||||
		raw_spin_unlock(&desc->lock);
 | 
								ret = IRQ_HANDLED;
 | 
				
			||||||
		if (handle_IRQ_event(irq, action) != IRQ_NONE)
 | 
					 | 
				
			||||||
			ok = 1;
 | 
					 | 
				
			||||||
		raw_spin_lock(&desc->lock);
 | 
					 | 
				
			||||||
		action = desc->action;
 | 
							action = desc->action;
 | 
				
			||||||
	} while ((desc->status & IRQ_PENDING) && action);
 | 
						} while ((desc->status & IRQ_PENDING) && action);
 | 
				
			||||||
 | 
						desc->status &= ~IRQ_POLL_INPROGRESS;
 | 
				
			||||||
	desc->status &= ~(IRQ_INPROGRESS | IRQ_POLL_INPROGRESS);
 | 
					 | 
				
			||||||
out:
 | 
					out:
 | 
				
			||||||
	raw_spin_unlock(&desc->lock);
 | 
						raw_spin_unlock(&desc->lock);
 | 
				
			||||||
	return ok;
 | 
						return ret == IRQ_HANDLED;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int misrouted_irq(int irq)
 | 
					static int misrouted_irq(int irq)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue