Message ID | 170802702416.398.14922976721740218856.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67630-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp87574dyb; Thu, 15 Feb 2024 12:01:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXO0xrJuC6GbYAuP9RKfzDbq3o5zu0+1cSfnRl/8mYYY+i56fKbdxshOQbBzTHVPOITUEyLqmzGd+mus50VV0F8h47EoQ== X-Google-Smtp-Source: AGHT+IG9qYZz3tAqMJet+PmFHo3ZUx9ja3YY9IxcyWz7a7zbsTXekbfq8OmDzNKLNzIS2HK/yVlW X-Received: by 2002:a17:903:32c3:b0:1d8:f071:5067 with SMTP id i3-20020a17090332c300b001d8f0715067mr3448174plr.35.1708027305527; Thu, 15 Feb 2024 12:01:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708027305; cv=pass; d=google.com; s=arc-20160816; b=M8m+WszwODqO4HwrdCZFiJaQRRs5+FamGqHGQ+2Ak9iuyZYjVpi/QQJJ+pxCkBpYb9 6RUNUmMMBe/olYNhI0S5KczNhqWkuVdU+9mp6kse3BIqPTdYMNsAMGfJBz4CbA75VdxH exG8NEvyPiRHVuZBoQZZ/sUzteN3tpBSOReC21sK7aTIS4wvNxeL7PEly51dCd9OjC2B CrydxzzgTUvM6cxtTr8PnUMyltsbUYyWlYbEYA/GQ5EIsxstDJWL3bWOOzGgjlTrpqM4 gI1YaECm/jRC33pSsqMmauXoLerOKvOTkSrV00+5pfZhFcp05tOU4jAPcmW6bFq2RwLi 0pcw== 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=pkttvpZ84OjjLQbqBM7oObYBQvlaxWVX5tMAj1EyouA=; fh=LU6lT0PDYxSjx39eUa7M+LyV2rE4/Fllc4BDCj6L/a8=; b=Zi2rGm2TibCk5KJDOEQy7NyJAtIuNSkuNxQNzopq5K9U2KzKvDB/bBVbli45X0Isvf +kzhLuMpkl8z3iA+uqOCoGAlCUDFbphpjVwE0vkP/NZe+UlxPqx03HU5uQW3Za+5PJnK wc3ozGehFeZ5vjjsPA16EDUuFyF3AOQHDVGFVe2JyeOzD/wmwR7nZyNJamw0+nnYe6pR 3OwDXGKS7UBWHqRhINxrSnXSR5tkbzqtBTKpy0S+I9ie84Dq7bVxC7FouFxg36IZZ5k0 aqlwfdV7I/SINGHehKFcK///sSWLcfQqy1I2+rklkaCMvUDsvcMh5HsGfkE9YmAkmQvW gpSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ReHzMhP4; 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-67630-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67630-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c8-20020a170902d48800b001d917fa8be8si1637807plg.257.2024.02.15.12.01.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:01:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67630-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ReHzMhP4; 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-67630-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67630-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0555028768C for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 19:59:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0A23146903; Thu, 15 Feb 2024 19:57:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ReHzMhP4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7nEKKwsK" 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 807291420DD; Thu, 15 Feb 2024 19:57:06 +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=1708027028; cv=none; b=a6CMy0+pCP4eVqytfTVkqpXAsO+0XTfyU3fudzGOi6MZ1v8V6yoQaBMqIFOSVBAZwxaU3fHet5Zgj53bu2K+Z699nU4AaJb0esmQ5ENw1f/FAQnUdEBGLXp8835cS9a/wQ2xaeppfEprRfnf8E5/UGmhV7GANyKj4Q5MI0AV718= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708027028; c=relaxed/simple; bh=B4B96r7h5333DHn3WdmqRjZ9Z+HqOlOwknn13elhplo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=UbzPvAZIv4xSRNmRTwIPYiaqsDgMhYwYZrm2/tqIHf8sG6kFs+4j0wd2XSa+/O1eirf7pIG4PxI2zGgr6Syyy++cshZAqCzSxefR+BwwZefsAQxBnlztDS8Ekfcfylq6M0Bg1R4juR8T3mSx5fMvnhAzr4Q6VXTddkDMNtOaMiA= 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=ReHzMhP4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7nEKKwsK; 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: Thu, 15 Feb 2024 19:57:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708027024; 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=pkttvpZ84OjjLQbqBM7oObYBQvlaxWVX5tMAj1EyouA=; b=ReHzMhP4JhZU1n1/5PUZirKwvVnZhFUCWyi6uMk8F+UR8sRVUlZSn9fD1/paK9VWUxLPmm 1njIotlhx9uS3eje26M8ZP0J44KPRQ1n+br+/6oWIColBS58GIorN4+n8yoBH3oBMPs23/ wrp+qb5UmeUPiGqTlT9HcqWX9JKSEUx27yoL7Rw0rcUJawlIQ0yVrgey8ey1qdYYK9LbE6 oryG5B+58lS72+i6ksBrZGUyVMLqJqfzXX2z4FKv/hb1K04kZjUmZGNMzptCgqdhN4LJEz rzDOXjyxcRONRLAQTteV6cGpdYoTOshHWzm201ggZl4WnF2MTVfwxOT1MV1saw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708027024; 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=pkttvpZ84OjjLQbqBM7oObYBQvlaxWVX5tMAj1EyouA=; b=7nEKKwsK23DCUm9fZtGhH3x8NAfl1Ymf30yydrXLOH9sLU4XuFTHojY3W1RY2qbt/tM+LE SdeQdgP8ayugnbBw== From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/msi] genirq/irqdomain: Remove the param count restriction from select() Cc: Thomas Gleixner <tglx@linutronix.de>, Anup Patel <apatel@ventanamicro.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240127161753.114685-3-apatel@ventanamicro.com> References: <20240127161753.114685-3-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Message-ID: <170802702416.398.14922976721740218856.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789261270358928439 X-GMAIL-MSGID: 1790996439875315732 |
Series |
[tip:,irq/msi] genirq/irqdomain: Remove the param count restriction from select()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Feb. 15, 2024, 7:57 p.m. UTC
The following commit has been merged into the irq/msi branch of tip: Commit-ID: de1ff306dcf4546d6a8863b1f956335e0d3fbb9b Gitweb: https://git.kernel.org/tip/de1ff306dcf4546d6a8863b1f956335e0d3fbb9b Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Sat, 27 Jan 2024 21:47:30 +05:30 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Thu, 15 Feb 2024 17:55:39 +01:00 genirq/irqdomain: Remove the param count restriction from select() Now that the GIC-v3 callback can handle invocation with a fwspec parameter count of 0 lift the restriction in the core code and invoke select() unconditionally when the domain provides it. Preparatory change for per device MSI domains. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240127161753.114685-3-apatel@ventanamicro.com --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, 19 Feb 2024 15:50:36 +0000, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > Now that the GIC-v3 callback can handle invocation with a fwspec parameter > > count of 0 lift the restriction in the core code and invoke select() > > unconditionally when the domain provides it. > > This patch breaks on RZ/G2L SMARC EVK as of_phandle_args_to_fwspec count() > is called after irq_find_matching_fwspec() is causing fwspec->param_count=0 > and this results in boot failure as the patch removes the check. > > Maybe we need to revert this patch or fix the fundamental issue. > > Cheers, > Biju > --- > kernel/irq/irqdomain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c > index 0bdef4f..8fee379 100644 > --- a/kernel/irq/irqdomain.c > +++ b/kernel/irq/irqdomain.c > @@ -448,7 +448,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, > */ > mutex_lock(&irq_domain_mutex); > list_for_each_entry(h, &irq_domain_list, link) { > - if (h->ops->select && fwspec->param_count) > + if (h->ops->select) > rc = h->ops->select(h, fwspec, bus_token); > else if (h->ops->match) > rc = h->ops->match(h, to_of_node(fwnode), bus_token); > > Dmitry posted his take on this at [1], and I have suggested another possible fix in my reply. Could you please give both patches a go? Thanks, M. [1] https://lore.kernel.org/r/20240219-gic-fix-child-domain-v1-1-09f8fd2d9a8f@linaro.org
Hi Marc Zyngier, Thanks for the feedback. > -----Original Message----- > From: Marc Zyngier <maz@kernel.org> > Sent: Monday, February 19, 2024 3:57 PM > Subject: Re: [tip: irq/msi] genirq/irqdomain: Remove the param count > restriction from select() > > On Mon, 19 Feb 2024 15:50:36 +0000, > Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > > Now that the GIC-v3 callback can handle invocation with a fwspec > > > parameter count of 0 lift the restriction in the core code and > > > invoke select() unconditionally when the domain provides it. > > > > This patch breaks on RZ/G2L SMARC EVK as of_phandle_args_to_fwspec > > count() is called after irq_find_matching_fwspec() is causing > > fwspec->param_count=0 and this results in boot failure as the patch > removes the check. > > > > Maybe we need to revert this patch or fix the fundamental issue. > > > > Cheers, > > Biju > > --- > > kernel/irq/irqdomain.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index > > 0bdef4f..8fee379 100644 > > --- a/kernel/irq/irqdomain.c > > +++ b/kernel/irq/irqdomain.c > > @@ -448,7 +448,7 @@ struct irq_domain *irq_find_matching_fwspec(struct > irq_fwspec *fwspec, > > */ > > mutex_lock(&irq_domain_mutex); > > list_for_each_entry(h, &irq_domain_list, link) { > > - if (h->ops->select && fwspec->param_count) > > + if (h->ops->select) > > rc = h->ops->select(h, fwspec, bus_token); > > else if (h->ops->match) > > rc = h->ops->match(h, to_of_node(fwnode), bus_token); > > > > > > Dmitry posted his take on this at [1], and I have suggested another > possible fix in my reply. > > Could you please give both patches a go? I tested and confirm both the patches looks good. Cheers, Biju
Hi Marc and Dmitry, > -----Original Message----- > From: Biju Das > Sent: Monday, February 19, 2024 4:39 PM > Subject: RE: [tip: irq/msi] genirq/irqdomain: Remove the param count > restriction from select() > > Hi Marc Zyngier, > > Thanks for the feedback. > > > -----Original Message----- > > From: Marc Zyngier <maz@kernel.org> > > Sent: Monday, February 19, 2024 3:57 PM > > Subject: Re: [tip: irq/msi] genirq/irqdomain: Remove the param count > > restriction from select() > > > > On Mon, 19 Feb 2024 15:50:36 +0000, > > Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > > > > Now that the GIC-v3 callback can handle invocation with a fwspec > > > > parameter count of 0 lift the restriction in the core code and > > > > invoke select() unconditionally when the domain provides it. > > > > > > This patch breaks on RZ/G2L SMARC EVK as of_phandle_args_to_fwspec > > > count() is called after irq_find_matching_fwspec() is causing > > > fwspec->param_count=0 and this results in boot failure as the patch > > removes the check. > > > > > > Maybe we need to revert this patch or fix the fundamental issue. > > > > > > Cheers, > > > Biju > > > --- > > > kernel/irq/irqdomain.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index > > > 0bdef4f..8fee379 100644 > > > --- a/kernel/irq/irqdomain.c > > > +++ b/kernel/irq/irqdomain.c > > > @@ -448,7 +448,7 @@ struct irq_domain > > > *irq_find_matching_fwspec(struct > > irq_fwspec *fwspec, > > > */ > > > mutex_lock(&irq_domain_mutex); > > > list_for_each_entry(h, &irq_domain_list, link) { > > > - if (h->ops->select && fwspec->param_count) > > > + if (h->ops->select) > > > rc = h->ops->select(h, fwspec, bus_token); > > > else if (h->ops->match) > > > rc = h->ops->match(h, to_of_node(fwnode), bus_token); > > > > > > > > > > Dmitry posted his take on this at [1], and I have suggested another > > possible fix in my reply. > > > > Could you please give both patches a go? > > I tested and confirm both the patches looks good. Please let me know the details of the final patch, so that I can test and add tested-by tag for Renesas RZ/G2L platforms. Cheers, Biju
On Mon, Feb 19 2024 at 15:56, Marc Zyngier wrote: >> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c >> index 0bdef4f..8fee379 100644 >> --- a/kernel/irq/irqdomain.c >> +++ b/kernel/irq/irqdomain.c >> @@ -448,7 +448,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, >> */ >> mutex_lock(&irq_domain_mutex); >> list_for_each_entry(h, &irq_domain_list, link) { >> - if (h->ops->select && fwspec->param_count) >> + if (h->ops->select) >> rc = h->ops->select(h, fwspec, bus_token); >> else if (h->ops->match) >> rc = h->ops->match(h, to_of_node(fwnode), bus_token); >> >> > > Dmitry posted his take on this at [1], and I have suggested another > possible fix in my reply. Your core side DOMAIN_BUS_ANY variant makes a lot of sense. Can you please post a proper patch for that? Aside of this I just noticed that we need the below too. Thanks, tglx --- Subject: irqchip/imx-intmux: Handle pure domain searches correctly From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 20 Feb 2024 09:46:19 +0100 The removal of the paremeter count restriction in the core code to allow pure domain token based select() decisions broke the IMX intmux select callback as that unconditioally expects that there is a parameter. Add the missing check for zero parameter count and the token match. Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- drivers/irqchip/irq-imx-intmux.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -166,6 +166,10 @@ static int imx_intmux_irq_select(struct if (fwspec->fwnode != d->fwnode) return false; + /* Handle pure domain searches */ + if (!fwspec->param_count) + return d->bus_token == bus_token; + return irqchip_data->chanidx == fwspec->param[1]; }
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 0bdef4f..8fee379 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -448,7 +448,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, */ mutex_lock(&irq_domain_mutex); list_for_each_entry(h, &irq_domain_list, link) { - if (h->ops->select && fwspec->param_count) + if (h->ops->select) rc = h->ops->select(h, fwspec, bus_token); else if (h->ops->match) rc = h->ops->match(h, to_of_node(fwnode), bus_token);