diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-27 08:44:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-04 06:43:40 -0400 |
commit | 9205e31d1af0f725e71bbae10d199c6b9e8d6dd8 (patch) | |
tree | 9ed35cf7a968ed94395ade073880c7b951f5aa92 /kernel | |
parent | 22a49163e90dd7088f801dd54e25b04e1f337e9b (diff) |
genirq: Provide compat handling for chip->mask_ack()
Wrap the old chip function mask_ack() until the migration is complete
and the old chip functions are removed.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20100927121842.240806983@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/chip.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 864c3abdf8f4..09c1a4493440 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -340,6 +340,11 @@ static void compat_irq_ack(struct irq_data *data) | |||
340 | data->chip->ack(data->irq); | 340 | data->chip->ack(data->irq); |
341 | } | 341 | } |
342 | 342 | ||
343 | static void compat_irq_mask_ack(struct irq_data *data) | ||
344 | { | ||
345 | data->chip->mask_ack(data->irq); | ||
346 | } | ||
347 | |||
343 | static void compat_bus_lock(struct irq_data *data) | 348 | static void compat_bus_lock(struct irq_data *data) |
344 | { | 349 | { |
345 | data->chip->bus_lock(data->irq); | 350 | data->chip->bus_lock(data->irq); |
@@ -383,12 +388,14 @@ void irq_chip_set_defaults(struct irq_chip *chip) | |||
383 | chip->irq_unmask = compat_irq_unmask; | 388 | chip->irq_unmask = compat_irq_unmask; |
384 | if (chip->ack) | 389 | if (chip->ack) |
385 | chip->irq_ack = compat_irq_ack; | 390 | chip->irq_ack = compat_irq_ack; |
391 | if (chip->mask_ack) | ||
392 | chip->irq_mask_ack = compat_irq_mask_ack; | ||
386 | } | 393 | } |
387 | 394 | ||
388 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 395 | static inline void mask_ack_irq(struct irq_desc *desc) |
389 | { | 396 | { |
390 | if (desc->irq_data.chip->mask_ack) | 397 | if (desc->irq_data.chip->irq_mask_ack) |
391 | desc->irq_data.chip->mask_ack(irq); | 398 | desc->irq_data.chip->irq_mask_ack(&desc->irq_data); |
392 | else { | 399 | else { |
393 | desc->irq_data.chip->irq_mask(&desc->irq_data); | 400 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
394 | if (desc->irq_data.chip->irq_ack) | 401 | if (desc->irq_data.chip->irq_ack) |
@@ -511,7 +518,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
511 | irqreturn_t action_ret; | 518 | irqreturn_t action_ret; |
512 | 519 | ||
513 | raw_spin_lock(&desc->lock); | 520 | raw_spin_lock(&desc->lock); |
514 | mask_ack_irq(desc, irq); | 521 | mask_ack_irq(desc); |
515 | 522 | ||
516 | if (unlikely(desc->status & IRQ_INPROGRESS)) | 523 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
517 | goto out_unlock; | 524 | goto out_unlock; |
@@ -625,7 +632,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
625 | if (unlikely((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) || | 632 | if (unlikely((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) || |
626 | !desc->action)) { | 633 | !desc->action)) { |
627 | desc->status |= (IRQ_PENDING | IRQ_MASKED); | 634 | desc->status |= (IRQ_PENDING | IRQ_MASKED); |
628 | mask_ack_irq(desc, irq); | 635 | mask_ack_irq(desc); |
629 | goto out_unlock; | 636 | goto out_unlock; |
630 | } | 637 | } |
631 | kstat_incr_irqs_this_cpu(irq, desc); | 638 | kstat_incr_irqs_this_cpu(irq, desc); |
@@ -729,7 +736,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
729 | /* Uninstall? */ | 736 | /* Uninstall? */ |
730 | if (handle == handle_bad_irq) { | 737 | if (handle == handle_bad_irq) { |
731 | if (desc->irq_data.chip != &no_irq_chip) | 738 | if (desc->irq_data.chip != &no_irq_chip) |
732 | mask_ack_irq(desc, irq); | 739 | mask_ack_irq(desc); |
733 | desc->status |= IRQ_DISABLED; | 740 | desc->status |= IRQ_DISABLED; |
734 | desc->depth = 1; | 741 | desc->depth = 1; |
735 | } | 742 | } |