From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B2F3C47DD9 for ; Sun, 25 Feb 2024 17:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bJ76BHLbR3GcZQ8Qvlo4Uod7rDF5GfuDF9u1+MzV4S8=; b=rGOoiswk+lhXzmfYwTODlGhVd5 SnCjbflvTnhJ99HMyM0cPZIzajhyyv20xr/hzRGzQLORTa23shd1DwLE/sDEXlnF0xFv87+S7u7pk 71QvbxoaxQFGEYkk7WR4fCCuv1LYfWX9+HUv+ik18xJM7MB0rBaeW5YlzU1jtrFVebUswvfyFH/vW uDm09ySp7fejK3/5osHAX8+moRptFg60tzYSyb4aHd4uImcWmUVvs3+EAWYg+wlZkMx5F0ucqmHne CZQLJzsDjn6cW/RAToRfxx0Z8hokIVU/lrZddQXeVu0cBodmgam4BRzXKwe7qAabniV3r7r7/5fk6 l3YcRSmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reIDs-0000000FOdn-3J54; Sun, 25 Feb 2024 17:23:32 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1reIDm-0000000FOdL-1JYr for linux-arm-kernel@lists.infradead.org; Sun, 25 Feb 2024 17:23:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 81A1460A6C; Sun, 25 Feb 2024 17:23:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2636DC433F1; Sun, 25 Feb 2024 17:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708881805; bh=n31uvN3EKuNhBVZlFx/PskpErcQNgwBocvUs9RbSYdg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RpiRkISUdj3iEqSwXNudFslC9mMhLzKP3W5IvtmX5LMpaMQw1DjyadIng4AKgYcFs 4UFGym95EpeHutT0kLuqNyW5pYQD5JcPCPo/3khiDQLXxY7JRIHMeEb73MjiFX5pts 0v8Lue0CzdySt2FXPBQdcEwneVDK52DS0ZyXBjB/e2MJQowDU2oHjqraP4Jj6Io9bI /ZNyrPaH4MtV9aakyCw5z3LTl6dHFt0q5XBjA3zPxIzD6TWJCbIGsiBRjAFa0Mcv9T ov706avBCJE4M4C6ovbQNzE4VwXOKbWFvGU+rbVibG2ZKGzsBDyQHX4gJVpo/YhF9M ztP1wNI5WVTxw== Received: from disco-boy.misterjones.org ([217.182.43.188] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1reIDi-006bWb-PT; Sun, 25 Feb 2024 17:23:22 +0000 MIME-Version: 1.0 Date: Sun, 25 Feb 2024 17:23:22 +0000 From: Marc Zyngier To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov , Biju Das , x86@kernel.org Subject: Re: [PATCH] genirq/irqdomain: Don't call ops->select for DOMAIN_BUS_ANY tokens In-Reply-To: <878r38cy8n.ffs@tglx> References: <20240220114731.1898534-1-maz@kernel.org> <878r38cy8n.ffs@tglx> User-Agent: Roundcube Webmail/1.4.15 Message-ID: <6792b2913a47b6ceb5650cdde3deecf2@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 217.182.43.188 X-SA-Exim-Rcpt-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmitry.baryshkov@linaro.org, biju.das.jz@bp.renesas.com, x86@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240225_092326_479923_22808633 X-CRM114-Status: GOOD ( 19.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2024-02-25 16:19, Thomas Gleixner wrote: > On Tue, Feb 20 2024 at 11:47, Marc Zyngier wrote: >> Users of the IRQCHIP_PLATFORM_DRIVER_{BEGIN,END} helpers rely >> on a fwspec containing only the fwnode (and crucially a number >> of parameters set to 0) together with a DOMAIN_BUS_ANY token >> to check whether a parent irqchip has probed and registered >> a domain. >> >> Since de1ff306dcf4 ("genirq/irqdomain: Remove the param count >> restriction from select()"), we call ops->select unconditionally, >> meaning that irqchips implementing select now need to handle >> ANY as a match. >> >> Instead of adding more esoteric checks to the individual drivers, >> add that condition to irq_find_matching_fwspec(), and let it >> handle the corner case, as per the comment in the function. >> >> This restores the functionnality of the above helpers. >> >> Reported-by: Dmitry Baryshkov >> Tested-by: Dmitry Baryshkov >> Reported-by: Biju Das >> Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count >> restriction from select()") >> Signed-off-by: Marc Zyngier >> Link: >> https://lore.kernel.org/r/20240219-gic-fix-child-domain-v1-1-09f8fd2d9a8f@linaro.org > > Bah. That breaks x86 because it uses DOMAIN_BUS_ANY to find the MSI > parent for a fwspec (IOAPIC and HPET) which gets either picked up by > the > interrupt remapping or by the root vector domain. > > Fix below. > > Thanks, > > tglx > --- > Subject: x86/apic/msi: Use DOMAIN_BUS_GENERIC_MSI for HPET/IO-APIC > domain search > From: Thomas Gleixner > Date: Sun, 25 Feb 2024 16:56:12 +0100 > > The recent restriction to invoke irqdomain_ops::select() only when the > domain bus toke is DOMAIN_BUS_ANY breaks the search for the parent MSI > domain of HPET and IO-APIC. The latter causes a full boot fail. > > The restriction itself makes sense to avoid adding DOMAIN_BUS_ANY > matches > into the various ARM specific select() callbacks. Reverting this change > would obviously break ARM platforms again and require DOMAIN_BUS_ANY > matches added to various places. > > A simpler solution is to use the DOMAIN_BUS_GENERIC_MSI token for the > HPET > and IO-APIC parent domain search. This works out of the box because the > affected parent domains check only for the firmware specification > content > and not for the bus token. > > Fixes: 5aa3c0cf5bba ("genirq/irqdomain: Don't call ops->select for > DOMAIN_BUS_ANY tokens") > Signed-off-by: Thomas Gleixner Looks good to me. Reviewed-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel