3 #include <linux/interrupt.h>
7 void move_masked_irq(int irq)
9 struct irq_desc *desc = irq_to_desc(irq);
11 if (likely(!(desc->status & IRQ_MOVE_PENDING)))
15 * Paranoia: cpu-local interrupts shouldn't be calling in here anyway.
17 if (CHECK_IRQ_PER_CPU(desc->status)) {
22 desc->status &= ~IRQ_MOVE_PENDING;
24 if (unlikely(cpumask_empty(desc->pending_mask)))
27 if (!desc->chip->set_affinity)
30 assert_spin_locked(&desc->lock);
33 * If there was a valid mask to work with, please
34 * do the disable, re-program, enable sequence.
35 * This is *not* particularly important for level triggered
36 * but in a edge trigger case, we might be setting rte
37 * when an active trigger is comming in. This could
38 * cause some ioapics to mal-function.
39 * Being paranoid i guess!
41 * For correct operation this depends on the caller
44 if (likely(cpumask_any_and(desc->pending_mask, cpu_online_mask)
46 if (!desc->chip->set_affinity(irq, desc->pending_mask)) {
47 cpumask_copy(desc->affinity, desc->pending_mask);
48 irq_set_thread_affinity(desc, desc->pending_mask);
51 cpumask_clear(desc->pending_mask);
54 void move_native_irq(int irq)
56 struct irq_desc *desc = irq_to_desc(irq);
58 if (likely(!(desc->status & IRQ_MOVE_PENDING)))
61 if (unlikely(desc->status & IRQ_DISABLED))
64 desc->chip->mask(irq);
66 desc->chip->unmask(irq);