[patch 06/19] genirq; Provide compat handling for chip->unmask()
From: Thomas Gleixner
Date: Mon Sep 27 2010 - 08:45:06 EST
Wrap the old chip function unmask() until the migration is complete
and the old chip functions are removed.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
kernel/irq/chip.c | 20 ++++++++++++++------
kernel/irq/manage.c | 2 +-
kernel/irq/migration.c | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)
Index: linux-2.6-tip/kernel/irq/chip.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/chip.c
+++ linux-2.6-tip/kernel/irq/chip.c
@@ -294,7 +294,7 @@ static void default_enable(unsigned int
{
struct irq_desc *desc = irq_to_desc(irq);
- desc->chip->unmask(irq);
+ desc->chip->irq_unmask(&desc->irq_data);
desc->status &= ~IRQ_MASKED;
}
@@ -333,6 +333,11 @@ static void compat_irq_mask(struct irq_d
irq_data_to_desc(data)->chip->mask(data->irq);
}
+static void compat_irq_unmask(struct irq_data *data)
+{
+ irq_data_to_desc(data)->chip->unmask(data->irq);
+}
+
static void compat_bus_lock(struct irq_data *data)
{
irq_data_to_desc(data)->chip->bus_lock(data->irq);
@@ -373,6 +378,9 @@ void irq_chip_set_defaults(struct irq_ch
if (chip->mask)
chip->irq_mask = compat_irq_mask;
+
+ if (chip->unmask)
+ chip->irq_unmask = compat_irq_unmask;
}
static inline void mask_ack_irq(struct irq_desc *desc, int irq)
@@ -395,10 +403,10 @@ static inline void mask_irq(struct irq_d
}
}
-static inline void unmask_irq(struct irq_desc *desc, int irq)
+static inline void unmask_irq(struct irq_desc *desc)
{
- if (desc->chip->unmask) {
- desc->chip->unmask(irq);
+ if (desc->chip->irq_unmask) {
+ desc->chip->irq_unmask(&desc->irq_data);
desc->status &= ~IRQ_MASKED;
}
}
@@ -527,7 +535,7 @@ handle_level_irq(unsigned int irq, struc
desc->status &= ~IRQ_INPROGRESS;
if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT)))
- unmask_irq(desc, irq);
+ unmask_irq(desc);
out_unlock:
raw_spin_unlock(&desc->lock);
}
@@ -644,7 +652,7 @@ handle_edge_irq(unsigned int irq, struct
if (unlikely((desc->status &
(IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) ==
(IRQ_PENDING | IRQ_MASKED))) {
- unmask_irq(desc, irq);
+ unmask_irq(desc);
}
desc->status &= ~IRQ_PENDING;
Index: linux-2.6-tip/kernel/irq/manage.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/manage.c
+++ linux-2.6-tip/kernel/irq/manage.c
@@ -528,7 +528,7 @@ again:
if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) {
desc->status &= ~IRQ_MASKED;
- desc->chip->unmask(irq);
+ desc->chip->irq_unmask(&desc->irq_data);
}
raw_spin_unlock_irq(&desc->lock);
chip_bus_sync_unlock(desc);
Index: linux-2.6-tip/kernel/irq/migration.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/migration.c
+++ linux-2.6-tip/kernel/irq/migration.c
@@ -63,6 +63,6 @@ void move_native_irq(int irq)
desc->chip->irq_mask(&desc->irq_data);
move_masked_irq(irq);
- desc->chip->unmask(irq);
+ desc->chip->irq_unmask(&desc->irq_data);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/