Commit 22a49163e90dd7088f801dd54e25b04e1f337e9b

Authored by Thomas Gleixner
1 parent 0eda58b7f3

genirq: Provide compat handling for chip->ack()

Wrap the old chip function 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.142624725@linutronix.de>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Ingo Molnar <mingo@elte.hu>

Showing 2 changed files with 12 additions and 18 deletions Side-by-side Diff

... ... @@ -335,6 +335,11 @@
335 335 data->chip->unmask(data->irq);
336 336 }
337 337  
  338 +static void compat_irq_ack(struct irq_data *data)
  339 +{
  340 + data->chip->ack(data->irq);
  341 +}
  342 +
338 343 static void compat_bus_lock(struct irq_data *data)
339 344 {
340 345 data->chip->bus_lock(data->irq);
341 346  
342 347  
... ... @@ -372,12 +377,12 @@
372 377 chip->irq_bus_lock = compat_bus_lock;
373 378 if (chip->bus_sync_unlock)
374 379 chip->irq_bus_sync_unlock = compat_bus_sync_unlock;
375   -
376 380 if (chip->mask)
377 381 chip->irq_mask = compat_irq_mask;
378   -
379 382 if (chip->unmask)
380 383 chip->irq_unmask = compat_irq_unmask;
  384 + if (chip->ack)
  385 + chip->irq_ack = compat_irq_ack;
381 386 }
382 387  
383 388 static inline void mask_ack_irq(struct irq_desc *desc, int irq)
... ... @@ -386,8 +391,8 @@
386 391 desc->irq_data.chip->mask_ack(irq);
387 392 else {
388 393 desc->irq_data.chip->irq_mask(&desc->irq_data);
389   - if (desc->irq_data.chip->ack)
390   - desc->irq_data.chip->ack(irq);
  394 + if (desc->irq_data.chip->irq_ack)
  395 + desc->irq_data.chip->irq_ack(&desc->irq_data);
391 396 }
392 397 desc->status |= IRQ_MASKED;
393 398 }
... ... @@ -626,8 +631,7 @@
626 631 kstat_incr_irqs_this_cpu(irq, desc);
627 632  
628 633 /* Start handling the irq */
629   - if (desc->irq_data.chip->ack)
630   - desc->irq_data.chip->ack(irq);
  634 + desc->irq_data.chip->irq_ack(&desc->irq_data);
631 635  
632 636 /* Mark the IRQ currently in progress.*/
633 637 desc->status |= IRQ_INPROGRESS;
... ... @@ -680,8 +684,8 @@
680 684  
681 685 kstat_incr_irqs_this_cpu(irq, desc);
682 686  
683   - if (desc->irq_data.chip->ack)
684   - desc->irq_data.chip->ack(irq);
  687 + if (desc->irq_data.chip->irq_ack)
  688 + desc->irq_data.chip->irq_ack(&desc->irq_data);
685 689  
686 690 action_ret = handle_IRQ_event(irq, desc->action);
687 691 if (!noirqdebug)
... ... @@ -299,14 +299,6 @@
299 299 ack_bad_irq(data->irq);
300 300 }
301 301  
302   -static void compat_ack_bad(unsigned int irq)
303   -{
304   - struct irq_desc *desc = irq_to_desc(irq);
305   -
306   - print_irq_desc(irq, desc);
307   - ack_bad_irq(irq);
308   -}
309   -
310 302 /*
311 303 * NOP functions
312 304 */
... ... @@ -338,7 +330,6 @@
338 330 .shutdown = compat_noop,
339 331 .enable = compat_noop,
340 332 .disable = compat_noop,
341   - .ack = compat_ack_bad,
342 333 .end = compat_noop,
343 334 };
344 335  
... ... @@ -359,7 +350,6 @@
359 350 .shutdown = compat_noop,
360 351 .enable = compat_noop,
361 352 .disable = compat_noop,
362   - .ack = compat_noop,
363 353 .end = compat_noop,
364 354 };
365 355