ia64/linux-2.6.18-xen.hg

view kernel/irq/migration.c @ 912:dd42cdb0ab89

[IA64] Build blktap2 driver by default in x86 builds.

add CONFIG_XEN_BLKDEV_TAP2=y to buildconfigs/linux-defconfig_xen_ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 12:09:16 2009 +0900 (2009-06-29)
parents 831230e53067
children
line source
2 #include <linux/irq.h>
4 void set_pending_irq(unsigned int irq, cpumask_t mask)
5 {
6 struct irq_desc *desc = irq_desc + irq;
7 unsigned long flags;
9 spin_lock_irqsave(&desc->lock, flags);
10 desc->move_irq = 1;
11 irq_desc[irq].pending_mask = mask;
12 spin_unlock_irqrestore(&desc->lock, flags);
13 }
15 void move_native_irq(int irq)
16 {
17 struct irq_desc *desc = irq_desc + irq;
18 cpumask_t tmp;
20 if (likely(!desc->move_irq))
21 return;
23 /*
24 * Paranoia: cpu-local interrupts shouldn't be calling in here anyway.
25 */
26 if (CHECK_IRQ_PER_CPU(desc->status)) {
27 WARN_ON(1);
28 return;
29 }
31 desc->move_irq = 0;
33 if (unlikely(cpus_empty(irq_desc[irq].pending_mask)))
34 return;
36 if (!desc->chip->set_affinity)
37 return;
39 assert_spin_locked(&desc->lock);
41 cpus_and(tmp, irq_desc[irq].pending_mask, cpu_online_map);
43 /*
44 * If there was a valid mask to work with, please
45 * do the disable, re-program, enable sequence.
46 * This is *not* particularly important for level triggered
47 * but in a edge trigger case, we might be setting rte
48 * when an active trigger is comming in. This could
49 * cause some ioapics to mal-function.
50 * Being paranoid i guess!
51 */
52 if (likely(!cpus_empty(tmp))) {
53 if (likely(!(desc->status & IRQ_DISABLED)))
54 desc->chip->disable(irq);
56 desc->chip->set_affinity(irq,tmp);
58 if (likely(!(desc->status & IRQ_DISABLED)))
59 desc->chip->enable(irq);
60 }
61 cpus_clear(irq_desc[irq].pending_mask);
62 }