[tip:,irq/msi] irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count
Message ID | 170802702482.398.14573562660062119117.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67631-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp86580dyb; Thu, 15 Feb 2024 12:00:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWypMZequOlXGf5sYJldW29nT4eyPTzkHAGBpnxUXTiVHAS618w7AyTVtakno+rShKUCERAXPXPeOJ88STr+fRYpAuRRg== X-Google-Smtp-Source: AGHT+IE6BkV0fjk1coImWdooZ8ggxPPoX/awYbzlHc38hUxouZ+dGejpfn1diGF2F1z2n3A0LYeq X-Received: by 2002:a05:6808:1410:b0:3c0:32d1:961b with SMTP id w16-20020a056808141000b003c032d1961bmr3463089oiv.7.1708027231476; Thu, 15 Feb 2024 12:00:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708027231; cv=pass; d=google.com; s=arc-20160816; b=qs1yjaoDtEZN8m8+O0cG6tI90CtHe7GW7Il6BkaklzcH6iD+VH7Hbdg9w+2QgQJble SLM0ajgh7uX7MUgzOpAYD8XFdaR70EbZUav9kJOesyqS4b3nb3OzvkcBmERTKuCgolAx WPEINQgdGVk18OFrAL2w6X3GPcpi57vRO9JQ6YaYOtmzWOHraRJTLWFLduxN2keksCgS ++jCIKxtQjBjx7L2NaJZrPZ9qXIKIWVCsFnBfiABU9DtYzVYR6CjqZBm1zjTX/nwRM33 TLgMzHxTlOWigXX78Cenmc4okZ2zT3F3YqkJExVBWm997uhz78iMCJuBj75d+MruWPi4 /hYA== 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=uNWzmlYHTyuBRWs7MhCU34vGoL/mBld4kUDv/xrBnfk=; fh=Sj8rGZRkhIqkfWjou/Zd1JKzHlr76PCfhIA0vu75ERE=; b=VSMLkEzSBYEC8BV2OOUEBPnZ0L6LGJIdyhJ0bDhc2yT5i7sM9KQdpQGdSV3OCVKhxA z3DRtrbIzSWJAqgL2Ol0fOW8iCLTkrJP3+2xwQfo1pPHvjx+C5mKLzQssX0zEkPd3OUa UbzCZ2uPgdw6MkYYwYgfMuB/1yTiRK7nQ8Hs4le/rE2iUlmI+jS6ZK0TNCnUfNrKi9FS xfZIoDytaB8FQkLSLbboG7XeyHK3Tdl21RtrCU8iHjjaWIrcqspmxiKxuQ7XVtMYy0hO mQ2b3h5PJIT2yBnKViMi3fUnOD6BCLzc7PxI2P0LehGFS1P1+HTq3WJdvzaD28RAh2GE PbWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kKQW7O9D; dkim=neutral (no key) header.i=@linutronix.de; 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-67631-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67631-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 h1-20020a0562140da100b0068f08ce8109si2316033qvh.505.2024.02.15.12.00.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:00:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67631-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=kKQW7O9D; dkim=neutral (no key) header.i=@linutronix.de; 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-67631-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67631-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 814241C21371 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 20:00:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 615FB14691C; Thu, 15 Feb 2024 19:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kKQW7O9D"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="G47cNF+L" 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 33184145344; 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=Ca3+Rr1K5ZHlcCzMgF+mZUFZr/CX3g1g8Aa9fVeUwXMbxfdVJggoqv3MmdjcPKmchXAfiwaQEC7AxKR2ZDSdYE9Lx3aPbYDH12BrGhMsu7yBgjHr+cwFE+m1avb9lIROKwsXL2r0PcZ0J/u6wkj3LJUXAKbehlO4Lw5T3JStlIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708027028; c=relaxed/simple; bh=sRprGE4OtoJgLdSrRq9T+Y5449jUfBBENtG+uLb5r5o=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KKr9WLINS1dmBNmxHGRc2+sUlRUdGZ4exEbWVTJvbEdsmBH/FRlW17ObvS4Emmxnbabt1vl0+W0HZ2gRYORSFkZ6Y0RJYs69NBpv/FKP+UgO+yKg3S6EKVDAGy3t70C9j3/fUXOAt73cRF/Go/gDo5gJjU/DMcHxTFbV7SUVlvs= 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=kKQW7O9D; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=G47cNF+L; 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=1708027025; 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=uNWzmlYHTyuBRWs7MhCU34vGoL/mBld4kUDv/xrBnfk=; b=kKQW7O9D9CcBq75DdPiJIzT+9I2ke0NEySKmdBDj0H6dItAjO/4cUdYISMBAQ1ZMWwf+Qt L59OdbAujdhe53t62QjDappl0mRkWvZMdCBPD6JzVpc5xX0lK1aHwAG/VNqF6B3CGZMDF9 IpFE5Zhbsp9qaxUO3ulmeKl267zDNH9XxMQ/jl9lEPlAIR4wSC89ix2mRgR7ngxswiOgcU fhFYSyUqSxtwQcLZW63NpoowHshItWVYq93t3UYysx7Wm8kYyjRJlwxztcJracvIjKxfDo OHVwc4ph6vaIXFzimTJeXQ0bIU32LO4nOIwVmJ+7h3HdsjGxpb/Exvdraxdzzw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708027025; 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=uNWzmlYHTyuBRWs7MhCU34vGoL/mBld4kUDv/xrBnfk=; b=G47cNF+L5JKViYuZPQ8dsO7hGDJefczxT//Lnek/SpVut7loFNCxYhvZtbLnkdCtraJr6T zGWFBAt17aOcW1Ag== 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] irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count Cc: Thomas Gleixner <tglx@linutronix.de>, Anup Patel <apatel@ventanamicro.com>, Marc Zyngier <maz@kernel.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240127161753.114685-2-apatel@ventanamicro.com> References: <20240127161753.114685-2-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: <170802702482.398.14573562660062119117.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: 1789261082500230109 X-GMAIL-MSGID: 1790996362121745574 |
Series |
[tip:,irq/msi] irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count
|
|
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: 15137825100422c4c393c87af5aa5a8fa297b1f3 Gitweb: https://git.kernel.org/tip/15137825100422c4c393c87af5aa5a8fa297b1f3 Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Sat, 27 Jan 2024 21:47:29 +05:30 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Thu, 15 Feb 2024 17:55:39 +01:00 irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count Currently the irqdomain select callback is only invoked when the parameter count of the fwspec arguments is not zero. That makes sense because then the match is on the firmware node and eventually on the bus_token, which is already handled in the core code. The upcoming support for per device MSI domains requires to do real bus token specific checks in the MSI parent domains with a zero parameter count. Make the gic-v3 select() callback handle that case. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20240127161753.114685-2-apatel@ventanamicro.com --- drivers/irqchip/irq-gic-v3.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 98b0329..35b9362 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1702,9 +1702,13 @@ static int gic_irq_domain_select(struct irq_domain *d, irq_hw_number_t hwirq; /* Not for us */ - if (fwspec->fwnode != d->fwnode) + if (fwspec->fwnode != d->fwnode) return 0; + /* Handle pure domain searches */ + if (!fwspec->param_count) + return d->bus_token == bus_token; + /* If this is not DT, then we have a single domain */ if (!is_of_node(fwspec->fwnode)) return 1;