[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e2c0f8ff0fc26959952fbfa89f732fef928df77f@git.kernel.org>
Date: Mon, 4 Oct 2010 20:31:05 GMT
From: tip-bot for Thomas Gleixner <tglx@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
peterz@...radead.org, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:irq/core] genirq: Provide compat handling for chip->mask()
Commit-ID: e2c0f8ff0fc26959952fbfa89f732fef928df77f
Gitweb: http://git.kernel.org/tip/e2c0f8ff0fc26959952fbfa89f732fef928df77f
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Mon, 27 Sep 2010 12:44:42 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 4 Oct 2010 12:43:36 +0200
genirq: Provide compat handling for chip->mask()
Wrap the old chip function mask() until the migration is complete and
the old chip functions are removed.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
LKML-Reference: <20100927121841.940355859@...utronix.de>
Reviewed-by: H. Peter Anvin <hpa@...or.com>
Reviewed-by: Ingo Molnar <mingo@...e.hu>
---
kernel/irq/chip.c | 22 +++++++++++++++-------
kernel/irq/handle.c | 1 -
kernel/irq/migration.c | 2 +-
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 77e551d..c041270 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -320,11 +320,16 @@ static void default_shutdown(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
- desc->irq_data.chip->mask(irq);
+ desc->irq_data.chip->irq_mask(&desc->irq_data);
desc->status |= IRQ_MASKED;
}
/* Temporary migration helpers */
+static void compat_irq_mask(struct irq_data *data)
+{
+ data->chip->mask(data->irq);
+}
+
static void compat_bus_lock(struct irq_data *data)
{
data->chip->bus_lock(data->irq);
@@ -362,6 +367,9 @@ void irq_chip_set_defaults(struct irq_chip *chip)
chip->irq_bus_lock = compat_bus_lock;
if (chip->bus_sync_unlock)
chip->irq_bus_sync_unlock = compat_bus_sync_unlock;
+
+ if (chip->mask)
+ chip->irq_mask = compat_irq_mask;
}
static inline void mask_ack_irq(struct irq_desc *desc, int irq)
@@ -369,17 +377,17 @@ static inline void mask_ack_irq(struct irq_desc *desc, int irq)
if (desc->irq_data.chip->mask_ack)
desc->irq_data.chip->mask_ack(irq);
else {
- desc->irq_data.chip->mask(irq);
+ desc->irq_data.chip->irq_mask(&desc->irq_data);
if (desc->irq_data.chip->ack)
desc->irq_data.chip->ack(irq);
}
desc->status |= IRQ_MASKED;
}
-static inline void mask_irq(struct irq_desc *desc, int irq)
+static inline void mask_irq(struct irq_desc *desc)
{
- if (desc->irq_data.chip->mask) {
- desc->irq_data.chip->mask(irq);
+ if (desc->irq_data.chip->irq_mask) {
+ desc->irq_data.chip->irq_mask(&desc->irq_data);
desc->status |= IRQ_MASKED;
}
}
@@ -553,7 +561,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
action = desc->action;
if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
desc->status |= IRQ_PENDING;
- mask_irq(desc, irq);
+ mask_irq(desc);
goto out;
}
@@ -621,7 +629,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
irqreturn_t action_ret;
if (unlikely(!action)) {
- mask_irq(desc, irq);
+ mask_irq(desc);
goto out_unlock;
}
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index adca5b4..3b160ac 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -360,7 +360,6 @@ struct irq_chip dummy_irq_chip = {
.enable = compat_noop,
.disable = compat_noop,
.ack = compat_noop,
- .mask = compat_noop,
.unmask = compat_noop,
.end = compat_noop,
};
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index f923c37..b165ec2 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -61,7 +61,7 @@ void move_native_irq(int irq)
if (unlikely(desc->status & IRQ_DISABLED))
return;
- desc->irq_data.chip->mask(irq);
+ desc->irq_data.chip->irq_mask(&desc->irq_data);
move_masked_irq(irq);
desc->irq_data.chip->unmask(irq);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists