* [PATCH] irqchip: mips-cpu: set IPI domain parent chip
@ 2021-01-07 21:36 Mathias Kresin
2021-01-10 10:24 ` Marc Zyngier
2021-01-10 10:29 ` [irqchip: irq/irqchip-next] irqchip/mips-cpu: Set " irqchip-bot for Mathias Kresin
0 siblings, 2 replies; 3+ messages in thread
From: Mathias Kresin @ 2021-01-07 21:36 UTC (permalink / raw)
To: Thomas Bogendoerfer, Serge Semin, Thomas Gleixner, Marc Zyngier,
linux-mips, linux-kernel
Cc: Martin Blumenstingl, Hauke Mehrtens, stable
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.
Fixes: 3838a547fda2 ("irqchip: mips-cpu: Introduce IPI IRQ domain support")
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Mathias Kresin <dev@kresin.me>
---
drivers/irqchip/irq-mips-cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c
index 95d4fd8f7a96..0bbb0b2d0dd5 100644
--- a/drivers/irqchip/irq-mips-cpu.c
+++ b/drivers/irqchip/irq-mips-cpu.c
@@ -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;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: mips-cpu: set IPI domain parent chip
2021-01-07 21:36 [PATCH] irqchip: mips-cpu: set IPI domain parent chip Mathias Kresin
@ 2021-01-10 10:24 ` Marc Zyngier
2021-01-10 10:29 ` [irqchip: irq/irqchip-next] irqchip/mips-cpu: Set " irqchip-bot for Mathias Kresin
1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2021-01-10 10:24 UTC (permalink / raw)
To: Mathias Kresin, linux-mips, linux-kernel, Thomas Gleixner,
Thomas Bogendoerfer, Serge Semin
Cc: Hauke Mehrtens, Martin Blumenstingl, stable
On Thu, 7 Jan 2021 22:36:03 +0100, Mathias Kresin wrote:
> 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.
>
> [...]
Applied to irq/irqchip-next, thanks!
[1/1] irqchip: mips-cpu: set IPI domain parent chip
commit: 599b3063adf4bf041a87a69244ee36aded0d878f
Cheers,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [irqchip: irq/irqchip-next] irqchip/mips-cpu: Set IPI domain parent chip
2021-01-07 21:36 [PATCH] irqchip: mips-cpu: set IPI domain parent chip Mathias Kresin
2021-01-10 10:24 ` Marc Zyngier
@ 2021-01-10 10:29 ` irqchip-bot for Mathias Kresin
1 sibling, 0 replies; 3+ messages in thread
From: irqchip-bot for Mathias Kresin @ 2021-01-10 10:29 UTC (permalink / raw)
To: linux-kernel; +Cc: stable, Mathias Kresin, Marc Zyngier, tglx
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 <dev@kresin.me>
AuthorDate: Thu, 07 Jan 2021 22:36:03 +01:00
Committer: Marc Zyngier <maz@kernel.org>
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.
Fixes: 3838a547fda2 ("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
---
drivers/irqchip/irq-mips-cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c
index 95d4fd8..0bbb0b2 100644
--- a/drivers/irqchip/irq-mips-cpu.c
+++ b/drivers/irqchip/irq-mips-cpu.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-10 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 21:36 [PATCH] irqchip: mips-cpu: set IPI domain parent chip Mathias Kresin
2021-01-10 10:24 ` Marc Zyngier
2021-01-10 10:29 ` [irqchip: irq/irqchip-next] irqchip/mips-cpu: Set " irqchip-bot for Mathias Kresin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).