Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1843963rdb; Tue, 20 Feb 2024 08:33:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUyKsYzm2v9FwnCZ1DDobzEtlON0i4x4c0os//zowyuvuYFJCcCjIH7x14QLDmd4bC8j8O1EVfusxeg67cao3/Y3lWmedNULP/9+T1HXA== X-Google-Smtp-Source: AGHT+IHsZgqmn9W+u95N4Jq5gIfYSL/HDTR//h9ODxTzkAo8mYiq1pucwaHfuxFvAgNhAHAfeK5Z X-Received: by 2002:a17:90b:46cd:b0:299:48ec:1e83 with SMTP id jx13-20020a17090b46cd00b0029948ec1e83mr8829405pjb.49.1708446804988; Tue, 20 Feb 2024 08:33:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708446804; cv=pass; d=google.com; s=arc-20160816; b=yGPUszJZYme7fUlr+qfz38pH3wTbcaBqDnkkQ7SppTtcrDmizD7UK0BbOxGPVEK9WU LRLPqjtfpTNSw7/P/IpmqcI/ZrDJyqeGuHzpu7Pmxz6QeAnUHATsVeYcKShJgaSgsA4k UC39PGVkmo2TcQQ5E9M5K7fsAPhoZvnTbOrh4oSiJzfG+jS2bHl1rAAB2ibodrzzifa0 XctNnY+3xweOVKIJKt1tJVu443f5QsVNF93TkEvKml/IOBkp5zFdnsNNrGB+G9M2568p 7qGI21d9fEnWEXjb0SAH2GAWMonBOk+RHAcG184jVYdvmL7aMhwLm0D1RzVYhef/Rv4M RAJA== 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=IiCpFqPO/YFVtMSQiZIaMJWevt41KU4rXVeZn6KjaEI=; fh=9BQT37vl9RObNrh4DbXJ77VMc1kcyC+UVYttTQ6Wgoc=; b=oJ7xMLa4/CJ/m1XEY6cp6fg25KRN3XnaaQ2Hl8BIa9tXsQYzQ0AU7RUCt2g9ofAlVT tQayJ4KqyaEw5rhganiK/fXhczNL/mlpdM+SkvgPnVsfuAerD131ojbiKiko7z4KmjlZ H4XfHss4etS0zAJY2B+GcoLDwPpqfecQoAbdZ78TjakvNI6vfHMzWJxAo/EI8xOlGTV2 8sfgqz+FM9X1i6q4b32IsWqEI/GYn0NiLeDT/Qbjz+lmk282mqesMjXNnkwqO0xU2dCW 0QQZANX+Urqjxi6gu3gf2ZUn0Bqb8P9g1gN2EXLk9n4wMwKa8CIUiDox7DBccW6hpyD4 XovA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=w9rY6w51; 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-73364-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73364-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id nl16-20020a17090b385000b00299896ef3fcsi4396706pjb.34.2024.02.20.08.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 08:33:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73364-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=w9rY6w51; 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-73364-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73364-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id ABEB3282191 for ; Tue, 20 Feb 2024 16:33:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92B6D76416; Tue, 20 Feb 2024 16:33:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="w9rY6w51"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VwPDhjEF" 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 3DB442599; Tue, 20 Feb 2024 16:33:15 +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=1708446797; cv=none; b=ookeGdks1xsNYBe87UatrO4rqVjae76cK+/nrZ8EmdcMFa7CkkgCnU4BH9JSM2w5tfm317c8EoqfSpvgN01l4d/LO2anGh+6rZq84p3pB6JOmrDyBtrJHk2owrg3kIKjpTTaAEZuMUebErsiWuqXXOGDsfCaKSOa8fTVoZAPuUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708446797; c=relaxed/simple; bh=q3xOFmmgYocZ65Gcmtj5ydpXXT8KXajM7sCn5iFfJo8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tEvAAnR/wynzHwue3Kr3SjocRDMsBkWPIJV1uRRcBTirDzdKsO+Fe5nLv5ZXPbLDec/PhG8HRkL88TTt2Iqj6mS0W0ZF5//bHjO57UWELhP0Yy0NcSm8/yaiRhzkCBLcwePhZeaPPjh9kJS0ciu+mCoPiato74JxAHxIkn7KFEU= 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=w9rY6w51; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VwPDhjEF; 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: Tue, 20 Feb 2024 16:33:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708446794; 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=IiCpFqPO/YFVtMSQiZIaMJWevt41KU4rXVeZn6KjaEI=; b=w9rY6w51cVeLLoYUlm4l5Ixp6KmVzdBL3gDDSjkqvbHXCGEkZbC2OSqb8Z1oGa+pOd5mrH Ke9GsAorIkMMv2kmlA7t55exuuxgapgZiIaz599jSaMZY2vjZP7kd63atlIaIOnxKF1sq0 Di6pjEFTt6nB73Lt3F0bZnmgRYTNQh65jtLZvWlhd721QkV1obea9oScWUgDpTcsRvxrXv y/9XTRCZBR4+E8GrlNeQ6ZDd9UK0RdY5wZtqY1Ht8TpdGl/a7qXoCvVcBxve7qcWg84oi6 4OR5rl5CY7DxvYamYHpWMCYNUEsowUvUxwA6Q7meBRZp3kw1knlzBP0M/q2g7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708446794; 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=IiCpFqPO/YFVtMSQiZIaMJWevt41KU4rXVeZn6KjaEI=; b=VwPDhjEFw4yeGgBCltAWzMXn9G1KlTHBh+gIoN689UgyDZN/1I2m19mQVSWLe9GTDerJRw L/uJqJniMeWVc0CQ== From: "tip-bot2 for Marc Zyngier" 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: Don't call ops->select for DOMAIN_BUS_ANY tokens Cc: Dmitry Baryshkov , Biju Das , Marc Zyngier , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240220114731.1898534-1-maz@kernel.org> References: <20240220114731.1898534-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170844679345.398.17551290253758129895.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the irq/msi branch of tip: Commit-ID: 5aa3c0cf5bba6437c9e63a56f684f61de8b503d6 Gitweb: https://git.kernel.org/tip/5aa3c0cf5bba6437c9e63a56f684f61de8b503d6 Author: Marc Zyngier AuthorDate: Tue, 20 Feb 2024 11:47:31 Committer: Thomas Gleixner CommitterDate: Tue, 20 Feb 2024 17:30:57 +01:00 genirq/irqdomain: Don't call ops->select for DOMAIN_BUS_ANY tokens 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()"), ops->select() is called 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 functionality of the above helpers. Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()") Reported-by: Dmitry Baryshkov Reported-by: Biju Das Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Dmitry Baryshkov Tested-by: Biju Das Link: https://lore.kernel.org/r/20240220114731.1898534-1-maz@kernel.org Link: https://lore.kernel.org/r/20240219-gic-fix-child-domain-v1-1-09f8fd2d9a8f@linaro.org --- 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 aeb4165..3dd1c87 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -449,7 +449,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) + if (h->ops->select && bus_token != DOMAIN_BUS_ANY) rc = h->ops->select(h, fwspec, bus_token); else if (h->ops->match) rc = h->ops->match(h, to_of_node(fwnode), bus_token);