From nobody Fri Dec 19 20:48:34 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 74F1027FB23; Fri, 16 May 2025 19:47:10 +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=1747424832; cv=none; b=UxyEZQojKHebl/Wc/WOnQhv6QCYsQx20mBji2jmQE/8q/3OnIw+WBT3AbBCOPUWP7EjTjlucBrfG8dN5wR8FxF1VNgCnri/8QD9YJfo1vnBZAJPVFNM6Uhn09rFj1SaTf8TTtlrj4wW4rms9mxLd02IZc1LnY7OWG0zxGS9MyTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747424832; c=relaxed/simple; bh=eue7/WbGOGnKgqHwnga3j0sBMIQcZMNfORSudKQNc88=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=EYnlNLtAXGh4AaOVfrvr0q/MKklNtgTEVZrWYQejVerbQk+bj1gcRZp5nIwvoC9v4hkUTqLh9EwaglLHcVAjb8RsPypysDHSwD+FhjIjpeNFiaXX3+S+3Q1Lh1jU+G/jvSLy4AUvtW1z7sjnhLuJ75ok42/CmmVJBs4KHh/XYds= 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=viY4DeOU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AVPO6IPw; 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="viY4DeOU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AVPO6IPw" Date: Fri, 16 May 2025 19:47:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1747424828; 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=p5f+HJTv2UsAnK25BjemKCD4arwHGDr25qSG5gcTuBY=; b=viY4DeOUJsXiHR0T1sDvTeOPykAlf2lO5hYkjeH6DzMsiqelJdgcyqLjhb4z+gi1AZNdKa bflb4BANKHBjZ1pi1+kM3fbUuEkoIi8fwYewI7Z5quiYifVnpo2WgdbfxpZnYFPjxzLfxJ KmnUGYd/A91iwnDmIGn9PHCuHmykFZlY3k9uWd5giMRDgO22pKvnhTpM9risvicCsY6xnc iFLWa1WGzpG8JylrnXKd6ZYLlqJPGzcue3o3bMfI9KMa2oy48uCVJZDpL1lwMab8kmL+0P AuwurtKNKtRMS51wsuW3oTHXqqaSbjgFtXkbo3Xte/3baWcIvp9iiSYLX5aFkg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1747424828; 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=p5f+HJTv2UsAnK25BjemKCD4arwHGDr25qSG5gcTuBY=; b=AVPO6IPwau1NpmECKkhF4AkaLhDIxzf5Lis2E8oLLDPVoOK8DsAU5+EcuVaNgaSgJR7K9C CMve9PXDbkUVuXDQ== 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] irqchip/mvebu: Convert to msi_create_parent_irq_domain() helper Cc: Marc Zyngier , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250513172819.2216709-5-maz@kernel.org> References: <20250513172819.2216709-5-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: <174742482773.406.8568105586600920316.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/msi branch of tip: Commit-ID: b35961ce0a979fa9c2b0d30a346d3a74ef670aa6 Gitweb: https://git.kernel.org/tip/b35961ce0a979fa9c2b0d30a346d3a74e= f670aa6 Author: Marc Zyngier AuthorDate: Tue, 13 May 2025 18:28:14 +01:00 Committer: Thomas Gleixner CommitterDate: Fri, 16 May 2025 21:32:20 +02:00 irqchip/mvebu: Convert to msi_create_parent_irq_domain() helper Switch the MVEBU family of interrupt chip drivers over to the common helper function to create the interrupt domains. [ tglx: Moved the struct out of the function call argument and fix up the of_node_to_fwnode() instances ] Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250513172819.2216709-5-maz@kernel.org --- drivers/irqchip/irq-mvebu-gicp.c | 24 ++++++++++-------------- drivers/irqchip/irq-mvebu-odmi.c | 25 +++++++++---------------- drivers/irqchip/irq-mvebu-sei.c | 22 +++++++++++----------- 3 files changed, 30 insertions(+), 41 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-g= icp.c index 0b2a857..9cd3c6c 100644 --- a/drivers/irqchip/irq-mvebu-gicp.c +++ b/drivers/irqchip/irq-mvebu-gicp.c @@ -170,9 +170,12 @@ static const struct msi_parent_ops gicp_msi_parent_ops= =3D { =20 static int mvebu_gicp_probe(struct platform_device *pdev) { - struct irq_domain *inner_domain, *parent_domain; struct device_node *node =3D pdev->dev.of_node; struct device_node *irq_parent_dn; + struct irq_domain_info info =3D { + .fwnode =3D of_fwnode_handle(node), + .ops =3D &gicp_domain_ops, + }; struct mvebu_gicp *gicp; int ret, i; =20 @@ -217,30 +220,23 @@ static int mvebu_gicp_probe(struct platform_device *p= dev) if (!gicp->spi_bitmap) return -ENOMEM; =20 + info.size =3D gicp->spi_cnt; + info.host_data =3D gicp; + irq_parent_dn =3D of_irq_find_parent(node); if (!irq_parent_dn) { dev_err(&pdev->dev, "failed to find parent IRQ node\n"); return -ENODEV; } =20 - parent_domain =3D irq_find_host(irq_parent_dn); + info.parent =3D irq_find_host(irq_parent_dn); of_node_put(irq_parent_dn); - if (!parent_domain) { + if (!info.parent) { dev_err(&pdev->dev, "failed to find parent IRQ domain\n"); return -ENODEV; } =20 - inner_domain =3D irq_domain_create_hierarchy(parent_domain, 0, - gicp->spi_cnt, - of_node_to_fwnode(node), - &gicp_domain_ops, gicp); - if (!inner_domain) - return -ENOMEM; - - irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_GENERIC_MSI); - inner_domain->flags |=3D IRQ_DOMAIN_FLAG_MSI_PARENT; - inner_domain->msi_parent_ops =3D &gicp_msi_parent_ops; - return 0; + return msi_create_parent_irq_domain(&info, &gicp_msi_parent_ops) ? 0 : -E= NOMEM; } =20 static const struct of_device_id mvebu_gicp_of_match[] =3D { diff --git a/drivers/irqchip/irq-mvebu-odmi.c b/drivers/irqchip/irq-mvebu-o= dmi.c index 306a775..46256b9 100644 --- a/drivers/irqchip/irq-mvebu-odmi.c +++ b/drivers/irqchip/irq-mvebu-odmi.c @@ -167,7 +167,12 @@ static const struct msi_parent_ops odmi_msi_parent_ops= =3D { static int __init mvebu_odmi_init(struct device_node *node, struct device_node *parent) { - struct irq_domain *parent_domain, *inner_domain; + struct irq_domain_info info =3D { + .fwnode =3D of_fwnode_handle(node), + .ops =3D &odmi_domain_ops, + .size =3D odmis_count * NODMIS_PER_FRAME, + .parent =3D irq_find_host(parent), + }; int ret, i; =20 if (of_property_read_u32(node, "marvell,odmi-frames", &odmis_count)) @@ -203,22 +208,10 @@ static int __init mvebu_odmi_init(struct device_node = *node, } } =20 - parent_domain =3D irq_find_host(parent); + if (msi_create_parent_irq_domain(&info, &odmi_msi_parent_ops)) + return 0; =20 - inner_domain =3D irq_domain_create_hierarchy(parent_domain, 0, - odmis_count * NODMIS_PER_FRAME, - of_node_to_fwnode(node), - &odmi_domain_ops, NULL); - if (!inner_domain) { - ret =3D -ENOMEM; - goto err_unmap; - } - - irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_GENERIC_MSI); - inner_domain->flags |=3D IRQ_DOMAIN_FLAG_MSI_PARENT; - inner_domain->msi_parent_ops =3D &odmi_msi_parent_ops; - - return 0; + ret =3D -ENOMEM; =20 err_unmap: for (i =3D 0; i < odmis_count; i++) { diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-se= i.c index a962ef4..5822ea8 100644 --- a/drivers/irqchip/irq-mvebu-sei.c +++ b/drivers/irqchip/irq-mvebu-sei.c @@ -366,6 +366,10 @@ static const struct msi_parent_ops sei_msi_parent_ops = =3D { static int mvebu_sei_probe(struct platform_device *pdev) { struct device_node *node =3D pdev->dev.of_node; + struct irq_domain_info info =3D { + .fwnode =3D of_fwnode_handle(node), + .ops =3D &mvebu_sei_cp_domain_ops, + }; struct mvebu_sei *sei; u32 parent_irq; int ret; @@ -402,7 +406,7 @@ static int mvebu_sei_probe(struct platform_device *pdev) } =20 /* Create the root SEI domain */ - sei->sei_domain =3D irq_domain_create_linear(of_node_to_fwnode(node), + sei->sei_domain =3D irq_domain_create_linear(of_fwnode_handle(node), (sei->caps->ap_range.size + sei->caps->cp_range.size), &mvebu_sei_domain_ops, @@ -418,7 +422,7 @@ static int mvebu_sei_probe(struct platform_device *pdev) /* Create the 'wired' domain */ sei->ap_domain =3D irq_domain_create_hierarchy(sei->sei_domain, 0, sei->caps->ap_range.size, - of_node_to_fwnode(node), + of_fwnode_handle(node), &mvebu_sei_ap_domain_ops, sei); if (!sei->ap_domain) { @@ -430,21 +434,17 @@ static int mvebu_sei_probe(struct platform_device *pd= ev) irq_domain_update_bus_token(sei->ap_domain, DOMAIN_BUS_WIRED); =20 /* Create the 'MSI' domain */ - sei->cp_domain =3D irq_domain_create_hierarchy(sei->sei_domain, 0, - sei->caps->cp_range.size, - of_node_to_fwnode(node), - &mvebu_sei_cp_domain_ops, - sei); + info.size =3D sei->caps->cp_range.size; + info.host_data =3D sei; + info.parent =3D sei->sei_domain; + + sei->cp_domain =3D msi_create_parent_irq_domain(&info, &sei_msi_parent_op= s); if (!sei->cp_domain) { pr_err("Failed to create CPs IRQ domain\n"); ret =3D -ENOMEM; goto remove_ap_domain; } =20 - irq_domain_update_bus_token(sei->cp_domain, DOMAIN_BUS_GENERIC_MSI); - sei->cp_domain->flags |=3D IRQ_DOMAIN_FLAG_MSI_PARENT; - sei->cp_domain->msi_parent_ops =3D &sei_msi_parent_ops; - mvebu_sei_reset(sei); =20 irq_set_chained_handler_and_data(parent_irq, mvebu_sei_handle_cascade_irq= , sei);