diff options
-rw-r--r-- | include/linux/irq.h | 1 | ||||
-rw-r--r-- | kernel/irq/manage.c | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 552e0ec269c9..c211984b55e5 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -62,6 +62,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
62 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | 62 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ |
63 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | 63 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ |
64 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | 64 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ |
65 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ | ||
65 | 66 | ||
66 | #ifdef CONFIG_IRQ_PER_CPU | 67 | #ifdef CONFIG_IRQ_PER_CPU |
67 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 68 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 46d6611a33bb..628b5572a7c2 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -87,7 +87,14 @@ int irq_set_affinity(unsigned int irq, cpumask_t cpumask) | |||
87 | set_balance_irq_affinity(irq, cpumask); | 87 | set_balance_irq_affinity(irq, cpumask); |
88 | 88 | ||
89 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 89 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
90 | set_pending_irq(irq, cpumask); | 90 | if (desc->status & IRQ_MOVE_PCNTXT) { |
91 | unsigned long flags; | ||
92 | |||
93 | spin_lock_irqsave(&desc->lock, flags); | ||
94 | desc->chip->set_affinity(irq, cpumask); | ||
95 | spin_unlock_irqrestore(&desc->lock, flags); | ||
96 | } else | ||
97 | set_pending_irq(irq, cpumask); | ||
91 | #else | 98 | #else |
92 | desc->affinity = cpumask; | 99 | desc->affinity = cpumask; |
93 | desc->chip->set_affinity(irq, cpumask); | 100 | desc->chip->set_affinity(irq, cpumask); |