From nobody Tue Oct 7 16:00:33 2025 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 B48552882A2 for ; Tue, 8 Jul 2025 18:20:24 +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=1751998826; cv=none; b=lvcZwohIct2dCzsgoTnxxyRxdrLVe0cjNu6ukfS1LYttasQ3aHFE0Cpd+gE7OME5NRb8TVlKGqmd2HrVg5Nx1gSNKqWOMgTOY4ZA43xE1CDRrjgU8sUUtq8PGX4nbtXlkwzJhBKx8j1TOJnntFSkWAsaz+tBjqOjqU0tfP03sKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751998826; c=relaxed/simple; bh=WdKMm9IjzlwvSCwjQCfLuXtxih3VqABNxzTe9GyiOnU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=gxwDJWW1irX0xnCUTwNXJ63rZTYRevhow+1cKivOGZ5cIf9AxuUt2cawL8/Z4qQwciUZK5MMDAfKSIh4CAP3cecvSw/3w+gn7BOegI0pVwrbd6enn0quuPauoUZQKdRP8R++TCXZLK+FQWse8wjEDiVte8DfLk6YVpVqtj3rWhU= 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=0fPsDD3L; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dCpwlruk; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0fPsDD3L"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dCpwlruk" Date: Tue, 08 Jul 2025 18:20:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1751998823; 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=Np8bBsw6Lm3NLFYjMKSOvAf2is/UK90GPWVRCr/3kbc=; b=0fPsDD3LDvrHR7Zrkcr6d44hv2N8yfXkhDhgt4FNHozx2TEjek0kqaRHMXq6/0qD/93tI5 zjr+4cyTHtMXANrCAR0cbo9Kb1vXfYaj8VUxOtEWn/wlwXqNElvuF+yK8LaMoo1+lbL5Za VsbGanVQOOJeMRWwXbejSGN2M9pBQ3wkw0qv96nRuQD72e58dlC+0SSUmg1Nzgvkgoz2YZ XKlNgoAh9tUPqi/dGPWaP/RlTdzjO+DHl5f4UW1n6lO4nmKAHvAISa3IDo8EfjSvA80+79 8BRgLXYHqYxf/H9jMO+6ueI+X1uZH98XOAR/cYzo6uwtgacMJ7rqRkPFvLDX6g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1751998823; 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=Np8bBsw6Lm3NLFYjMKSOvAf2is/UK90GPWVRCr/3kbc=; b=dCpwlruk29bSzmbNXNX+fqt02g7fBXsMRyr/6zQqzGRYzpUqb2AB8Bo1YZSjwnjHVEZgUF OFsvhVmUXq7SC/Bw== From: "irqchip-bot for Lorenzo Pieralisi" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling Cc: Lorenzo Pieralisi , Marc Zyngier , Thomas Gleixner In-Reply-To: <20250703-gicv5-host-v7-27-12e71f1b3528@kernel.org> References: <20250703-gicv5-host-v7-27-12e71f1b3528@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <175199882197.406.260316084878228381.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: quoted-printable The following commit has been merged into the irq/irqchip-next branch of ir= qchip: Commit-ID: 8b65db1e93a227ad9cc1b67cb221b06869f0b35f Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-plat= forms/8b65db1e93a227ad9cc1b67cb221b06869f0b35f Author: Lorenzo Pieralisi AuthorDate: Thu, 03 Jul 2025 12:25:17 +02:00 Committer: Marc Zyngier CommitterDate: Tue, 08 Jul 2025 18:35:52 +01:00 irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling In some irqchip implementations the fwnode representing the IRQdomain and the MSI controller fwnode do not match; in particular the IRQdomain fwnode is the MSI controller fwnode parent. To support selecting such IRQ domains, add a flag in core IRQ domain code that explicitly tells the MSI lib to use the parent fwnode while carrying out IRQ domain selection. Update the msi-lib select callback with the resulting logic. Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marc Zyngier Cc: Thomas Gleixner Cc: Marc Zyngier Link: https://lore.kernel.org/r/20250703-gicv5-host-v7-27-12e71f1b3528@kern= el.org Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-msi-lib.c | 5 ++++- include/linux/irqdomain.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-msi-lib.c b/drivers/irqchip/irq-msi-lib.c index 246c302..454c7f1 100644 --- a/drivers/irqchip/irq-msi-lib.c +++ b/drivers/irqchip/irq-msi-lib.c @@ -133,11 +133,14 @@ int msi_lib_irq_domain_select(struct irq_domain *d, s= truct irq_fwspec *fwspec, { const struct msi_parent_ops *ops =3D d->msi_parent_ops; u32 busmask =3D BIT(bus_token); + struct fwnode_handle *fwh; =20 if (!ops) return 0; =20 - if (fwspec->fwnode !=3D d->fwnode || fwspec->param_count !=3D 0) + fwh =3D d->flags & IRQ_DOMAIN_FLAG_FWNODE_PARENT ? fwnode_get_parent(fwsp= ec->fwnode) + : fwspec->fwnode; + if (fwh !=3D d->fwnode || fwspec->param_count !=3D 0) return 0; =20 /* Handle pure domain searches */ diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 7387d18..25c7cbe 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -212,6 +212,9 @@ enum { /* Address and data pair is mutable when irq_set_affinity() */ IRQ_DOMAIN_FLAG_MSI_IMMUTABLE =3D (1 << 11), =20 + /* IRQ domain requires parent fwnode matching */ + IRQ_DOMAIN_FLAG_FWNODE_PARENT =3D (1 << 12), + /* * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved * for implementation specific purposes and ignored by the