aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/migration.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-04 12:46:16 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:25 -0500
commita439520f8b18917b322f576be04c54aba84bb044 (patch)
treeb835a4b32c057408ed35292c02ad214341e317ed /kernel/irq/migration.c
parent77694b408abb8f92195ad5ed6ce5492f1d794c77 (diff)
genirq: Implement irq_data based move_*_irq() versions
No need to lookup the irq descriptor when calling from a chip callback function which has irq_data already handy. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/migration.c')
-rw-r--r--kernel/irq/migration.c28
1 files changed, 19 insertions, 9 deletions
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}