aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-07 15:48:49 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:16 -0500
commit009b4c3b8ad584b3462734127a5bec680d5d6af4 (patch)
treef7cb860dde86ba96afcc085ec7a75ca2a41e49b6 /kernel/irq/chip.c
parent6954b75b488dd740950573f244ddd66fd28620aa (diff)
genirq: Add IRQ_INPROGRESS to core
We need to maintain the flag for now in both fields status and istate. Add a CONFIG_GENERIC_HARDIRQS_NO_COMPAT switch to allow testing w/o the status one. Wrap the access to status IRQ_INPROGRESS in a inline which can be turned of with CONFIG_GENERIC_HARDIRQS_NO_COMPAT along with the define. There is no reason that anything outside of core looks at this. That needs some modifications, but we'll get there. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 34245e7d1213..075385549dcd 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -383,7 +383,8 @@ void handle_nested_irq(unsigned int irq)
383 if (unlikely(!action || (desc->status & IRQ_DISABLED))) 383 if (unlikely(!action || (desc->status & IRQ_DISABLED)))
384 goto out_unlock; 384 goto out_unlock;
385 385
386 desc->status |= IRQ_INPROGRESS; 386 irq_compat_set_progress(desc);
387 desc->istate |= IRQS_INPROGRESS;
387 raw_spin_unlock_irq(&desc->lock); 388 raw_spin_unlock_irq(&desc->lock);
388 389
389 action_ret = action->thread_fn(action->irq, action->dev_id); 390 action_ret = action->thread_fn(action->irq, action->dev_id);
@@ -391,7 +392,8 @@ void handle_nested_irq(unsigned int irq)
391 note_interrupt(irq, desc, action_ret); 392 note_interrupt(irq, desc, action_ret);
392 393
393 raw_spin_lock_irq(&desc->lock); 394 raw_spin_lock_irq(&desc->lock);
394 desc->status &= ~IRQ_INPROGRESS; 395 desc->istate &= ~IRQS_INPROGRESS;
396 irq_compat_clr_progress(desc);
395 397
396out_unlock: 398out_unlock:
397 raw_spin_unlock_irq(&desc->lock); 399 raw_spin_unlock_irq(&desc->lock);
@@ -422,7 +424,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
422{ 424{
423 raw_spin_lock(&desc->lock); 425 raw_spin_lock(&desc->lock);
424 426
425 if (unlikely(desc->status & IRQ_INPROGRESS)) 427 if (unlikely(desc->istate & IRQS_INPROGRESS))
426 if (!irq_check_poll(desc)) 428 if (!irq_check_poll(desc))
427 goto out_unlock; 429 goto out_unlock;
428 430
@@ -454,7 +456,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
454 raw_spin_lock(&desc->lock); 456 raw_spin_lock(&desc->lock);
455 mask_ack_irq(desc); 457 mask_ack_irq(desc);
456 458
457 if (unlikely(desc->status & IRQ_INPROGRESS)) 459 if (unlikely(desc->istate & IRQS_INPROGRESS))
458 if (!irq_check_poll(desc)) 460 if (!irq_check_poll(desc))
459 goto out_unlock; 461 goto out_unlock;
460 462
@@ -492,7 +494,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
492{ 494{
493 raw_spin_lock(&desc->lock); 495 raw_spin_lock(&desc->lock);
494 496
495 if (unlikely(desc->status & IRQ_INPROGRESS)) 497 if (unlikely(desc->istate & IRQS_INPROGRESS))
496 if (!irq_check_poll(desc)) 498 if (!irq_check_poll(desc))
497 goto out; 499 goto out;
498 500
@@ -542,8 +544,8 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
542 * we shouldn't process the IRQ. Mark it pending, handle 544 * we shouldn't process the IRQ. Mark it pending, handle
543 * the necessary masking and go out 545 * the necessary masking and go out
544 */ 546 */
545 if (unlikely((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) || 547 if (unlikely((desc->istate & (IRQS_INPROGRESS) ||
546 !desc->action)) { 548 (desc->status & IRQ_DISABLED) || !desc->action))) {
547 if (!irq_check_poll(desc)) { 549 if (!irq_check_poll(desc)) {
548 desc->status |= IRQ_PENDING; 550 desc->status |= IRQ_PENDING;
549 mask_ack_irq(desc); 551 mask_ack_irq(desc);