From: Linus Walleij Date: Fri, 17 Jan 2020 08:00:35 +0000 (+0100) Subject: Merge branch 'fixup-thunderx-hierarchy' into devel X-Git-Tag: v5.10.7~3374^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b844d78a72a9975730f4a65d66f7388a4dd9c38;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'fixup-thunderx-hierarchy' into devel --- 8b844d78a72a9975730f4a65d66f7388a4dd9c38 diff --cc drivers/gpio/gpiolib.c index 4275b8d,4b94b9e..e2749d2 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@@ -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); + irq_set_lockdep_class(irq, gc->irq.lock_key, gc->irq.request_key); - ret = irq_domain_alloc_irqs_parent(d, irq, 1, &parent_fwspec); + 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",