Skip to content

Commit

Permalink
irqchip/mips-cpu: Set IPI domain parent chip
Browse files Browse the repository at this point in the history
commit 599b306 upstream.

Since commit 5556797 ("genirq/irqdomain: Allow partial trimming of
irq_data hierarchy") the irq_data chain is valided.

The irq_domain_trim_hierarchy() function doesn't consider the irq + ipi
domain hierarchy as valid, since the ipi domain has the irq domain set
as parent, but the parent domain has no chip set. Hence the boot ends in
a kernel panic.

Set the chip for the parent domain as it is done in the mips gic irq
driver, to have a valid irq_data chain.

Fixes: 3838a54 ("irqchip: mips-cpu: Introduce IPI IRQ domain support")
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210107213603.1637781-1-dev@kresin.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
mkresin authored and gregkh committed Jan 27, 2021
1 parent 2edf2c9 commit c530b17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/irqchip/irq-mips-cpu.c
Expand Up @@ -197,6 +197,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq,
if (ret)
return ret;

ret = irq_domain_set_hwirq_and_chip(domain->parent, virq + i, hwirq,
&mips_mt_cpu_irq_controller,
NULL);

if (ret)
return ret;

ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH);
if (ret)
return ret;
Expand Down

0 comments on commit c530b17

Please sign in to comment.