kernel/irq/chip.c provides compat wrappers for when users of the
new-style (->irq_foo()) irq_chip methods try to call into irq_chips
that provide only old-style (->foo()) methods, but doesn't currently
provide compatibility in the other direction.
As there exist chained irq flow handlers outside kernel/irq/ that have
not been converted over to call the new methods yet, this means that
the irq_chips that they are chained off can't be converted to the new
methods yet.
This patch adds reverse compat wrappers, so that old-style flow
handlers can call into new-style irq_chips, too, and the flow handlers
and irq_chips can be converted to the new API independently.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
---
kernel/irq/chip.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 138 insertions(+), 4 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index baa5c4a..9a73b0e 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -298,15 +298,106 @@ static int compat_irq_retrigger(struct irq_data *data)
return data->chip->retrigger(data->irq);
}
-static void compat_bus_lock(struct irq_data *data)
+static void compat_irq_bus_lock(struct irq_data *data)
{
data->chip->bus_lock(data->irq);
}
-static void compat_bus_sync_unlock(struct irq_data *data)
+static void compat_irq_bus_sync_unlock(struct irq_data *data)
{
data->chip->bus_sync_unlock(data->irq);
}
+
+/* And the other way around */
+static void compat_mask(unsigned int irq)
+{
+ struct irq_data *data = irq_get_irq_data(irq);
+ data->chip->irq_mask(data);
+}
+
+static void compat_unmask(unsigned int irq)
+{
+ struct irq_data *data = irq_get_irq_data(irq);
+ data->chip->irq_unmask(data);
+}
+
+static void compat_ack(unsigned int irq)
+{
+ struct irq_data *data = irq_get_irq_data(irq);
+ data->chip->irq_ack(data);
+}
+
+static void compat_mask_ack(unsigned int irq)
+{
+ struct irq_data *data = ...