aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/irq.h4
-rw-r--r--kernel/irq/migration.c28
2 files changed, 23 insertions, 9 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index ea2970c294aa..ff62d0145b8f 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -363,9 +363,13 @@ extern void remove_irq(unsigned int irq, struct irqaction *act);
363#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) 363#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
364void move_native_irq(int irq); 364void move_native_irq(int irq);
365void move_masked_irq(int irq); 365void move_masked_irq(int irq);
366void irq_move_irq(struct irq_data *data);
367void irq_move_masked_irq(struct irq_data *data);
366#else 368#else
367static inline void move_native_irq(int irq) { } 369static inline void move_native_irq(int irq) { }
368static inline void move_masked_irq(int irq) { } 370static inline void move_masked_irq(int irq) { }
371static inline void irq_move_irq(struct irq_data *data) { }
372static inline void irq_move_masked_irq(struct irq_data *data) { }
369#endif 373#endif
370 374
371extern int no_irq_affinity; 375extern int no_irq_affinity;
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index 7a93c6b88b25..ec4806d4778b 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -4,10 +4,10 @@
4 4
5#include "internals.h" 5#include "internals.h"
6 6
7void move_masked_irq(int irq) 7void irq_move_masked_irq(struct irq_data *idata)
8{ 8{
9 struct irq_desc *desc = irq_to_desc(irq); 9 struct irq_desc *desc = irq_data_to_desc(idata);
10 struct irq_chip *chip = desc->irq_data.chip; 10 struct irq_chip *chip = idata->chip;
11 11
12 if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) 12 if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
13 return; 13 return;
@@ -53,12 +53,17 @@ void move_masked_irq(int irq)
53 cpumask_clear(desc->pending_mask); 53 cpumask_clear(desc->pending_mask);
54} 54}
55 55
56void move_native_irq(int irq) 56void move_masked_irq(int irq)
57{
58 irq_move_masked_irq(irq_get_irq_data(irq));
59}
60
61void irq_move_irq(struct irq_data *idata)
57{ 62{
58 struct irq_desc *desc = irq_to_desc(irq); 63 struct irq_desc *desc = irq_data_to_desc(idata);
59 bool masked; 64 bool masked;
60 65
61 if (likely(!irqd_is_setaffinity_pending(&desc->irq_data))) 66 if (likely(!irqd_is_setaffinity_pending(idata)))
62 return; 67 return;
63 68
64 if (unlikely(desc->istate & IRQS_DISABLED)) 69 if (unlikely(desc->istate & IRQS_DISABLED))
@@ -71,8 +76,13 @@ void move_native_irq(int irq)
71 */ 76 */
72 masked = desc->istate & IRQS_MASKED; 77 masked = desc->istate & IRQS_MASKED;
73 if (!masked) 78 if (!masked)
74 desc->irq_data.chip->irq_mask(&desc->irq_data); 79 idata->chip->irq_mask(idata);
75 move_masked_irq(irq); 80 irq_move_masked_irq(idata);
76 if (!masked) 81 if (!masked)
77 desc->irq_data.chip->irq_unmask(&desc->irq_data); 82 idata->chip->irq_unmask(idata);
83}
84
85void move_native_irq(int irq)
86{
87 irq_move_irq(irq_get_irq_data(irq));
78} 88}