Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3055306rdh; Thu, 28 Sep 2023 00:45:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7TQJuzj/WFwobUOSQWUaI7zXXWaAEiJMvAm3Fkgwfd/UkOqQ69vjUx5+aCO6E9b+ETAT1 X-Received: by 2002:a17:903:2348:b0:1c7:1f3f:b6dc with SMTP id c8-20020a170903234800b001c71f3fb6dcmr545364plh.11.1695887125132; Thu, 28 Sep 2023 00:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695887125; cv=none; d=google.com; s=arc-20160816; b=AtDqYR0PBu9U+hIx4N5FAYwC6os8U+fbiI46feZRDYHbQE8Ks8wMjWrHtypVGPgxN9 YnJ5WK3dOfnbT+ReMMis+SkBJVNkJ8cbpVQq17ezaHin4+7CSJfRgrbaWUTMmIy5melf P4QH1eFNixOBJcOkALIjIYye0Lb9UmxKD71D2XKMryr/DAf4DziXsXVJz2iqdW7gmM8+ RR7WF77y/mXFizG3SJaalljTuaBKPn8zVkMdC8Ne2jP5g6bBIyaj19eOxaiqebF8Xu1L Kj63VFxMsQohbXelaTLCJ4bra5WOhgeuEzj3UGqABXZvA4ojV0UZr4B7ncl4eZkldwCC vbYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=STPmpWfv6fDT1bub5fGqVvG8FTLSWrxke8YCaHE+OKo=; fh=ZYtQOaPQ3bv/nEoeNBBJi+8gjEgXnsUn5nizHK4ZU74=; b=uYlQbeG7wciYrIze8r3RGqIDzNha2WRQcLJ8jxO2iZEaAJ708fayMKlzilIm0zZejB s5FW3a9pUUJTeRo7Y2QxehTVkcGEeDDTp/fXaWLkqStkwn10Nt3FNjPiUDgyqhvPwV73 jKzg5tGqEnvAao14YBcroviGTKezm+fIy9ZEkOXRuf+qYVMsnIOpsfjaG0wDxdpsQWm5 GDtxSTjiZXRNTx4Fvx1bgWLbGrOGmiQpk05Yk3gOG0jRcc7/Al2to3H9LWzVlecUmluB UaLI/1aWihTroq03qpJpi8/EnAafULS5QynhBEl6Q26AeXBDyAqjyWRNrkApuvdtv99m Ymzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=NJ0zPm70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ka3-20020a170903334300b001bddcd8c6acsi16561316plb.311.2023.09.28.00.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 00:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=NJ0zPm70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BDBA88057E7B; Wed, 27 Sep 2023 23:13:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229445AbjI1GM4 (ORCPT + 99 others); Thu, 28 Sep 2023 02:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbjI1GMt (ORCPT ); Thu, 28 Sep 2023 02:12:49 -0400 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7E4519A for ; Wed, 27 Sep 2023 23:12:47 -0700 (PDT) Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-35135b79b6aso25416225ab.0 for ; Wed, 27 Sep 2023 23:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695881567; x=1696486367; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=STPmpWfv6fDT1bub5fGqVvG8FTLSWrxke8YCaHE+OKo=; b=NJ0zPm70Bw9b9tKvA8yFHtLtCak0iQMnq/F47X3U+s49WFF1EAjZRmYV41gElzApPD bvPs7GGbSgxF89IDARwTyl4RhurnCq/8OlokcvJiM2MWrEtlT79HaSZIjBB8tYlmJ1/0 9YeRNBg2DFVuNg6NiTRPOvWfBsT3zQnQLmB4Ocy9qM6XXJJKY7oCIwx4eT3PGFec37Kk yihFnvkSHTD51aH+MDELolpKN9D+WmARM+Vicg+iSaF4IvmWLT1+uSBIEo4hxM3z5/Zr ZNqn3fFWUYuDp1FxndbyV5pYjZH1tANegqZdJeL4vpZqI8CY6wnnOn4bm3SuUv/+1dDf orBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695881567; x=1696486367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=STPmpWfv6fDT1bub5fGqVvG8FTLSWrxke8YCaHE+OKo=; b=KxMFUm6bd1RTfjRi2tv+AOYl7GUtTpYxEVBJa+T+9EdBSoURv+Gzq8Dl6DEC7OySfu z0YIn5LVj/CDJ19CkRPXRLot8rCBpHA5U+Qh6eV/lCpxmfjBd5Kx6aS6hBJV79EFjnnK DjrbtTH67jAcPBG2UjpSxtEPTn6BJeNU9gLlL+t4Ao9Y7EyYuWnZQs0kgCkDMUz+BoMm aOzh8J0QFDDCKtO54cQQZ9JgM+DJZKLW1c4Y9w5xy3Mjb2OMGYTGnqPWya6NKlZCoJ6G 3lKeDvfkJT25Tg3WUkLaRAtdA7j1knkV2oPL5KErIWO57ARgfiIjbd1zUgI3YlGwGbfr vr2g== X-Gm-Message-State: AOJu0YyCApfg/DNCvc1F5sSksmzhdeYtfRT92XKI2pJ6hobtzdIDwdHH rjZPqhJfLKk6tm5Snzl8LezFkg== X-Received: by 2002:a05:6e02:1c42:b0:351:211a:e86a with SMTP id d2-20020a056e021c4200b00351211ae86amr313596ilg.17.1695881566999; Wed, 27 Sep 2023 23:12:46 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id x6-20020a92d306000000b003506f457d70sm4774467ila.63.2023.09.27.23.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 23:12:46 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley Cc: Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel Subject: [PATCH v9 03/15] drivers: irqchip/riscv-intc: Mark all INTC nodes as initialized Date: Thu, 28 Sep 2023 11:41:55 +0530 Message-Id: <20230928061207.1841513-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230928061207.1841513-1-apatel@ventanamicro.com> References: <20230928061207.1841513-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 23:13:10 -0700 (PDT) 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. Signed-off-by: Anup Patel --- 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 4adeee1bc391..e8d01b14ccdd 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)); } -- 2.34.1