Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2752437rdb; Tue, 12 Sep 2023 10:57:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0vYN52/u/QZ652YykUeWllJr1j0+B0IE1YKf/mWJlzZERVKVan5kHTUnOuGVwbBW4/7Jb X-Received: by 2002:a05:6a21:3e05:b0:154:d3ac:2063 with SMTP id bk5-20020a056a213e0500b00154d3ac2063mr132634pzc.27.1694541449842; Tue, 12 Sep 2023 10:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694541449; cv=none; d=google.com; s=arc-20160816; b=grE2kHIaD0xYzRlL7KLhWxsgRdKdwp21/QUIBCYX2GLrCPe1VfUv9Dgn9qKQ4AHOZf ICwBOQgDFf4SwZ1ysx+ErZwSJcvdE6IHqUuHFOzUP9ZmJerLfs/PTBz4pOAy+8Ykj3Lw 7qWXYoMT9AenTw3io08HEpqQDO0K6HvqU034H0ZpWBXwNATXpmol7BxI8uOYlx1T7gc3 cEk7I3LOYLn7AaMkzHzENVW1Lk92sDLH7sPvrcfNcB96w8wwtC16FRJD576E/iuIdqPl LNJnl2kg15E4j4GAtek4WgRncZGVGKJoiw3dn0XncEEIw92ETcQ8AZtB0ziCDF4rd4f2 1rlw== 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=oQiwHLQTp/8j8gItu3f4LCSePQxOFgN8ncFMh196Onk=; fh=ZYtQOaPQ3bv/nEoeNBBJi+8gjEgXnsUn5nizHK4ZU74=; b=J+079Ls0qnYXdGTL5g9riVLODLbAyvOBmkVizXUzpzY6MJ1VNltjvjXpKOeWjA33d8 6Z/I78MkMRJc5vPSbevmG/3KlzUG87lXYNPAed/uQCI+0UO7QeYctLwN05U5qRyA3qrx AILBFhoRjtgNbXXPT/MqAmD7aSQrXcdckWT/5lp/Wj4qN90hKZh+XEnY2G5a01ei7ooq mm+74vG8IjTO9ukCxPKaTijX53aq6PztBQn0/e5BOusaKnDlqyZF7ljIWgFD9qEociiM 0sEggXgcDNKGUkgkYvuJoP85LHUmnYbdxmO3k0DadErChBM6C0ZWDKag4vcO89W3l35v XbZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=o8oicXFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u12-20020a170902e5cc00b001c353153012si9024931plf.415.2023.09.12.10.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 10:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=o8oicXFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 7084080CF50F; Tue, 12 Sep 2023 10:50:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237037AbjILRuv (ORCPT + 99 others); Tue, 12 Sep 2023 13:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236837AbjILRur (ORCPT ); Tue, 12 Sep 2023 13:50:47 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550D81706 for ; Tue, 12 Sep 2023 10:50:43 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1bf7423ef3eso44418365ad.3 for ; Tue, 12 Sep 2023 10:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1694541043; x=1695145843; 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=oQiwHLQTp/8j8gItu3f4LCSePQxOFgN8ncFMh196Onk=; b=o8oicXFZRIf/pt60zd/YZysbGGj4Xr3aPhFkPQGUR/qXmkUayQMcXt5H+KJbGCNxQG TMjL01ISotYVOZsstGcnqIOM8KDdVqtYJ1Gm/e01OVTCoVIq/nLh0SZ0R39CD7QSbfIt 1FLEkNQ8lfjRShLAD8NTHWbJX1/OPCgFZVWUs9Z6uaTtHE9l5ewN54cdRjMQGubq0Csj iPB9Yet+wIlXUg8E4whTYFpkuC+Xh0ohtrUz/dHIj2BuJDLCp3BwPVqYP0XLDfZBgTQi 2x6miusK5lQew3ViMrVq14/Whvhxoeoi/Ue4Eugj/pWk+jaIU0gYJ9ltzJKdxB8eeCid 4DrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694541043; x=1695145843; 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=oQiwHLQTp/8j8gItu3f4LCSePQxOFgN8ncFMh196Onk=; b=hZzV14Sj5ETK7MHuxJDQXyJSh9AC4U4/zNr3mi3k417iuFuEvSan0o96o7aL9/Fz1R kKpPQ+JNA2R9bd9Xl03oYknZS7PuW3p2DjBSJgjLsKeAB1lELS6zqFAr40r6usDDBLZe vSIY1bNMT5rQhH9ggJS4VgTVVpSff+mJAPw1fYPsW4j79rMfiwUx7Us0NJdT2e24+vhX Z940nm9hJEOnU7cj3frLsV/VntHcnmCHHG2RpQKHAWQd5xtr8pHyKHYEmB4PlFEYmhWM Kt+8O0jJIzpne+wmYHrgUq2KTXBWiUgBu0UkdQq9+J/aWglOkRZWzPpGqB+OV5HdEUV+ pRxg== X-Gm-Message-State: AOJu0Ywj5e9kx8ESb1zbsmk19JIY4jVVMZWa3ItEny4EV5DvglULoxra tWsanUo9CNt5lDyHhv/Cr3/o9A== X-Received: by 2002:a17:902:e812:b0:1c3:39f8:3e71 with SMTP id u18-20020a170902e81200b001c339f83e71mr544767plg.18.1694541042718; Tue, 12 Sep 2023 10:50:42 -0700 (PDT) Received: from localhost.localdomain ([171.76.81.83]) by smtp.gmail.com with ESMTPSA id p12-20020a170902a40c00b001b891259eddsm8691440plq.197.2023.09.12.10.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 10:50:42 -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 v8 04/16] drivers: irqchip/riscv-intc: Mark all INTC nodes as initialized Date: Tue, 12 Sep 2023 23:19:16 +0530 Message-Id: <20230912174928.528414-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230912174928.528414-1-apatel@ventanamicro.com> References: <20230912174928.528414-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (pete.vger.email [0.0.0.0]); Tue, 12 Sep 2023 10:50:57 -0700 (PDT) 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 pete.vger.email 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 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 65f4a2afb381..4e2704bc25fb 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 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