From patchwork Fri Feb 23 09:43:55 2024 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: 205255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp478878dyb; Fri, 23 Feb 2024 01:45:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUgFgqyOqKwB6TYIL3Mthsi7DggaM2wx+ydKqc6ORJa1rpMssTRGjsHNQmSXUWuGL+enP6Ij1+Q5JeFIJan/XvoG3JgGA== X-Google-Smtp-Source: AGHT+IGaHPKIhLWa5aIE8Giha4IxD0Eul/113WmyN7nQ1EjySObhkMnhOfNjHIu8OG08IHFj4Wwi X-Received: by 2002:a05:6808:1289:b0:3c0:3bba:1036 with SMTP id a9-20020a056808128900b003c03bba1036mr1321215oiw.58.1708681558614; Fri, 23 Feb 2024 01:45:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708681558; cv=pass; d=google.com; s=arc-20160816; b=tgiEtrDjeDqjpTCcU4JYwI+mi0FqNOEZ6R3uiNFYp4vw7tWdYG3fDLAOFwOm8M12zQ l+FD4SJF6kGBZ/UCJzSib1133z2LVF7KrAhOlWqmcBUkDn3H/CdA0lgsXAk1n8NGBa4e knlYiwQgZDCQuHjiHKDWMazMH9xVDxa8RLLK7IfS5OD7GPIRL0IrHc5UMK+8qAqGiZen mH5rpYlf3HHQr+pPmhFzvEjgUYZBpL+t4gRTuggJnPvwR5CeZkFI7MEqUp1WVjmunmjl TLsu7s0wBgqvZb/UELwZx/EJdbrHD81V/qCFzo184pLMbuiSUOVVTDjLwg4ngsjpX9ja /9ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=FYvcA3L3zb8ljbTPM4WuVk9ouPcZlIpmvcUp9ql5yrY=; fh=546OEPtoZUYjWwSPOd/hX3L3p6biPmSjgTUnSRYaJpA=; b=KgEhYlCr/zTccabUSlMcjvInOkG71EtfL1iPAqwsm23G9rO83cf4Y2lkO9VHKLQMMq qBIFSEm/yw9o/LSYzqH33NhADHK/2QzQQfScXaCa1V9w7eQqrUEAXi8yiBPeFwPBLVgk qaC4K2XidHAHHTITc47oEmNWAcKkreAY/UIokFTcqYjVntIKXsgDbK8gR2DAZ8JJYYQm yiHAyH89J0DUrGpiLS1KuPUAAXhqlPbQbr0hvKy8houRVLYX23ZTw5hxa+ND/eIKyaHo u1KHPx7NzrronQqAp63dsF3qZWd8HgibmRwrJ0u0T73j/aUXPJOg1khgyge2kP2piUqe fuFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yylbvwLu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-78052-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78052-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w16-20020a05620a445000b00787236cdb49si1207688qkp.649.2024.02.23.01.45.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:45:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78052-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yylbvwLu; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-78052-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78052-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3CE681C253A7 for ; Fri, 23 Feb 2024 09:45:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F8DF5D91B; Fri, 23 Feb 2024 09:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yylbvwLu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="30kf3p2a" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2795F5CDC0; Fri, 23 Feb 2024 09:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708681444; cv=none; b=mrEoZ14vnXu3MI59zy+LcsQsPbldQ4S7ohJXZ04IN4+YC3lT8OYtjG7RDoouYzTXv7ieGsVSy1MKjiVEWWk7fh3QjFpeBFFtirhKnjtWuX1KSctXBk/S8GVSP7CgtqaDX3Cp0ehBtztBvZdFPYlY9xH+h/hUEaWScWlLBK1oDVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708681444; c=relaxed/simple; bh=8feJWVA7p/+z8RsG5iMN/dzMMMUdnlPOTNO9Crw6kl8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=R3mcfeY2h6Z2tmsoxC2kAvy9IXu5CYPDTJtXr+x8wjsK9UoHZI0nDp1vA7czbnsIE0aFYXgC68XxY4cYp4+l+sGsQhFSjNmgbnKe5h41y+Hrb8DQJqqvSbVdTYpaOMuF2UNzY6D8o7QBxgRLGdlYwSevA/2WCSR1M+PJlqIRWrQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yylbvwLu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=30kf3p2a; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 23 Feb 2024 09:43:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708681436; 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=FYvcA3L3zb8ljbTPM4WuVk9ouPcZlIpmvcUp9ql5yrY=; b=yylbvwLu+WbJ5r9vtxXALuoP/S2H5r04mRX3/athaTd76qBaj4QwqNHsBLkcCWTuOEZWyG /4MAUL/hXxcOeY6LrSpHaMkq75hg4FkKBMKrJDagHfrSunkddR2TMQddxoc+aSFJzHPiZz LAyFTNoGb+XHz6YvYx3h0Ki1x7o6hbUnmjPBAP30HuTHr5ZKeyLOoLLMnk7mUts6YL7HTS ZCUFq4cZaDtjKmLZfdleVbS1ytwpqlrYp3MiQZ4tg43dseUS/lo0fMTL0fBR3wyU9U3oIo 9qd+J728ju8tBR+d7of7tfftQ9iSfa3vZ8XE7ONW9JEvF5O2XMHZ0TSnsXUrbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708681436; 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=FYvcA3L3zb8ljbTPM4WuVk9ouPcZlIpmvcUp9ql5yrY=; b=30kf3p2a4KmA/W8+alFkulu+pxreIaeqxjRQ9r8Ev7D/yELWvXY4M2pKlyP4GsXtkJKsJN XARNTjXr78442oAQ== From: "tip-bot2 for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/msi] irqchip/sifive-plic: Use riscv_get_intc_hwnode() to get parent fwnode Cc: Anup Patel , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240222094006.1030709-5-apatel@ventanamicro.com> References: <20240222094006.1030709-5-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170868143581.398.2923102025107113775.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791591622501386437 X-GMAIL-MSGID: 1791682474027174740 The following commit has been merged into the irq/msi branch of tip: Commit-ID: 6c725f33d67b53f2d302c2c4509deae953fc6ade Gitweb: https://git.kernel.org/tip/6c725f33d67b53f2d302c2c4509deae953fc6ade Author: Anup Patel AuthorDate: Thu, 22 Feb 2024 15:09:52 +05:30 Committer: Thomas Gleixner CommitterDate: Fri, 23 Feb 2024 10:18:44 +01:00 irqchip/sifive-plic: Use riscv_get_intc_hwnode() to get parent fwnode The RISC-V INTC irqdomain is always the parent irqdomain of SiFive PLIC so use riscv_get_intc_hwnode() to get the parent fwnode similar to other RISC-V drivers which use local interrupts. Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240222094006.1030709-5-apatel@ventanamicro.com --- drivers/irqchip/irq-sifive-plic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 299feef..208fad7 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -423,6 +423,7 @@ static int plic_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; unsigned long plic_quirks = 0; struct plic_handler *handler; + struct irq_domain *domain; struct plic_priv *priv; bool cpuhp_setup; unsigned int cpu; @@ -502,11 +503,11 @@ static int plic_probe(struct platform_device *pdev) } /* Find parent domain and register chained handler */ - if (!plic_parent_irq && irq_find_host(parent.np)) { - plic_parent_irq = irq_of_parse_and_map(to_of_node(dev->fwnode), i); + domain = irq_find_matching_fwnode(riscv_get_intc_hwnode(), DOMAIN_BUS_ANY); + if (!plic_parent_irq && domain) { + plic_parent_irq = irq_create_mapping(domain, RV_IRQ_EXT); if (plic_parent_irq) - irq_set_chained_handler(plic_parent_irq, - plic_handle_irq); + irq_set_chained_handler(plic_parent_irq, plic_handle_irq); } /*