summaryrefslogtreecommitdiffstats
path: root/kernel/irq/migration.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-04 18:46:16 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 12:58:25 +0100
commita439520f8b18917b322f576be04c54aba84bb044 (patch)
treeb835a4b32c057408ed35292c02ad214341e317ed /kernel/irq/migration.c
parent77694b408abb8f92195ad5ed6ce5492f1d794c77 (diff)
downloadlinux-stable-a439520f8b18917b322f576be04c54aba84bb044.tar.gz
linux-stable-a439520f8b18917b322f576be04c54aba84bb044.tar.bz2
linux-stable-a439520f8b18917b322f576be04c54aba84bb044.zip
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 @@
#include "internals.h"
-void move_masked_irq(int irq)
+void irq_move_masked_irq(struct irq_data *idata)
{
- struct irq_desc *desc = irq_to_desc(irq);
- struct irq_chip *chip = desc->irq_data.chip;
+ struct irq_desc *desc = irq_data_to_desc(idata);
+ struct irq_chip *chip = idata->chip;
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
return;
@@ -53,12 +53,17 @@ void move_masked_irq(int irq)
cpumask_clear(desc->pending_mask);
}
-void move_native_irq(int irq)
+void move_masked_irq(int irq)
+{
+ irq_move_masked_irq(irq_get_irq_data(irq));
+}
+
+void irq_move_irq(struct irq_data *idata)
{
- struct irq_desc *desc = irq_to_desc(irq);
+ struct irq_desc *desc = irq_data_to_desc(idata);
bool masked;
- if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
+ if (likely(!irqd_is_setaffinity_pending(idata)))
return;
if (unlikely(desc->istate & IRQS_DISABLED))
@@ -71,8 +76,13 @@ void move_native_irq(int irq)
*/
masked = desc->istate & IRQS_MASKED;
if (!masked)
- desc->irq_data.chip->irq_mask(&desc->irq_data);
- move_masked_irq(irq);
+ idata->chip->irq_mask(idata);
+ irq_move_masked_irq(idata);
if (!masked)
- desc->irq_data.chip->irq_unmask(&desc->irq_data);
+ idata->chip->irq_unmask(idata);
+}
+
+void move_native_irq(int irq)
+{
+ irq_move_irq(irq_get_irq_data(irq));
}