]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'linus' into irq/core
authorThomas Gleixner <tglx@linutronix.de>
Tue, 20 Jun 2017 20:08:32 +0000 (22:08 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 20 Jun 2017 20:08:32 +0000 (22:08 +0200)
Get upstream changes so pending patches won't conflict.

1  2 
kernel/irq/manage.c

diff --combined kernel/irq/manage.c
index 49c37f1e71c09bb3d6f70465ae8f05f3036f6ed9,425170d4439be5926a63ef9be50c71c1dd5878a9..4c34696ca57587593ab4364205383d840d21d6d8
@@@ -533,15 -533,9 +533,15 @@@ void __enable_irq(struct irq_desc *desc
                        goto err_out;
                /* Prevent probing on this irq: */
                irq_settings_set_noprobe(desc);
 -              irq_enable(desc);
 -              check_irq_resend(desc);
 -              /* fall-through */
 +              /*
 +               * Call irq_startup() not irq_enable() here because the
 +               * interrupt might be marked NOAUTOEN. So irq_startup()
 +               * needs to be invoked when it gets enabled the first
 +               * time. If it was already started up, then irq_startup()
 +               * will invoke irq_enable() under the hood.
 +               */
 +              irq_startup(desc, true);
 +              break;
        }
        default:
                desc->depth--;
@@@ -1318,8 -1312,10 +1318,10 @@@ __setup_irq(unsigned int irq, struct ir
                        ret = __irq_set_trigger(desc,
                                                new->flags & IRQF_TRIGGER_MASK);
  
-                       if (ret)
+                       if (ret) {
+                               irq_release_resources(desc);
                                goto out_mask;
+                       }
                }
  
                desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
                if (new->flags & IRQF_ONESHOT)
                        desc->istate |= IRQS_ONESHOT;
  
 -              if (irq_settings_can_autoenable(desc))
 +              if (irq_settings_can_autoenable(desc)) {
                        irq_startup(desc, true);
 -              else
 +              } else {
 +                      /*
 +                       * Shared interrupts do not go well with disabling
 +                       * auto enable. The sharing interrupt might request
 +                       * it while it's still disabled and then wait for
 +                       * interrupts forever.
 +                       */
 +                      WARN_ON_ONCE(new->flags & IRQF_SHARED);
                        /* Undo nested disables: */
                        desc->depth = 1;
 +              }
  
                /* Exclude IRQ from balancing if requested */
                if (new->flags & IRQF_NOBALANCING) {