From patchwork Sat Oct 7 12:00:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 149561 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp885679vqo; Sat, 7 Oct 2023 05:01:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqrpIvsrJoMs3YjxQXdoe3e/4MlAH2Vm+Vkf/JgD7qiEMxIKVUbDi944FZHKr5qXDfA86z X-Received: by 2002:a17:903:2587:b0:1c7:54f1:337e with SMTP id jb7-20020a170903258700b001c754f1337emr9210289plb.33.1696680095904; Sat, 07 Oct 2023 05:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696680095; cv=none; d=google.com; s=arc-20160816; b=cadQ/2vmsuphMJ9UO2bmchBSWoPGzk0B2/pZnS5bfLgxORtfTixxMpXWHvYV3YmNr6 3z9IIw/1zDSa43kXABVdjQ4DSicap5boL+oEV6fqvZjLJM+bUHuYFhjAFOlYgg5XJIaK rGl+UB5dQQWpEEjlSPb26zVBLiohN6jv9GVfvd80xH7gT5hPWei8HKzZk+QBD3we/062 yn9njGHSH+z8KW17vPJDAfQ/eJj+EHJjx5UFm0+Sa0XojHl1MAJBWFspghUduotzfA6z zRqpmp4hICpsAhv7X+JTr9afyIUqYTdnfphWk08C/tRO5uqs55ctVZboT1564kNVyS5N MD0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Eks3FV3uvSfcZSrXuFTsbcqICww6h8jb0FfHip1B8p0=; fh=vNDxXQUxycQw0baSGDB0Anm1E4hfTV6CfgyACdRhCyM=; b=ZcRhc4q7vb3lQOrU5o7wtweuJLeArvyAHOKpz/yHt75Rs9jqtOYEF+QA7S3Jn01r/O j8z9SseS/GR/vphDtWpFxMpjXk3TbxmjtJQ8wR/DGdPDGSakjcQkvt20di0+0+n5HLxB pFkFhlL5PFtlFqfFEALyDlowxchLbKiga30HOukigBsgSz/ujZRPRJ8jKng5pgVlRGsX 0xM/MIBjNvW1OVWAPzT88/Ioar0ert3bttYn+pEBTy1u+1g/15kPP3sJfehoIi0XFoz5 Lm/I+Ygebk30T1otJtoCOX2N+c4CxxpKaeWuXE3R5rrLegBuYsL3myp53UlWqGA0P2WW vp0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cuL2sP7b; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ki11-20020a170903068b00b001b662f49f60si5547458plb.419.2023.10.07.05.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 05:01:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cuL2sP7b; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8FE0A80A1847; Sat, 7 Oct 2023 05:01:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343923AbjJGMAy (ORCPT + 18 others); Sat, 7 Oct 2023 08:00:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343892AbjJGMAr (ORCPT ); Sat, 7 Oct 2023 08:00:47 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0734C2 for ; Sat, 7 Oct 2023 05:00:45 -0700 (PDT) Date: Sat, 07 Oct 2023 12:00:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696680044; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eks3FV3uvSfcZSrXuFTsbcqICww6h8jb0FfHip1B8p0=; b=cuL2sP7bhbQuEWV8Ui9HNsshQZqV6OAMGSThp29ZEwO7yKKoIecsv+qTbBrg/CxomPySYx vvS2MlbI4y/j8oBG8IlGSK0FxYBf5Os/7ycNKQeymSd8xj13/mY8ka8qbABeGq7XmVYZL7 LnCwB96X3+o5WnuQSTzQ7sN89D7Ez0zkGWadZAP4+Rfy95A9jQcOlAq4oQ17/f1T5vcQXs gb49tJ3paDattvdj4lJZssYYatFbr0qM1814iDPERyT+XJt2uIIY9eNIh5Yfm/nGphZlZx dhiRTQMYWlFeE9276sEbHpi/8OgrEbgYNczwRWjfsHFw0EkZzqJSoPARH4/vBA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696680044; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Eks3FV3uvSfcZSrXuFTsbcqICww6h8jb0FfHip1B8p0=; b=tM7iMuFEyiwCWLCfr3v3kqIOWFqg1v4MV52eFilf1+WC1JIdVawfDz2DLmKyZBHggSe10P Y/lNXHddUwpWtIBQ== From: "irqchip-bot for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-fixes] irqchip/riscv-intc: Mark all INTC nodes as initialized Cc: Dmitry Dunaev , Anup Patel , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230926102801.1591126-1-dunaev@tecon.ru> References: <20230926102801.1591126-1-dunaev@tecon.ru> MIME-Version: 1.0 Message-ID: <169668004402.3135.14972053144849513086.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sat, 07 Oct 2023 05:01:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779098028604993122 X-GMAIL-MSGID: 1779098028604993122 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 AuthorDate: Tue, 03 Oct 2023 10:13:51 +05:30 Committer: Marc Zyngier 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 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 --- 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)); }