From: "irqchip-bot for Anup Patel" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Dmitry Dunaev <dunaev@tecon.ru>,
Anup Patel <apatel@ventanamicro.com>,
Marc Zyngier <maz@kernel.org>,
tglx@linutronix.de
Subject: [irqchip: irq/irqchip-fixes] irqchip/riscv-intc: Mark all INTC nodes as initialized
Date: Sat, 07 Oct 2023 12:00:44 -0000 [thread overview]
Message-ID: <169668004402.3135.14972053144849513086.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230926102801.1591126-1-dunaev@tecon.ru>
The following commit has been merged into the irq/irqchip-fixes branch of irqchip:
Commit-ID: e13cd66bd821be417c498a34928652db4ac6b436
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e13cd66bd821be417c498a34928652db4ac6b436
Author: Anup Patel <apatel@ventanamicro.com>
AuthorDate: Tue, 03 Oct 2023 10:13:51 +05:30
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 07 Oct 2023 12:47:12 +01:00
irqchip/riscv-intc: Mark all INTC nodes as initialized
The RISC-V INTC local interrupts are per-HART (or per-CPU) so we
create INTC IRQ domain only for the INTC node belonging to the boot
HART. This means only the boot HART INTC node will be marked as
initialized and other INTC nodes won't be marked which results
downstream interrupt controllers (such as PLIC, IMSIC and APLIC
direct-mode) not being probed due to missing device suppliers.
To address this issue, we mark all INTC node for which we don't
create IRQ domain as initialized.
Reported-by: Dmitry Dunaev <dunaev@tecon.ru>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230926102801.1591126-1-dunaev@tecon.ru
Link: https://lore.kernel.org/r/20231003044403.1974628-4-apatel@ventanamicro.com
---
drivers/irqchip/irq-riscv-intc.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index 4adeee1..e8d01b1 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -155,8 +155,16 @@ static int __init riscv_intc_init(struct device_node *node,
* for each INTC DT node. We only need to do INTC initialization
* for the INTC DT node belonging to boot CPU (or boot HART).
*/
- if (riscv_hartid_to_cpuid(hartid) != smp_processor_id())
+ if (riscv_hartid_to_cpuid(hartid) != smp_processor_id()) {
+ /*
+ * The INTC nodes of each CPU are suppliers for downstream
+ * interrupt controllers (such as PLIC, IMSIC and APLIC
+ * direct-mode) so we should mark an INTC node as initialized
+ * if we are not creating IRQ domain for it.
+ */
+ fwnode_dev_initialized(of_fwnode_handle(node), true);
return 0;
+ }
return riscv_intc_init_common(of_node_to_fwnode(node));
}
prev parent reply other threads:[~2023-10-07 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 10:28 [PATCH] irqchip/riscv-intc: Mark INTC nodes for secondary CPUs " Dmitry Dunaev
2023-09-26 10:36 ` Anup Patel
2023-10-04 10:18 ` Marc Zyngier
2023-10-04 14:59 ` Anup Patel
2023-10-04 15:32 ` Marc Zyngier
2023-10-04 16:08 ` Anup Patel
2023-09-26 20:44 ` kernel test robot
2023-10-07 12:00 ` irqchip-bot for Anup Patel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169668004402.3135.14972053144849513086.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=apatel@ventanamicro.com \
--cc=dunaev@tecon.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®