Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1602893rdb; Tue, 20 Feb 2024 00:56:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUfux1GA4b0Z8NTfTpoBnKYc3CCrLTMI6nhb8Cc7/kBkWZCrMsjJ/AV4dAJU+rS16Z1Hue31qC0ZUFtk5bABxmSJDVv7qrrngUGREHEw== X-Google-Smtp-Source: AGHT+IFAYtP3sNRC5jYx7V/bL+ckUjbYHqfrVwQ6oRsA2uPNpKwmCtrOJmsarjCbNg+xM45GVoNy X-Received: by 2002:a81:ad16:0:b0:607:79c0:6e69 with SMTP id l22-20020a81ad16000000b0060779c06e69mr15473172ywh.26.1708419395464; Tue, 20 Feb 2024 00:56:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708419395; cv=pass; d=google.com; s=arc-20160816; b=I/H8heKnVGum7IQFXjl5Thyqmg9AId+HZzWiQGqK45lbs9UezqOcoziscxKifhO7oq qprlwcK+pM/OaJk8Yf+By0BRETdBTAywrrIoQ6vUJMmopDhuc4uCBVz3BfuWyOx7y02t ondw/CcWfU2PnN8ZG7Qk5h/FXmhcaYV868XgwLqOJaFjbblFN1wJ2/nZ+x/+snNlinrD eCjwuVonP8ENEMxi/DuUOzDF6i2zN/xWe7jiJSEXmVyOPdEbJDwRr/ZOC4YfiJ/mirk/ ptKEGCXxpq+sVRL6/it4SmBsfL+K4VLQalKl3ICV52r7Pb78jp869TvioqdIVwvXvUOh jK9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=zt6WFPspTPLISjJDNaV2xke6NbP8x70UX4LyyABHdak=; fh=mLypfe98pJJ9LXnkJQkVYLReOEJEJKkNKYHji74Gq+U=; b=VWYzmuJLAnfyrQgDwO4RT9ubm43L6LKaz2MJRI/CNatj326U70OoLMlI1iFmlEMCya tW6wRRGPdghr1C9pI3WkyZiLPv+1GFujw5eL5cUpK1MiN91F5RYlDm54jugp8mi55Xu3 RMr8K85CFeaVn8CZiAQTvW7pG87tXVfcQuZrxF5tqixLk8Lg/YGeR02oQrxjDEdIw8Y3 9OSVr+WfMQ7E6F8ZmG6iCT+c//CAc5i2pJhWFabABbsxv5GcmPh5O0w5cCZBI3PczFPx oFcqCRwh8tP9GKPWz7DeT69OaiRgSZUVc1ukSw7CPNEWzAisrLa+mlJM9i/hTEnnmTmC j1TQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OOfiOZKh; 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-72602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e16-20020a637450000000b005e428bea40esi479945pgn.0.2024.02.20.00.56.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OOfiOZKh; 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-72602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72602-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 84FF4B2297C for ; Tue, 20 Feb 2024 08:51:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D499D5FB99; Tue, 20 Feb 2024 08:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OOfiOZKh"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YA6lRw+q" 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 6657E5D8EA; Tue, 20 Feb 2024 08:50:27 +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=1708419028; cv=none; b=f/AVkBTnflQYgKFuf/PNwnQaky2lcihjjwcC/S5u2f1MefnW6zv76RwFjYQ7xizMQJUrkJtu/sQHJ36USV7tXEytIYI7Qj12Z2R/iQsWY/InkCLOx1HjRutygZx7LxYTjj6kzDRFGGj7uAuCiLw+qz5eK9ta0ECRnYnl75v3lZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708419028; c=relaxed/simple; bh=lyAH928PklVqNohvkdzHA4O3OK69l5xGYIh69vxcF8I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=WNLhBZGClS5/8bVIF8IP4grYe0uuxJyw7O1ishEGTd9iNL2UdP9+GQH+MW26abYmiPRwJc/N2zCPH82f/8jQc8pI2ECOo7OO5j5LjuaABbUMDTzvzxAau+XdCyDm/jeEVRmrSAUPbitCTn8SX2nYou9H1rAZ7XdcVZ8sZ1tihpE= 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=OOfiOZKh; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YA6lRw+q; 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 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708419020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zt6WFPspTPLISjJDNaV2xke6NbP8x70UX4LyyABHdak=; b=OOfiOZKhXJ/Is3rVi6vnkx4XchR0rOCqc+CsLpZgA4h7Tq5t6EBqgB2d0MbCi03VPjn53Y s6aAhUAs7gQl9t5j7eD4oNPYj+qgBOm98DYWkskbPTiUdZZbYhSQNLyz2k8LgW5bM/P9Z5 mKIL4jtJsPJ+KKe8d2/JkErCF1DJ79Bwo1YNfCK6mGt2H+3fCO+7BQ3lGsxQ7VdIfWBm6K 4FsnSNNUmgIENHVaYdE22mhG7n8uaWm4Ot+0U+sXiRGL0pBZNoJZ3NUajtweJE95Kb4eU4 4j9/KK51jH3aEtMtzfDxEWOohgDp2sgTt3LW2EzSeQqNMkHQIxXsOTB413yXZQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708419020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zt6WFPspTPLISjJDNaV2xke6NbP8x70UX4LyyABHdak=; b=YA6lRw+qPSdpDx9hcr+psBv5van3e9vSZXUswhnBc1qk+vDyoFH9Gv2DF2PfTHW9wVnuxT oMyiIuw/x/SYERAA== To: Marc Zyngier , Biju Das Cc: tip-bot2@linutronix.de, apatel@ventanamicro.com, linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, geert@linux-m68k.org, linux-renesas-soc@vger.kernel.org, x86@kernel.org Subject: Re: [tip: irq/msi] genirq/irqdomain: Remove the param count restriction from select() In-Reply-To: <867cj04fcl.wl-maz@kernel.org> References: <170802702416.398.14922976721740218856.tip-bot2@tip-bot2> <20240127161753.114685-3-apatel@ventanamicro.com> <867cj04fcl.wl-maz@kernel.org> Date: Tue, 20 Feb 2024 09:50:19 +0100 Message-ID: <87ttm3ikok.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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 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 --- 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]; }