Merge branch 'fixup-thunderx-hierarchy' into devel
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Jan 2020 08:00:35 +0000 (09:00 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Jan 2020 08:00:35 +0000 (09:00 +0100)
1  2 
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h

@@@ -2029,19 -2042,20 +2029,21 @@@ static int gpiochip_hierarchy_irq_domai
                            NULL, NULL);
        irq_set_probe(irq);
  
-       /*
-        * Create a IRQ fwspec to send up to the parent irqdomain:
-        * specify the hwirq we address on the parent and tie it
-        * all together up the chain.
-        */
-       parent_fwspec.fwnode = d->parent->fwnode;
        /* This parent only handles asserted level IRQs */
-       girq->populate_parent_fwspec(gc, &parent_fwspec, parent_hwirq,
-                                    parent_type);
+       parent_arg = girq->populate_parent_alloc_arg(gc, parent_hwirq, parent_type);
+       if (!parent_arg)
+               return -ENOMEM;
        chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
                  irq, parent_hwirq);
-       ret = irq_domain_alloc_irqs_parent(d, irq, 1, &parent_fwspec);
 +      irq_set_lockdep_class(irq, gc->irq.lock_key, gc->irq.request_key);
+       ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg);
+       /*
+        * If the parent irqdomain is msi, the interrupts have already
+        * been allocated, so the EEXIST is good.
+        */
+       if (irq_domain_is_msi(d->parent) && (ret == -EEXIST))
+               ret = 0;
        if (ret)
                chip_err(gc,
                         "failed to allocate parent hwirq %d for hwirq %lu\n",
Simple merge