lkml.org 
[lkml]   [2010]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 06/19] genirq; Provide compat handling for chip->unmask()
Wrap the old chip function unmask() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
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);
}




\
 
 \ /
  Last update: 2010-09-27 20:11    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site