irqchip: mips-cpu: set IPI domain parent chip
Subsystems (4)
PATCH 1/1 irqchip: mips-cpu: set IPI domain parent chip
Since commit 55567976629e ("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.
--- drivers/irqchip/irq-mips-cpu.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/irqchip/irq-mips-cpu.c +7 -0
@@ -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;
Signature · 1 line
2.25.1
Marc Zyngier
AppliedQuoted 9 lines · Mathias Kresin
Since commit
55567976629e("genirq/irqdomain: Allow partial trimming ofirq_datahierarchy") theirq_datachain 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.[...]
Applied to irq/irqchip-next, thanks!
[1/1] irqchip: mips-cpu: set IPI domain parent chip
commit: 599b3063adf4bf041a87a69244ee36aded0d878f
Cheers,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
[irqchip: irq/irqchip-next] irqchip/mips-cpu: Set IPI domain parent chip
In reply to Mathias KresinThe following commit has been merged into the irq/irqchip-next branch of irqchip:
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 599b3063adf4bf041a87a69244ee36aded0d878f Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/599b3063adf4bf041a87a69244ee36aded0d878f Author: Mathias Kresin <[email protected]> AuthorDate: Thu, 07 Jan 2021 22:36:03 +01:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Sun, 10 Jan 2021 10:20:24
irqchip/mips-cpu: Set IPI domain parent chip
Since commit 55567976629e ("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.
--- drivers/irqchip/irq-mips-cpu.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/irqchip/irq-mips-cpu.c +7 -0
@@ -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;