aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-09-27 08:44:44 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-04 06:43:37 -0400
commit0eda58b7f3a30c9a13d83db1cfaab00e1c452055 (patch)
tree6e6efb689188f20271d8dd290008652d3c3defd8 /kernel
parente2c0f8ff0fc26959952fbfa89f732fef928df77f (diff)
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> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20100927121842.043608928@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.c20
-rw-r--r--kernel/irq/handle.c1
-rw-r--r--kernel/irq/manage.c2
-rw-r--r--kernel/irq/migration.c2
4 files changed, 16 insertions, 9 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c041270bfe50..dbdb59a42093 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -291,7 +291,7 @@ static void default_enable(unsigned int irq)
291{ 291{
292 struct irq_desc *desc = irq_to_desc(irq); 292 struct irq_desc *desc = irq_to_desc(irq);
293 293
294 desc->irq_data.chip->unmask(irq); 294 desc->irq_data.chip->irq_unmask(&desc->irq_data);
295 desc->status &= ~IRQ_MASKED; 295 desc->status &= ~IRQ_MASKED;
296} 296}
297 297
@@ -330,6 +330,11 @@ static void compat_irq_mask(struct irq_data *data)
330 data->chip->mask(data->irq); 330 data->chip->mask(data->irq);
331} 331}
332 332
333static void compat_irq_unmask(struct irq_data *data)
334{
335 data->chip->unmask(data->irq);
336}
337
333static void compat_bus_lock(struct irq_data *data) 338static void compat_bus_lock(struct irq_data *data)
334{ 339{
335 data->chip->bus_lock(data->irq); 340 data->chip->bus_lock(data->irq);
@@ -370,6 +375,9 @@ void irq_chip_set_defaults(struct irq_chip *chip)
370 375
371 if (chip->mask) 376 if (chip->mask)
372 chip->irq_mask = compat_irq_mask; 377 chip->irq_mask = compat_irq_mask;
378
379 if (chip->unmask)
380 chip->irq_unmask = compat_irq_unmask;
373} 381}
374 382
375static inline void mask_ack_irq(struct irq_desc *desc, int irq) 383static inline void mask_ack_irq(struct irq_desc *desc, int irq)
@@ -392,10 +400,10 @@ static inline void mask_irq(struct irq_desc *desc)
392 } 400 }
393} 401}
394 402
395static inline void unmask_irq(struct irq_desc *desc, int irq) 403static inline void unmask_irq(struct irq_desc *desc)
396{ 404{
397 if (desc->irq_data.chip->unmask) { 405 if (desc->irq_data.chip->irq_unmask) {
398 desc->irq_data.chip->unmask(irq); 406 desc->irq_data.chip->irq_unmask(&desc->irq_data);
399 desc->status &= ~IRQ_MASKED; 407 desc->status &= ~IRQ_MASKED;
400 } 408 }
401} 409}
@@ -524,7 +532,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
524 desc->status &= ~IRQ_INPROGRESS; 532 desc->status &= ~IRQ_INPROGRESS;
525 533
526 if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT))) 534 if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT)))
527 unmask_irq(desc, irq); 535 unmask_irq(desc);
528out_unlock: 536out_unlock:
529 raw_spin_unlock(&desc->lock); 537 raw_spin_unlock(&desc->lock);
530} 538}
@@ -641,7 +649,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
641 if (unlikely((desc->status & 649 if (unlikely((desc->status &
642 (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == 650 (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) ==
643 (IRQ_PENDING | IRQ_MASKED))) { 651 (IRQ_PENDING | IRQ_MASKED))) {
644 unmask_irq(desc, irq); 652 unmask_irq(desc);
645 } 653 }
646 654
647 desc->status &= ~IRQ_PENDING; 655 desc->status &= ~IRQ_PENDING;
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 3b160ac236b0..f334c8c59dd2 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -360,7 +360,6 @@ struct irq_chip dummy_irq_chip = {
360 .enable = compat_noop, 360 .enable = compat_noop,
361 .disable = compat_noop, 361 .disable = compat_noop,
362 .ack = compat_noop, 362 .ack = compat_noop,
363 .unmask = compat_noop,
364 .end = compat_noop, 363 .end = compat_noop,
365}; 364};
366 365
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index dfb02ff7d2ef..b3986bce64ff 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -528,7 +528,7 @@ again:
528 528
529 if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) { 529 if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) {
530 desc->status &= ~IRQ_MASKED; 530 desc->status &= ~IRQ_MASKED;
531 desc->irq_data.chip->unmask(irq); 531 desc->irq_data.chip->irq_unmask(&desc->irq_data);
532 } 532 }
533 raw_spin_unlock_irq(&desc->lock); 533 raw_spin_unlock_irq(&desc->lock);
534 chip_bus_sync_unlock(desc); 534 chip_bus_sync_unlock(desc);
diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c
index b165ec26b757..7888e5d5575a 100644
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -63,6 +63,6 @@ void move_native_irq(int irq)
63 63
64 desc->irq_data.chip->irq_mask(&desc->irq_data); 64 desc->irq_data.chip->irq_mask(&desc->irq_data);
65 move_masked_irq(irq); 65 move_masked_irq(irq);
66 desc->irq_data.chip->unmask(irq); 66 desc->irq_data.chip->irq_unmask(&desc->irq_data);
67} 67}
68 68