From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC8C3CDB483 for ; Wed, 18 Oct 2023 14:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UWHSq3UOlGzSM2ohdPvZIYFAjMZBXCgvMrRjmV61pa0=; b=Yoc0HO7iHc0I8D SfCzIweOqBdyBXGdlb3YAT5JPdQ2jQDCfmBts5OFm/+L6QfPmEdpafnnA3KFoOxjctv7+gd2qsOqB dHPLKQXu0DxGjquZMwTZYxyuBEDcMhhf9pG2iTuheSELmBRmAxQOLNl8wqonmflDzBIWjcWdok67K 5CGc1bXhZjA8eds1p0rWiE4hHuqHqa93GeYP5YydMFx/pUbQ4AEJ5hxTxrGLodtT8/BboZDnShdbl zQoG5ixM3ypuMApR9c7nr7w68s1Nb+qv350V3OgQRbgREw52LCInjvoVJ78DAr+JFPBPNtMd/NmK1 gILCq8cTbbjxIgktwm6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt7KH-00EsYp-1G; Wed, 18 Oct 2023 14:15:09 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt7KE-00EsX3-1N for linux-riscv@lists.infradead.org; Wed, 18 Oct 2023 14:15:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C4231CE258F; Wed, 18 Oct 2023 14:15:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 465E0C433B9; Wed, 18 Oct 2023 14:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697638504; bh=14GQXwt2W7OgYXm3BLfldX+aT31k3vfoAlqbmW/xzcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lgYGAwgRWxMsckKEUqwOz7z+I27exn2vWDjtCuYDoXwDpRfKdIW6hoGs3tAvsVsyI X6+OaCjOT2znNCHu/HADbR0EJf3kxROOqSmkPx8ftt8Kf+pwNq+SqTdXSuatwME8d+ iqywj38M7hzCZo7wsBRZv3dfd+IQeFWVNyELkqv7UJnJxj44AcUwoCxtBhAe3cyn0V YHdIyIZhFmhXDEp+cgEsjW7Q1t0k1/zT4fMCGD75UsddhxGOQySBWLZajSKBPvfb0Z Gm77K8yEeai8sw3QFSg1soBf1wiLrLyz3Nc79N7XctcdNOAJS0Ojojx9YTslkcLJR1 Ewi6+OjgvTlvg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Anup Patel , Dmitry Dunaev , Marc Zyngier , Sasha Levin , tglx@linutronix.de, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 05/11] irqchip/riscv-intc: Mark all INTC nodes as initialized Date: Wed, 18 Oct 2023 10:14:47 -0400 Message-Id: <20231018141455.1335353-5-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018141455.1335353-1-sashal@kernel.org> References: <20231018141455.1335353-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.198 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_071506_640328_B58EFA97 X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Anup Patel [ Upstream commit e13cd66bd821be417c498a34928652db4ac6b436 ] 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 Signed-off-by: Anup Patel Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230926102801.1591126-1-dunaev@tecon.ru Link: https://lore.kernel.org/r/20231003044403.1974628-4-apatel@ventanamicro.com Signed-off-by: Sasha Levin --- 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 8017f6d32d52b..54c99441c1b54 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -109,8 +109,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; + } intc_domain = irq_domain_add_linear(node, BITS_PER_LONG, &riscv_intc_domain_ops, NULL); -- 2.40.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv