From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C3AC0253F08 for ; Wed, 19 Mar 2025 09:30:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376641; cv=none; b=Xcg2+Cmwc1z/T0tY4x568A+o1awe2lS+4gxtWc+xH2st7+olGt8/TTQlkNJVAMYmYzB+kQ2Gob5UvtgnfkCsZ3DSOrQOzT8KdThR02+71WRx+U9pdrNS2gr3f4KJHQuRDpbxc7jzKDAUDPHiYvbjVliIXsV6varH5lo1vRZ5zH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376641; c=relaxed/simple; bh=NNs8SEwDfc9wDIxk1Dn/+q1ci77lX4vcEi1aTxU5XiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=anCptidVRZqi/9KB/X0Iqfngxl+7kldzBQK/eOyt8Bte19h71UM6WV7A7MT8E83ofqUQGUP8kFre5obe0JOO/LjQ4TTm55rl45f8cMouxAB9jS4nDLBMOM4kObpnXSAHDk2pwhYQtfkhSNuxsPnSCKTrYcuBeVelGBT1HWv+YvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MSOdQhrg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MSOdQhrg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 775FFC116C6; Wed, 19 Mar 2025 09:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376640; bh=NNs8SEwDfc9wDIxk1Dn/+q1ci77lX4vcEi1aTxU5XiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MSOdQhrgk5hmkbWksclyMaCrFyjiMd812BBwfN6ygHz7ED8jGGeyMaZTbtLXe5n8O KEvcYqkwKDn39WFsQTWmkyuFLVtijGqcDK+K/6TlZECVAyq5V+YhZbMpXvrpY6iiJF pG3WX0U8wTJjrq2yEiPbM788lCU2S+X8n08DhxZIeMHaChZ5gIW8ZMt5qiujKnP0y4 xa/bhcUCI4F4gFJ6U/m7OPpqDLAJ+xEzAzyjhOKcfhxYuUvbZNNXsqEbUy61tgQv1B NP5KiW2AMmsIu7itr9LOqIvX9Dw66V8asl5OKb3KPJjzJ9WlmzkIhV0ZUP14s96rMo eHpBMcf4K7FkA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org Subject: [PATCH v2 01/57] irqdomain: um: use irq_domain_create_linear() helper Date: Wed, 19 Mar 2025 10:28:54 +0100 Message-ID: <20250319092951.37667-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" um_pci_init() open-codes what the irq_domain_create_linear() helper does already. Use the helper instead of open-coding it. This needs retval checking modification. Signed-off-by: Jiri Slaby (SUSE) Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org [v2] This is new in v2. --- arch/um/drivers/virt-pci.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c index dd5580f975cc..efe8b474c07b 100644 --- a/arch/um/drivers/virt-pci.c +++ b/arch/um/drivers/virt-pci.c @@ -1000,11 +1000,6 @@ static struct resource virt_platform_resource =3D { =20 static int __init um_pci_init(void) { - struct irq_domain_info inner_domain_info =3D { - .size =3D MAX_MSI_VECTORS, - .hwirq_max =3D MAX_MSI_VECTORS, - .ops =3D &um_pci_inner_domain_ops, - }; int err, i; =20 WARN_ON(logic_iomem_add_region(&virt_cfgspace_resource, @@ -1030,10 +1025,10 @@ static int __init um_pci_init(void) goto free; } =20 - inner_domain_info.fwnode =3D um_pci_fwnode; - um_pci_inner_domain =3D irq_domain_instantiate(&inner_domain_info); - if (IS_ERR(um_pci_inner_domain)) { - err =3D PTR_ERR(um_pci_inner_domain); + um_pci_inner_domain =3D irq_domain_create_linear(um_pci_fwnode, MAX_MSI_V= ECTORS, + &um_pci_inner_domain_ops, NULL); + if (!um_pci_inner_domain) { + err =3D -ENOMEM; goto free; } =20 @@ -1070,7 +1065,7 @@ static int __init um_pci_init(void) goto free; return 0; free: - if (!IS_ERR_OR_NULL(um_pci_inner_domain)) + if (um_pci_inner_domain) irq_domain_remove(um_pci_inner_domain); if (um_pci_fwnode) irq_domain_free_fwnode(um_pci_fwnode); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6F0C42528E0 for ; Wed, 19 Mar 2025 09:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376647; cv=none; b=IARmEi4KDwZsHE+mf0svJIFIPTUgf7sDpbuH0igIdqHaZRMDBdpgpnKDfkbTNqABpZTZ2MneR22IHSphRxFJFXS9QMB1tr3u3oqH3J4KNjzRfDsWRqDoATaqNMTW9vytAeKcEDA0tLrehNgSHZV+kMa7CeZVcx/o5qCiXSxQgxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376647; c=relaxed/simple; bh=eZbTwRAzdJNBGCGMnrtjCFcr8FmrHrTiTPe6zNGCtLY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tBqasx5gEmr2ExVZkqpBJfSim2dwhtnAxgAYRMLMwA+7AMahQyc4t0COW9yftMIuFaFv/H6pUqLcp+BNwxgKPhdoLA0Gv+0Mx+nQ4jkDXE+jJqZ7+QJj2cBFiz1fjgGqIf4DpdBM3howeKmbGeE7+rKCMI0HKlbnsbLrwvFnLRw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uUeTYSk7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uUeTYSk7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B678EC4CEEA; Wed, 19 Mar 2025 09:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376646; bh=eZbTwRAzdJNBGCGMnrtjCFcr8FmrHrTiTPe6zNGCtLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uUeTYSk7BlN7RuZBo/WorRIBM/BOb660h2aHPrgZrlGiRrtZZIvYjWK3DtrFl2KZd WzNfbm5yp3KWV2Gg6GS1ET5EP9A9/6bqHz1id1N931/ygdieG/oXcGyUSU36jntDi7 gGzyrGP9tHSM93tQVJLrySrjQbUzvt3lvT7QUNgId+9jwbdojk2NsOx6EWKIZEhj4u YaOuAjZ+6njaL3r2pOrgR4kCJ+PF6Kp7TB2etEEx/MpSuKcbOBst9aQG4bLtYyb36k cWFiToWBKlS2drbzVONK6d0+PohA+tFDbkH8KTeAaSzf+UFUtib8kr67CSTMt9g2x2 lYeaqLkq3heUg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Vineet Gupta , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Thomas Bogendoerfer , Dinh Nguyen , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Anatolij Gustschin , Geoff Levand , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michal Simek , Chris Zankel , Max Filippov Subject: [PATCH v2 02/57] irqdomain: Rename irq_set_default_host() to irq_set_default_domain() Date: Wed, 19 Mar 2025 10:28:55 +0100 Message-ID: <20250319092951.37667-3-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Call the irq_domain consistently a domain, not host. Here, rename irq_set_default_host() to irq_set_default_domain(). Signed-off-by: Jiri Slaby (SUSE) Cc: Vineet Gupta Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Russell King Cc: Thomas Bogendoerfer Cc: Dinh Nguyen Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: Anatolij Gustschin Cc: Geoff Levand Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Michal Simek Cc: Chris Zankel Cc: Max Filippov --- arch/arc/kernel/intc-arcv2.c | 2 +- arch/arc/kernel/intc-compact.c | 2 +- arch/arm/mach-pxa/irq.c | 2 +- arch/mips/cavium-octeon/octeon-irq.c | 6 +++--- arch/mips/sgi-ip27/ip27-irq.c | 2 +- arch/mips/sgi-ip30/ip30-irq.c | 2 +- arch/nios2/kernel/irq.c | 2 +- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/amigaone/setup.c | 2 +- arch/powerpc/platforms/chrp/setup.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 2 +- arch/powerpc/sysdev/xics/xics-common.c | 2 +- arch/powerpc/sysdev/xive/common.c | 2 +- arch/x86/kernel/apic/vector.c | 2 +- drivers/irqchip/irq-armada-370-xp.c | 2 +- drivers/irqchip/irq-clps711x.c | 2 +- drivers/irqchip/irq-imx-gpcv2.c | 2 +- drivers/irqchip/irq-pic32-evic.c | 2 +- drivers/irqchip/irq-xilinx-intc.c | 2 +- drivers/irqchip/irq-xtensa-mx.c | 2 +- drivers/irqchip/irq-xtensa-pic.c | 4 ++-- include/linux/irqdomain.h | 2 +- kernel/irq/irqdomain.c | 8 ++++---- 30 files changed, 36 insertions(+), 36 deletions(-) diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c index f324f0e3341a..fea29d9d18d6 100644 --- a/arch/arc/kernel/intc-arcv2.c +++ b/arch/arc/kernel/intc-arcv2.c @@ -178,7 +178,7 @@ init_onchip_IRQ(struct device_node *intc, struct device= _node *parent) * Needed for primary domain lookup to succeed * This is a primary irqchip, and can never have a parent */ - irq_set_default_host(root_domain); + irq_set_default_domain(root_domain); =20 #ifdef CONFIG_SMP irq_create_mapping(root_domain, IPI_IRQ); diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c index 6885e422870e..1d2ff1c6a61b 100644 --- a/arch/arc/kernel/intc-compact.c +++ b/arch/arc/kernel/intc-compact.c @@ -121,7 +121,7 @@ init_onchip_IRQ(struct device_node *intc, struct device= _node *parent) * Needed for primary domain lookup to succeed * This is a primary irqchip, and can never have a parent */ - irq_set_default_host(root_domain); + irq_set_default_domain(root_domain); =20 return 0; } diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index a9ef71008147..d9cadd97748a 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -152,7 +152,7 @@ pxa_init_irq_common(struct device_node *node, int irq_n= r, &pxa_irq_ops, NULL); if (!pxa_irq_domain) panic("Unable to add PXA IRQ domain\n"); - irq_set_default_host(pxa_irq_domain); + irq_set_default_domain(pxa_irq_domain); =20 for (n =3D 0; n < irq_nr; n +=3D 32) { void __iomem *base =3D irq_base(n >> 5); diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon= /octeon-irq.c index 8425a6b38aa2..e6b4d9c0c169 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -1505,7 +1505,7 @@ static int __init octeon_irq_init_ciu( =20 ciu_domain =3D irq_domain_add_tree( ciu_node, &octeon_irq_domain_ciu_ops, dd); - irq_set_default_host(ciu_domain); + irq_set_default_domain(ciu_domain); =20 /* CIU_0 */ for (i =3D 0; i < 16; i++) { @@ -2076,7 +2076,7 @@ static int __init octeon_irq_init_ciu2( =20 ciu_domain =3D irq_domain_add_tree( ciu_node, &octeon_irq_domain_ciu2_ops, NULL); - irq_set_default_host(ciu_domain); + irq_set_default_domain(ciu_domain); =20 /* CUI2 */ for (i =3D 0; i < 64; i++) { @@ -2929,7 +2929,7 @@ static int __init octeon_irq_init_ciu3(struct device_= node *ciu_node, /* Only do per CPU things if it is the CIU of the boot node. */ octeon_irq_ciu3_alloc_resources(ciu3_info); if (node =3D=3D 0) - irq_set_default_host(domain); + irq_set_default_domain(domain); =20 octeon_irq_use_ip4 =3D false; /* Enable the CIU lines */ diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 00e63e9ef61d..288d4d17eddd 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c @@ -297,7 +297,7 @@ void __init arch_init_irq(void) if (WARN_ON(domain =3D=3D NULL)) return; =20 - irq_set_default_host(domain); + irq_set_default_domain(domain); =20 irq_set_percpu_devid(IP27_HUB_PEND0_IRQ); irq_set_chained_handler_and_data(IP27_HUB_PEND0_IRQ, ip27_do_irq_mask0, diff --git a/arch/mips/sgi-ip30/ip30-irq.c b/arch/mips/sgi-ip30/ip30-irq.c index 423c32cb66ed..9fb905e2cf14 100644 --- a/arch/mips/sgi-ip30/ip30-irq.c +++ b/arch/mips/sgi-ip30/ip30-irq.c @@ -313,7 +313,7 @@ void __init arch_init_irq(void) if (!domain) return; =20 - irq_set_default_host(domain); + irq_set_default_domain(domain); =20 irq_set_percpu_devid(IP30_HEART_L0_IRQ); irq_set_chained_handler_and_data(IP30_HEART_L0_IRQ, ip30_normal_irq, diff --git a/arch/nios2/kernel/irq.c b/arch/nios2/kernel/irq.c index 6b7890e5f7af..8fa280660051 100644 --- a/arch/nios2/kernel/irq.c +++ b/arch/nios2/kernel/irq.c @@ -72,7 +72,7 @@ void __init init_IRQ(void) domain =3D irq_domain_add_linear(node, NIOS2_CPU_NR_IRQS, &irq_ops, NULL); BUG_ON(!domain); =20 - irq_set_default_host(domain); + irq_set_default_domain(domain); of_node_put(node); /* Load the initial ienable value */ ienable =3D RDCTL(CTL_IENABLE); diff --git a/arch/powerpc/platforms/44x/uic.c b/arch/powerpc/platforms/44x/= uic.c index 8b03ae4cb3f6..31f760c2ec5d 100644 --- a/arch/powerpc/platforms/44x/uic.c +++ b/arch/powerpc/platforms/44x/uic.c @@ -291,7 +291,7 @@ void __init uic_init_tree(void) if (!primary_uic) panic("Unable to initialize primary UIC %pOF\n", np); =20 - irq_set_default_host(primary_uic->irqhost); + irq_set_default_domain(primary_uic->irqhost); of_node_put(np); =20 /* The scan again for cascaded UICs */ diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platf= orms/52xx/mpc52xx_pic.c index 1e0a5e9644dc..43c881d31ca6 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c @@ -453,7 +453,7 @@ void __init mpc52xx_init_irq(void) if (!mpc52xx_irqhost) panic(__FILE__ ": Cannot allocate the IRQ host\n"); =20 - irq_set_default_host(mpc52xx_irqhost); + irq_set_default_domain(mpc52xx_irqhost); =20 pr_info("MPC52xx PIC is up and running!\n"); } diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platfor= ms/amigaone/setup.c index 2c8dc0886912..33f852a7625f 100644 --- a/arch/powerpc/platforms/amigaone/setup.c +++ b/arch/powerpc/platforms/amigaone/setup.c @@ -109,7 +109,7 @@ static void __init amigaone_init_IRQ(void) =20 i8259_init(pic, int_ack); ppc_md.get_irq =3D i8259_irq; - irq_set_default_host(i8259_get_host()); + irq_set_default_domain(i8259_get_host()); } =20 static int __init request_isa_regions(void) diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/c= hrp/setup.c index 36ee3a5056a1..c1bfa4c3444c 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -486,7 +486,7 @@ static void __init chrp_find_8259(void) i8259_init(pic, chrp_int_ack); if (ppc_md.get_irq =3D=3D NULL) { ppc_md.get_irq =3D i8259_irq; - irq_set_default_host(i8259_get_host()); + irq_set_default_domain(i8259_get_host()); } if (chrp_mpic !=3D NULL) { cascade_irq =3D irq_of_parse_and_map(pic, 0); diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerp= c/platforms/embedded6xx/flipper-pic.c index 4d9200bdba78..013d66304c31 100644 --- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c +++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c @@ -190,7 +190,7 @@ void __init flipper_pic_probe(void) flipper_irq_host =3D flipper_pic_init(np); BUG_ON(!flipper_irq_host); =20 - irq_set_default_host(flipper_irq_host); + irq_set_default_domain(flipper_irq_host); =20 of_node_put(np); } diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms= /pasemi/setup.c index 0761d98e5be3..d03b41336901 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c @@ -228,7 +228,7 @@ static void __init nemo_init_IRQ(struct mpic *mpic) irq_set_chained_handler(gpio_virq, sb600_8259_cascade); mpic_unmask_irq(irq_get_irq_data(gpio_virq)); =20 - irq_set_default_host(mpic->irqhost); + irq_set_default_domain(mpic->irqhost); } =20 #else diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms= /powermac/pic.c index 2202bf77c7a3..03a7c51f2645 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -330,7 +330,7 @@ static void __init pmac_pic_probe_oldstyle(void) pmac_pic_host =3D irq_domain_add_linear(master, max_irqs, &pmac_pic_host_ops, NULL); BUG_ON(pmac_pic_host =3D=3D NULL); - irq_set_default_host(pmac_pic_host); + irq_set_default_domain(pmac_pic_host); =20 /* Get addresses of first controller if we have a node for it */ BUG_ON(of_address_to_resource(master, 0, &r)); diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platform= s/ps3/interrupt.c index af3fe9f04f24..95e96bd61a20 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c @@ -744,7 +744,7 @@ void __init ps3_init_IRQ(void) struct irq_domain *host; =20 host =3D irq_domain_add_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, NULL= ); - irq_set_default_host(host); + irq_set_default_domain(host); =20 for_each_possible_cpu(cpu) { struct ps3_private *pd =3D &per_cpu(ps3_private, cpu); diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c index 040827671d21..fb502b72fca1 100644 --- a/arch/powerpc/sysdev/ehv_pic.c +++ b/arch/powerpc/sysdev/ehv_pic.c @@ -291,5 +291,5 @@ void __init ehv_pic_init(void) ehv_pic->coreint_flag =3D of_property_read_bool(np, "has-external-proxy"); =20 global_ehv_pic =3D ehv_pic; - irq_set_default_host(global_ehv_pic->irqhost); + irq_set_default_domain(global_ehv_pic->irqhost); } diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 037b04bf9a9f..a35be0232978 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -757,7 +757,7 @@ struct ipic * __init ipic_init(struct device_node *node= , unsigned int flags) ipic_write(ipic->regs, IPIC_SEMSR, temp); =20 primary_ipic =3D ipic; - irq_set_default_host(primary_ipic->irqhost); + irq_set_default_domain(primary_ipic->irqhost); =20 ipic_write(ipic->regs, IPIC_SIMSR_H, 0); ipic_write(ipic->regs, IPIC_SIMSR_L, 0); diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index d94cf36b0f65..4afbab83a2e2 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1520,7 +1520,7 @@ struct mpic * __init mpic_alloc(struct device_node *n= ode, =20 if (!(mpic->flags & MPIC_SECONDARY)) { mpic_primary =3D mpic; - irq_set_default_host(mpic->irqhost); + irq_set_default_domain(mpic->irqhost); } =20 return mpic; diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/x= ics/xics-common.c index d3a4156e8788..c3fa539a9898 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c @@ -472,7 +472,7 @@ static int __init xics_allocate_domain(void) return -ENOMEM; } =20 - irq_set_default_host(xics_host); + irq_set_default_domain(xics_host); return 0; } =20 diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/c= ommon.c index a6c388bdf5d0..dc2e61837396 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arch/powerpc/sysdev/xive/common.c @@ -1467,7 +1467,7 @@ static void __init xive_init_host(struct device_node = *np) xive_irq_domain =3D irq_domain_add_tree(np, &xive_irq_domain_ops, NULL); if (WARN_ON(xive_irq_domain =3D=3D NULL)) return; - irq_set_default_host(xive_irq_domain); + irq_set_default_domain(xive_irq_domain); } =20 static void xive_cleanup_cpu_queues(unsigned int cpu, struct xive_cpu *xc) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 72fa4bb78f0a..fee42a73d64a 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -799,7 +799,7 @@ int __init arch_early_irq_init(void) x86_vector_domain =3D irq_domain_create_tree(fn, &x86_vector_domain_ops, NULL); BUG_ON(x86_vector_domain =3D=3D NULL); - irq_set_default_host(x86_vector_domain); + irq_set_default_domain(x86_vector_domain); =20 BUG_ON(!alloc_cpumask_var(&vector_searchmask, GFP_KERNEL)); =20 diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index d7c5ef248474..6218e5d20b50 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -880,7 +880,7 @@ static int __init mpic_of_init(struct device_node *node= , struct device_node *par } =20 if (mpic_is_ipi_available(mpic)) { - irq_set_default_host(mpic->domain); + irq_set_default_domain(mpic->domain); set_handle_irq(mpic_handle_irq); #ifdef CONFIG_SMP err =3D mpic_ipi_init(mpic, node); diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c index 806ebb1de201..48c73c948ddf 100644 --- a/drivers/irqchip/irq-clps711x.c +++ b/drivers/irqchip/irq-clps711x.c @@ -191,7 +191,7 @@ static int __init _clps711x_intc_init(struct device_nod= e *np, goto out_irqfree; } =20 - irq_set_default_host(clps711x_intc->domain); + irq_set_default_domain(clps711x_intc->domain); set_handle_irq(clps711x_irqh); =20 #ifdef CONFIG_FIQ diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv= 2.c index 8a0e82067924..095ae8e3217e 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -247,7 +247,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_= node *node, kfree(cd); return -ENOMEM; } - irq_set_default_host(domain); + irq_set_default_domain(domain); =20 /* Initially mask all interrupts */ for (i =3D 0; i < IMR_NUM; i++) { diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-e= vic.c index eb6ca516a166..b546b1036e12 100644 --- a/drivers/irqchip/irq-pic32-evic.c +++ b/drivers/irqchip/irq-pic32-evic.c @@ -291,7 +291,7 @@ static int __init pic32_of_init(struct device_node *nod= e, gc->private =3D &priv[i]; } =20 - irq_set_default_host(evic_irq_domain); + irq_set_default_domain(evic_irq_domain); =20 /* * External interrupts have software configurable edge polarity. These diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx= -intc.c index 7e08714d507f..38727e9cc713 100644 --- a/drivers/irqchip/irq-xilinx-intc.c +++ b/drivers/irqchip/irq-xilinx-intc.c @@ -233,7 +233,7 @@ static int __init xilinx_intc_of_init(struct device_nod= e *intc, } } else { primary_intc =3D irqc; - irq_set_default_host(primary_intc->root_domain); + irq_set_default_domain(primary_intc->root_domain); set_handle_irq(xil_intc_handle_irq); } =20 diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-m= x.c index 7f314e58f3ce..9b441d180299 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c @@ -156,7 +156,7 @@ static void __init xtensa_mx_init_common(struct irq_dom= ain *root_domain) { unsigned int i; =20 - irq_set_default_host(root_domain); + irq_set_default_domain(root_domain); secondary_init_irq(); =20 /* Initialize default IRQ routing to CPU 0 */ diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-= pic.c index f9d6fce4da33..9be7b7c5cd23 100644 --- a/drivers/irqchip/irq-xtensa-pic.c +++ b/drivers/irqchip/irq-xtensa-pic.c @@ -87,7 +87,7 @@ int __init xtensa_pic_init_legacy(struct device_node *int= errupt_parent) struct irq_domain *root_domain =3D irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, &xtensa_irq_domain_ops, &xtensa_irq_chip); - irq_set_default_host(root_domain); + irq_set_default_domain(root_domain); return 0; } =20 @@ -97,7 +97,7 @@ static int __init xtensa_pic_init(struct device_node *np, struct irq_domain *root_domain =3D irq_domain_add_linear(np, NR_IRQS, &xtensa_irq_domain_ops, &xtensa_irq_chip); - irq_set_default_host(root_domain); + irq_set_default_domain(root_domain); return 0; } IRQCHIP_DECLARE(xtensa_irq_chip, "cdns,xtensa-pic", xtensa_pic_init); diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 33ff41eef8f7..4b5c495b5710 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -352,7 +352,7 @@ struct irq_domain *irq_domain_create_legacy(struct fwno= de_handle *fwnode, void *host_data); struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, enum irq_domain_bus_token bus_token); -void irq_set_default_host(struct irq_domain *host); +void irq_set_default_domain(struct irq_domain *domain); struct irq_domain *irq_get_default_host(void); int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, irq_hw_number_t hwirq, int node, diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 2861f89880af..480fdc9e769e 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -398,7 +398,7 @@ void irq_domain_remove(struct irq_domain *domain) * If the going away domain is the default one, reset it. */ if (unlikely(irq_default_domain =3D=3D domain)) - irq_set_default_host(NULL); + irq_set_default_domain(NULL); =20 mutex_unlock(&irq_domain_mutex); =20 @@ -573,7 +573,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_= fwspec *fwspec, EXPORT_SYMBOL_GPL(irq_find_matching_fwspec); =20 /** - * irq_set_default_host() - Set a "default" irq domain + * irq_set_default_domain() - Set a "default" irq domain * @domain: default domain pointer * * For convenience, it's possible to set a "default" domain that will be u= sed @@ -581,13 +581,13 @@ EXPORT_SYMBOL_GPL(irq_find_matching_fwspec); * platforms that want to manipulate a few hard coded interrupt numbers th= at * aren't properly represented in the device-tree. */ -void irq_set_default_host(struct irq_domain *domain) +void irq_set_default_domain(struct irq_domain *domain) { pr_debug("Default domain set to @0x%p\n", domain); =20 irq_default_domain =3D domain; } -EXPORT_SYMBOL_GPL(irq_set_default_host); +EXPORT_SYMBOL_GPL(irq_set_default_domain); =20 /** * irq_get_default_host() - Retrieve the "default" irq domain --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8C199253F38 for ; Wed, 19 Mar 2025 09:30:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376650; cv=none; b=nnL3STKyA1PkL/bok2ykrjUoOFaHgs/neVn6WWR0sVGRYFQy4Xj760vkE7FrfiD4SenMd/vcC5h0rK1MSHVPlyG3I3htSGiTw8b5yYbv026JCS72e6ktgrqO9olh+dyKMp6lT7aWBmRIXypu4i9GV+GzSbwMAONrsr1mMrXQ0uI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376650; c=relaxed/simple; bh=W2yoLk8Z7BUtYz+ArNlwFlFbW8sF7dD0fbRsBx8Eu+Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bqoMTKYKpm4BUPVHL/Z4iIjrLeYFWyeSic7FsZUnEPb56QiOy0F6jkxMJP7WYF6UpZnz6o039QKiY1G32IeSuIH/+NHc+ylHo56OAnfcJD5tKlDncRPQ5pQkSNahGr7f/uaB6ivqfXiCYf2hEfsdMNNA0z6oNx1mfQnFnI5Kstw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jyf0LouK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jyf0LouK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61497C4CEF4; Wed, 19 Mar 2025 09:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376650; bh=W2yoLk8Z7BUtYz+ArNlwFlFbW8sF7dD0fbRsBx8Eu+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jyf0LouKyHam0KU0DuG12ewsKYORsvz21Jd4/5AIhKc8oBmYUj4cmqSo2ezylraqV KWqpKb3/kq2fErEXKdG/G7Yd5P+oVTfz7JLv52uuZjFXOd1s4tJQVQS0agdcVtq3tj AA0ZqTMAcRl+J4kXB94a6vCwdRi2hF8veo6zxxi2oSA6XUwIBtRybnpP6+34K1MUsX XxkiEAWJjYSr3Cxb6VbHjSZCA0lafxa25slJl5c47mTfk7aF1JWxwV+roEwqSK+mHG Fqz6ru4+ynN1p7IHMEBzj30gupJ2m/K2DgkPqLMo17vd/oIR54veiIGKBzkuwBKttz E/f/7q163qOxA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Thomas Bogendoerfer , Madhavan Srinivasan , Nicholas Piggin , Michael Ellerman , Christophe Leroy , Naveen N Rao , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH v2 03/57] irqdomain: Rename irq_get_default_host() to irq_get_default_domain() Date: Wed, 19 Mar 2025 10:28:56 +0100 Message-ID: <20250319092951.37667-4-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Call the irq_domain consistently a domain, not host. Here, rename irq_get_default_host() to irq_get_default_domain(). Signed-off-by: Jiri Slaby (SUSE) Cc: Thomas Bogendoerfer Cc: Madhavan Srinivasan Cc: Nicholas Piggin Cc: Michael Ellerman Cc: Christophe Leroy Cc: Naveen N Rao Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth --- arch/mips/pci/pci-xtalk-bridge.c | 2 +- arch/powerpc/kvm/book3s_hv.c | 2 +- arch/powerpc/kvm/book3s_xive.c | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- arch/powerpc/platforms/pseries/msi.c | 2 +- drivers/irqchip/irq-armada-370-xp.c | 4 ++-- include/linux/irqdomain.h | 2 +- kernel/irq/irqdomain.c | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/mips/pci/pci-xtalk-bridge.c b/arch/mips/pci/pci-xtalk-bri= dge.c index dae856fb3e5b..e00c38620d14 100644 --- a/arch/mips/pci/pci-xtalk-bridge.c +++ b/arch/mips/pci/pci-xtalk-bridge.c @@ -620,7 +620,7 @@ static int bridge_probe(struct platform_device *pdev) if (bridge_get_partnum(virt_to_phys((void *)bd->bridge_addr), partnum)) return -EPROBE_DEFER; /* not available yet */ =20 - parent =3D irq_get_default_host(); + parent =3D irq_get_default_domain(); if (!parent) return -ENODEV; fn =3D irq_domain_alloc_named_fwnode("BRIDGE"); diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 86bff159c51e..19f4d298dd17 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -6041,7 +6041,7 @@ static int kvmppc_set_passthru_irq(struct kvm *kvm, i= nt host_irq, int guest_gsi) * the underlying calls, which will EOI the interrupt in real * mode, need an HW IRQ number mapped in the XICS IRQ domain. */ - host_data =3D irq_domain_get_irq_data(irq_get_default_host(), host_irq); + host_data =3D irq_domain_get_irq_data(irq_get_default_domain(), host_irq); irq_map->r_hwirq =3D (unsigned int)irqd_to_hwirq(host_data); =20 if (i =3D=3D pimap->n_mapped) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index 1362c672387e..1302b5ac5672 100644 --- a/arch/powerpc/kvm/book3s_xive.c +++ b/arch/powerpc/kvm/book3s_xive.c @@ -1555,7 +1555,7 @@ int kvmppc_xive_set_mapped(struct kvm *kvm, unsigned = long guest_irq, struct kvmppc_xive_src_block *sb; struct kvmppc_xive_irq_state *state; struct irq_data *host_data =3D - irq_domain_get_irq_data(irq_get_default_host(), host_irq); + irq_domain_get_irq_data(irq_get_default_domain(), host_irq); unsigned int hw_irq =3D (unsigned int)irqd_to_hwirq(host_data); u16 idx; u8 prio; diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platf= orms/powernv/pci-ioda.c index d2a8e0287811..ae4b549b5ca0 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1881,7 +1881,7 @@ static const struct irq_domain_ops pnv_irq_domain_ops= =3D { static int __init pnv_msi_allocate_domains(struct pci_controller *hose, un= signed int count) { struct pnv_phb *phb =3D hose->private_data; - struct irq_domain *parent =3D irq_get_default_host(); + struct irq_domain *parent =3D irq_get_default_domain(); =20 hose->fwnode =3D irq_domain_alloc_named_id_fwnode("PNV-MSI", phb->opal_id= ); if (!hose->fwnode) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/= pseries/msi.c index fdc2f7f38dc9..f9d80111c322 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -611,7 +611,7 @@ static const struct irq_domain_ops pseries_irq_domain_o= ps =3D { static int __pseries_msi_allocate_domains(struct pci_controller *phb, unsigned int count) { - struct irq_domain *parent =3D irq_get_default_host(); + struct irq_domain *parent =3D irq_get_default_domain(); =20 phb->fwnode =3D irq_domain_alloc_named_id_fwnode("pSeries-MSI", phb->global_number); diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index 6218e5d20b50..2aa6a51e05d0 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -564,7 +564,7 @@ static void mpic_reenable_percpu(struct mpic *mpic) =20 static int mpic_starting_cpu(unsigned int cpu) { - struct mpic *mpic =3D irq_get_default_host()->host_data; + struct mpic *mpic =3D irq_get_default_domain()->host_data; =20 mpic_perf_init(mpic); mpic_smp_cpu_init(mpic); @@ -700,7 +700,7 @@ static void mpic_handle_cascade_irq(struct irq_desc *de= sc) =20 static void __exception_irq_entry mpic_handle_irq(struct pt_regs *regs) { - struct mpic *mpic =3D irq_get_default_host()->host_data; + struct mpic *mpic =3D irq_get_default_domain()->host_data; irq_hw_number_t i; u32 irqstat; =20 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 4b5c495b5710..e9ab95fbc5a9 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -353,7 +353,7 @@ struct irq_domain *irq_domain_create_legacy(struct fwno= de_handle *fwnode, struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, enum irq_domain_bus_token bus_token); void irq_set_default_domain(struct irq_domain *domain); -struct irq_domain *irq_get_default_host(void); +struct irq_domain *irq_get_default_domain(void); int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, irq_hw_number_t hwirq, int node, const struct irq_affinity_desc *affinity); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 480fdc9e769e..9d5c8651492d 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -590,7 +590,7 @@ void irq_set_default_domain(struct irq_domain *domain) EXPORT_SYMBOL_GPL(irq_set_default_domain); =20 /** - * irq_get_default_host() - Retrieve the "default" irq domain + * irq_get_default_domain() - Retrieve the "default" irq domain * * Returns: the default domain, if any. * @@ -598,11 +598,11 @@ EXPORT_SYMBOL_GPL(irq_set_default_domain); * systems that cannot implement a firmware->fwnode mapping (which * both DT and ACPI provide). */ -struct irq_domain *irq_get_default_host(void) +struct irq_domain *irq_get_default_domain(void) { return irq_default_domain; } -EXPORT_SYMBOL_GPL(irq_get_default_host); +EXPORT_SYMBOL_GPL(irq_get_default_domain); =20 static bool irq_domain_is_nomap(struct irq_domain *domain) { --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1F3B1253B43 for ; Wed, 19 Mar 2025 09:30:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376652; cv=none; b=OabmqFGtcYAg4v/XAXWvNLlLJkDD48jWaALN4uQHYqnZCyYfYW/P/XLqdsendJidLEyjVkQDL2KlbsAXjynlucMeoB7j7Ro0vn8G9EPTe2O0sjQH6416z4HY3Ep5HJoOEehFDE5wnKqw8lb0ixfyI5HUUI1aycXQWANB8Erq51Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376652; c=relaxed/simple; bh=OkcOnPgwzPVAnLmEz2RKWbbG92ntdJe59vSCBAlm+QQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r81hstNu2cqjyrdoyVQx95ytlnvgPfpD42cflxEBH48KB4I/yODf1wfPndxBt/XBA7KR8E9QVCVAAUKpqlOzKkHZ5iDl+fx5QgMtJn3rTo0Sd6FU0wjVcNW5syZm4w4AH8YlAAdTXTQToWtMpaHEpbI1LvYKiNS7ii2Vyi6m12M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ao9dMtML; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ao9dMtML" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A583C4CEEA; Wed, 19 Mar 2025 09:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376651; bh=OkcOnPgwzPVAnLmEz2RKWbbG92ntdJe59vSCBAlm+QQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ao9dMtMLQEUVu+fjWsBoLEqqh0R+BhKkWJpizhHO36TaM6xnso/mU/mpIJ2LwEzG6 w3qBHEHoLZjoB/UDlEpK5DuDRj10RZg/HCkbLCytm8gufochwYvQZlmyjxwMpo2nY5 pE9TarQ4MKyl9c1jlBi8CtkYT0LdO2umrsieILKUnjOtAlru8pwlOrNOS+zbyMH9OY Oe/1psdD8KujbLy2TDTLaCyhXoRNuGpPLiBQnuvUkw3mFaqEo34WaXFEiHj8ckV0Xx GqmRwxh6m4sCde1Vj87CyA8oUlLxELA33XpueV+4pXH5T4AyiCQWL+miE6lxvv11bR e8WPInQqrb+8w== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 04/57] irqdomain.h: Stop using 'host' for domain Date: Wed, 19 Mar 2025 10:28:57 +0100 Message-ID: <20250319092951.37667-5-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It is confusing to see 'host' and 'domain' to be used as 'domain'. Given this header is all about domains, switch the remaining 'host' uses to 'domain'. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/irqdomain.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index e9ab95fbc5a9..bb7111105296 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -72,7 +72,7 @@ void of_phandle_args_to_fwspec(struct device_node *np, co= nst u32 *args, =20 /** * struct irq_domain_ops - Methods for irq_domain objects - * @match: Match an interrupt controller device node to a host, returns + * @match: Match an interrupt controller device node to a domain, returns * 1 on a match * @select: Match an interrupt controller fw specification. It is more gen= eric * than @match as it receives a complete struct irq_fwspec. Therefore, @@ -454,7 +454,7 @@ static inline struct irq_domain *irq_domain_add_nomap(s= truct device_node *of_nod return IS_ERR(d) ? NULL : d; } =20 -unsigned int irq_create_direct_mapping(struct irq_domain *host); +unsigned int irq_create_direct_mapping(struct irq_domain *domain); #endif =20 static inline struct irq_domain *irq_domain_add_tree(struct device_node *o= f_node, @@ -507,7 +507,7 @@ static inline struct irq_domain *irq_domain_create_tree= (struct fwnode_handle *fw return IS_ERR(d) ? NULL : d; } =20 -void irq_domain_remove(struct irq_domain *host); +void irq_domain_remove(struct irq_domain *domain); =20 int irq_domain_associate(struct irq_domain *domain, unsigned int irq, irq_hw_number_t hwirq); @@ -515,16 +515,16 @@ void irq_domain_associate_many(struct irq_domain *dom= ain, unsigned int irq_base, irq_hw_number_t hwirq_base, int count); =20 -unsigned int irq_create_mapping_affinity(struct irq_domain *host, +unsigned int irq_create_mapping_affinity(struct irq_domain *domain, irq_hw_number_t hwirq, const struct irq_affinity_desc *affinity); unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); void irq_dispose_mapping(unsigned int virq); =20 -static inline unsigned int irq_create_mapping(struct irq_domain *host, +static inline unsigned int irq_create_mapping(struct irq_domain *domain, irq_hw_number_t hwirq) { - return irq_create_mapping_affinity(host, hwirq, NULL); + return irq_create_mapping_affinity(domain, hwirq, NULL); } =20 struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain, --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F0FDE254B02 for ; Wed, 19 Mar 2025 09:30:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376655; cv=none; b=dqH1E8mvkgnGsWa80KBXVB6JG25POsTJACeS3efBUYDN4+ZM79v2ycc7t0FY9pd3JGwuLpz8Jk6+4G3+NVZ6IT6n8tCqUOaROyhLqdJm8VUvNTQpv+YPrxGsvnoXXJG++s0L8VuR0f9kF/WFjUZamKsHSlsMwudkDpW0vaEtscg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376655; c=relaxed/simple; bh=ebyMNCtTTrEqBq7KBj2Z4r0pT6iv1SjarksoD2qQGSE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y1HqK9GcjHEmPLwTi4MVe1e9s3mP2DPYZM8N28j1A8r7eqCbVkNqgYy/HwI6G9s2Zfgn8X20f1NQstI354pS+RirNNwdHcfXUjqBCqkrRHyFlZScwQVUljq0mnYBectSNSxHWKV7Xe1Xe304rskqrVOywE+Lb2qTjseYikGCrb8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ukWU7WJ0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ukWU7WJ0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13F86C4CEEE; Wed, 19 Mar 2025 09:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376653; bh=ebyMNCtTTrEqBq7KBj2Z4r0pT6iv1SjarksoD2qQGSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ukWU7WJ0noFM/hOU78+UK7hEPIM1AsCNMUg3I/v7hReBhZdSO1fLoD9PHYB8baKxQ MysnS6sBwxAfdluJ44xAGe+vEj8zwnk2yF4Nfgoh5YE4PUr9RPwMEVby+u1O05OGk9 UWaa16jJqDUSyd7HPakNbpXf7wXHqNrkPLXxkvZ/tSSYMP2XHRkEjIB/NuJa6eh7YF UBeDFSaZSNar/8IG+SaXUPPl7SIjlfRxOVwLje/BpNgor7wCqy2AzNP3DH4YqWjxaR 1jMASTxSZwvlAEDcAwhBDRWZrYRNLTCNiZSpBbEfc0kJTzwbP+JG7wM/AQiyjNrAOc if8CZNHQtxyVQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Nipun Gupta , Nikhil Agarwal Subject: [PATCH v2 05/57] irqdomain: cdx: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:28:58 +0100 Message-ID: <20250319092951.37667-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Nipun Gupta Cc: Nikhil Agarwal Acked-by: Nipun Gupta --- drivers/cdx/cdx_msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cdx/cdx_msi.c b/drivers/cdx/cdx_msi.c index 06d723978232..3388a5d1462c 100644 --- a/drivers/cdx/cdx_msi.c +++ b/drivers/cdx/cdx_msi.c @@ -165,7 +165,7 @@ struct irq_domain *cdx_msi_domain_init(struct device *d= ev) struct device_node *parent_node; struct irq_domain *parent; =20 - fwnode_handle =3D of_node_to_fwnode(np); + fwnode_handle =3D of_fwnode_handle(np); =20 parent_node =3D of_parse_phandle(np, "msi-map", 1); if (!parent_node) { @@ -173,7 +173,7 @@ struct irq_domain *cdx_msi_domain_init(struct device *d= ev) return NULL; } =20 - parent =3D irq_find_matching_fwnode(of_node_to_fwnode(parent_node), DOMAI= N_BUS_NEXUS); + parent =3D irq_find_matching_fwnode(of_fwnode_handle(parent_node), DOMAIN= _BUS_NEXUS); if (!parent || !msi_get_domain_info(parent)) { dev_err(dev, "unable to locate ITS domain\n"); return NULL; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2013C253B56; Wed, 19 Mar 2025 09:31:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376662; cv=none; b=YkiJjRFh6QvGqZ+62W9bnGLaXT5gxJuCepMxh6xoRbknXy9sQjIeZa6mbFWTMQvBbmIO7jFzfqdeTSX1k8ciGq7f7iVBD5Dpd2cP+zmdOU/cNmZIy8T44uuoy5VisnziNBj6AfbskLWEV8qNiOjZfOtZNGYPgkkBl+l1FC16Wyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376662; c=relaxed/simple; bh=nXAYpC2swsn1QDFpjOFNZQf9gXeszA6Q+yFh+Zwcw1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rrt8gaI7n68uuJ8T7r0ibBUBWFh69EooxR7nUvaVIiMOU1Mm3XJzsF4qp64Rf3HvN2sF9QV53puBXtbdYYmiYAWzV55Rr0oXvzkpH5J6lPXoF5rD5APfekB7LtiiMRHNYeKVkKm4hXLw4vVJZoVfF8DMa0TOjloADYZJ2fU1o5Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XoDubxg9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XoDubxg9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDF41C4CEEA; Wed, 19 Mar 2025 09:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376661; bh=nXAYpC2swsn1QDFpjOFNZQf9gXeszA6Q+yFh+Zwcw1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XoDubxg92DFVlrdEmnpI3FQNYON2UgXmQTy/TYSFx5gLOXZVwU6o5jhRFvz5YSOKf MrEzLk4cdWxNM/Y9hviJAOFeJDgZ7iVCd/nXSWrRA06p9MHcNORzIVV+i2dLJUu1df gOCw3n0UYghBk3/t5B5GhFEQxMbzVQxrsQtaWwPaxPmnM1jOds0pmBMDjQz+Hfjbcs 9uzCIzEedNjCelPf1IDczHXismnwfJwPLIIT78G/lIYzK9PHY0r3EVk9EovMdRWV8H Jo4LEs/lhSiQWhnnJj2FYn2kgw26uEeRagozTQff9EC2QRJ8pVfX0FDSIJXZkb00Dk Sx6/TIdSy/pJg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Antoine Tenart , Sven Peter , Janne Grunau , Alyssa Rosenzweig , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Linus Walleij , Imre Kaloz , Herve Codina , Huacai Chen , WANG Xuerui , Jiaxun Yang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Maxime Coquelin , Alexandre Torgue , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Kunihiko Hayashi , Masami Hiramatsu , linux-arm-kernel@lists.infradead.org, asahi@lists.linux.dev, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2 06/57] irqdomain: irqchip: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:28:59 +0100 Message-ID: <20250319092951.37667-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Antoine Tenart Cc: Sven Peter Cc: Janne Grunau Cc: Alyssa Rosenzweig Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Marc Zyngier Cc: Linus Walleij Cc: Imre Kaloz Cc: Herve Codina Cc: Huacai Chen Cc: WANG Xuerui Cc: Jiaxun Yang Cc: Neil Armstrong Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Anup Patel Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alexandre Ghiti Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: Kunihiko Hayashi Cc: Masami Hiramatsu Cc: linux-arm-kernel@lists.infradead.org Cc: asahi@lists.linux.dev Cc: loongarch@lists.linux.dev Cc: linux-mips@vger.kernel.org Cc: linux-amlogic@lists.infradead.org Cc: linux-riscv@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Acked-by: Herve Codina # irq-lan966x-oic Reviewed-by: Antonio Borneo Reviewed-by: Anup Patel Reviewed-by: Herve Codina --- drivers/irqchip/irq-alpine-msi.c | 2 +- drivers/irqchip/irq-apple-aic.c | 4 ++-- drivers/irqchip/irq-armada-370-xp.c | 4 ++-- drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 2 +- drivers/irqchip/irq-gic-v3.c | 4 ++-- drivers/irqchip/irq-ixp4xx.c | 2 +- drivers/irqchip/irq-lan966x-oic.c | 2 +- drivers/irqchip/irq-loongarch-cpu.c | 2 +- drivers/irqchip/irq-loongson-eiointc.c | 2 +- drivers/irqchip/irq-loongson-htvec.c | 2 +- drivers/irqchip/irq-loongson-liointc.c | 2 +- drivers/irqchip/irq-loongson-pch-msi.c | 2 +- drivers/irqchip/irq-loongson-pch-pic.c | 2 +- drivers/irqchip/irq-ls-scfg-msi.c | 2 +- drivers/irqchip/irq-meson-gpio.c | 2 +- drivers/irqchip/irq-mvebu-gicp.c | 2 +- drivers/irqchip/irq-mvebu-odmi.c | 2 +- drivers/irqchip/irq-mvebu-sei.c | 6 +++--- drivers/irqchip/irq-qcom-mpm.c | 2 +- drivers/irqchip/irq-riscv-intc.c | 2 +- drivers/irqchip/irq-sni-exiu.c | 2 +- drivers/irqchip/irq-stm32mp-exti.c | 2 +- drivers/irqchip/irq-ti-sci-inta.c | 4 ++-- drivers/irqchip/irq-ti-sci-intr.c | 2 +- drivers/irqchip/irq-uniphier-aidet.c | 2 +- 25 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-= msi.c index a1430ab60a8a..0207d35135da 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -213,7 +213,7 @@ static int alpine_msix_init_domains(struct alpine_msix_= data *priv, return -ENOMEM; } =20 - msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(node), + msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(node), &alpine_msix_domain_info, middle_domain); if (!msi_domain) { diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-ai= c.c index 974dc088c853..032d66dceb8e 100644 --- a/drivers/irqchip/irq-apple-aic.c +++ b/drivers/irqchip/irq-apple-aic.c @@ -1014,7 +1014,7 @@ static int __init aic_of_ic_init(struct device_node *= node, struct device_node *p =20 irqc->info.die_stride =3D off - start_off; =20 - irqc->hw_domain =3D irq_domain_create_tree(of_node_to_fwnode(node), + irqc->hw_domain =3D irq_domain_create_tree(of_fwnode_handle(node), &aic_irq_domain_ops, irqc); if (WARN_ON(!irqc->hw_domain)) goto err_unmap; @@ -1067,7 +1067,7 @@ static int __init aic_of_ic_init(struct device_node *= node, struct device_node *p =20 if (is_kernel_in_hyp_mode()) { struct irq_fwspec mi =3D { - .fwnode =3D of_node_to_fwnode(node), + .fwnode =3D of_fwnode_handle(node), .param_count =3D 3, .param =3D { [0] =3D AIC_FIQ, /* This is a lie */ diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index 2aa6a51e05d0..de98d16c1718 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -353,7 +353,7 @@ static int __init mpic_msi_init(struct mpic *mpic, stru= ct device_node *node, if (!mpic->msi_inner_domain) return -ENOMEM; =20 - mpic->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(node), &= mpic_msi_domain_info, + mpic->msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(node), &m= pic_msi_domain_info, mpic->msi_inner_domain); if (!mpic->msi_domain) { irq_domain_remove(mpic->msi_inner_domain); @@ -492,7 +492,7 @@ static int __init mpic_ipi_init(struct mpic *mpic, stru= ct device_node *node) { int base_ipi; =20 - mpic->ipi_domain =3D irq_domain_create_linear(of_node_to_fwnode(node), IP= I_DOORBELL_NR, + mpic->ipi_domain =3D irq_domain_create_linear(of_fwnode_handle(node), IPI= _DOORBELL_NR, &mpic_ipi_domain_ops, mpic); if (WARN_ON(!mpic->ipi_domain)) return -ENOMEM; diff --git a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c b/drivers/irqchip/= irq-gic-v3-its-fsl-mc-msi.c index 8e87fc35f8aa..11549d85f23b 100644 --- a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c @@ -152,7 +152,7 @@ static void __init its_fsl_mc_of_msi_init(void) if (!of_property_read_bool(np, "msi-controller")) continue; =20 - its_fsl_mc_msi_init_one(of_node_to_fwnode(np), + its_fsl_mc_msi_init_one(of_fwnode_handle(np), np->full_name); } } diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 270d7a4d85a6..efc791c43d44 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -1826,7 +1826,7 @@ static int partition_domain_translate(struct irq_doma= in *d, =20 ppi_idx =3D __gic_get_ppi_index(ppi_intid); ret =3D partition_translate_id(gic_data.ppi_descs[ppi_idx], - of_node_to_fwnode(np)); + of_fwnode_handle(np)); if (ret < 0) return ret; =20 @@ -2192,7 +2192,7 @@ static void __init gic_populate_ppi_partitions(struct= device_node *gic_node) =20 part =3D &parts[part_idx]; =20 - part->partition_id =3D of_node_to_fwnode(child_part); + part->partition_id =3D of_fwnode_handle(child_part); =20 pr_info("GIC: PPI partition %pOFn[%d] { ", child_part, part_idx); diff --git a/drivers/irqchip/irq-ixp4xx.c b/drivers/irqchip/irq-ixp4xx.c index f23b02f62a5c..a9a5a52b818a 100644 --- a/drivers/irqchip/irq-ixp4xx.c +++ b/drivers/irqchip/irq-ixp4xx.c @@ -261,7 +261,7 @@ static int __init ixp4xx_of_init_irq(struct device_node= *np, pr_crit("IXP4XX: could not ioremap interrupt controller\n"); return -ENODEV; } - fwnode =3D of_node_to_fwnode(np); + fwnode =3D of_fwnode_handle(np); =20 /* These chip variants have 64 interrupts */ is_356 =3D of_device_is_compatible(np, "intel,ixp43x-interrupt") || diff --git a/drivers/irqchip/irq-lan966x-oic.c b/drivers/irqchip/irq-lan966= x-oic.c index 41ac880e3b87..9445c3a6b1b0 100644 --- a/drivers/irqchip/irq-lan966x-oic.c +++ b/drivers/irqchip/irq-lan966x-oic.c @@ -224,7 +224,7 @@ static int lan966x_oic_probe(struct platform_device *pd= ev) .exit =3D lan966x_oic_chip_exit, }; struct irq_domain_info d_info =3D { - .fwnode =3D of_node_to_fwnode(pdev->dev.of_node), + .fwnode =3D of_fwnode_handle(pdev->dev.of_node), .domain_flags =3D IRQ_DOMAIN_FLAG_DESTROY_GC, .size =3D LAN966X_OIC_NR_IRQ, .hwirq_max =3D LAN966X_OIC_NR_IRQ, diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loon= garch-cpu.c index e62dab4c97fc..950bc087e388 100644 --- a/drivers/irqchip/irq-loongarch-cpu.c +++ b/drivers/irqchip/irq-loongarch-cpu.c @@ -100,7 +100,7 @@ static const struct irq_domain_ops loongarch_cpu_intc_i= rq_domain_ops =3D { static int __init cpuintc_of_init(struct device_node *of_node, struct device_node *parent) { - cpuintc_handle =3D of_node_to_fwnode(of_node); + cpuintc_handle =3D of_fwnode_handle(of_node); =20 irq_domain =3D irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, &loongarch_cpu_intc_irq_domain_ops, NULL); diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-l= oongson-eiointc.c index bb79e19dfb59..b2860eb2d32c 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -554,7 +554,7 @@ static int __init eiointc_of_init(struct device_node *o= f_node, priv->vec_count =3D VEC_COUNT; =20 priv->node =3D 0; - priv->domain_handle =3D of_node_to_fwnode(of_node); + priv->domain_handle =3D of_fwnode_handle(of_node); =20 ret =3D eiointc_init(priv, parent_irq, 0); if (ret < 0) diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip/irq-loo= ngson-htvec.c index 5da02c7ad0b3..d8558eb35044 100644 --- a/drivers/irqchip/irq-loongson-htvec.c +++ b/drivers/irqchip/irq-loongson-htvec.c @@ -248,7 +248,7 @@ static int htvec_of_init(struct device_node *node, } =20 err =3D htvec_init(res.start, resource_size(&res), - num_parents, parent_irq, of_node_to_fwnode(node)); + num_parents, parent_irq, of_fwnode_handle(node)); if (err < 0) return err; =20 diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-l= oongson-liointc.c index 2b1bd4a96665..95cade56e0be 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -363,7 +363,7 @@ static int __init liointc_of_init(struct device_node *n= ode, } =20 err =3D liointc_init(res.start, resource_size(&res), - revision, of_node_to_fwnode(node), node); + revision, of_fwnode_handle(node), node); if (err < 0) return err; =20 diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-l= oongson-pch-msi.c index 9c62108b3ad5..c07876ae7b49 100644 --- a/drivers/irqchip/irq-loongson-pch-msi.c +++ b/drivers/irqchip/irq-loongson-pch-msi.c @@ -243,7 +243,7 @@ static int pch_msi_of_init(struct device_node *node, st= ruct device_node *parent) return -EINVAL; } =20 - err =3D pch_msi_init(res.start, irq_base, irq_count, parent_domain, of_no= de_to_fwnode(node)); + err =3D pch_msi_init(res.start, irq_base, irq_count, parent_domain, of_fw= node_handle(node)); if (err < 0) return err; =20 diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-l= oongson-pch-pic.c index 69efda35a8e7..62e6bf3a0611 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -392,7 +392,7 @@ static int pch_pic_of_init(struct device_node *node, } =20 err =3D pch_pic_init(res.start, resource_size(&res), vec_base, - parent_domain, of_node_to_fwnode(node), 0); + parent_domain, of_fwnode_handle(node), 0); if (err < 0) return err; =20 diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scf= g-msi.c index 3cb80796cc7c..cbe11a8afe4f 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -225,7 +225,7 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi = *msi_data) } =20 msi_data->msi_domain =3D pci_msi_create_irq_domain( - of_node_to_fwnode(msi_data->pdev->dev.of_node), + of_fwnode_handle(msi_data->pdev->dev.of_node), &ls_scfg_msi_domain_info, msi_data->parent); if (!msi_data->msi_domain) { diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-g= pio.c index 0a25536a5d07..7d177626d64b 100644 --- a/drivers/irqchip/irq-meson-gpio.c +++ b/drivers/irqchip/irq-meson-gpio.c @@ -607,7 +607,7 @@ static int meson_gpio_irq_of_init(struct device_node *n= ode, struct device_node * =20 domain =3D irq_domain_create_hierarchy(parent_domain, 0, ctl->params->nr_hwirq, - of_node_to_fwnode(node), + of_fwnode_handle(node), &meson_gpio_irq_domain_ops, ctl); if (!domain) { diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-g= icp.c index d67f93f6d750..521cc265c05e 100644 --- a/drivers/irqchip/irq-mvebu-gicp.c +++ b/drivers/irqchip/irq-mvebu-gicp.c @@ -232,7 +232,7 @@ static int mvebu_gicp_probe(struct platform_device *pde= v) =20 inner_domain =3D irq_domain_create_hierarchy(parent_domain, 0, gicp->spi_cnt, - of_node_to_fwnode(node), + of_fwnode_handle(node), &gicp_domain_ops, gicp); if (!inner_domain) return -ENOMEM; diff --git a/drivers/irqchip/irq-mvebu-odmi.c b/drivers/irqchip/irq-mvebu-o= dmi.c index 28f7e81df94f..c1fcd4525e3b 100644 --- a/drivers/irqchip/irq-mvebu-odmi.c +++ b/drivers/irqchip/irq-mvebu-odmi.c @@ -207,7 +207,7 @@ static int __init mvebu_odmi_init(struct device_node *n= ode, =20 inner_domain =3D irq_domain_create_hierarchy(parent_domain, 0, odmis_count * NODMIS_PER_FRAME, - of_node_to_fwnode(node), + of_fwnode_handle(node), &odmi_domain_ops, NULL); if (!inner_domain) { ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-se= i.c index ebd4a9014e8d..5030fcecdcc3 100644 --- a/drivers/irqchip/irq-mvebu-sei.c +++ b/drivers/irqchip/irq-mvebu-sei.c @@ -402,7 +402,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 +418,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) { @@ -432,7 +432,7 @@ static int mvebu_sei_probe(struct platform_device *pdev) /* 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), + of_fwnode_handle(node), &mvebu_sei_cp_domain_ops, sei); if (!sei->cp_domain) { diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c index 7942d8eb3d00..00c770e367d0 100644 --- a/drivers/irqchip/irq-qcom-mpm.c +++ b/drivers/irqchip/irq-qcom-mpm.c @@ -447,7 +447,7 @@ static int qcom_mpm_init(struct device_node *np, struct= device_node *parent) =20 priv->domain =3D irq_domain_create_hierarchy(parent_domain, IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP, pin_cnt, - of_node_to_fwnode(np), &qcom_mpm_ops, priv); + of_fwnode_handle(np), &qcom_mpm_ops, priv); if (!priv->domain) { dev_err(dev, "failed to create MPM domain\n"); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-i= ntc.c index f653c13de62b..e5805885394e 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -242,7 +242,7 @@ static int __init riscv_intc_init(struct device_node *n= ode, chip =3D &andes_intc_chip; } =20 - return riscv_intc_init_common(of_node_to_fwnode(node), chip); + return riscv_intc_init_common(of_fwnode_handle(node), chip); } =20 IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init); diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c index c7db617e1a2f..7d10bf6e5824 100644 --- a/drivers/irqchip/irq-sni-exiu.c +++ b/drivers/irqchip/irq-sni-exiu.c @@ -249,7 +249,7 @@ static int __init exiu_dt_init(struct device_node *node, return -ENXIO; } =20 - data =3D exiu_init(of_node_to_fwnode(node), &res); + data =3D exiu_init(of_fwnode_handle(node), &res); if (IS_ERR(data)) return PTR_ERR(data); =20 diff --git a/drivers/irqchip/irq-stm32mp-exti.c b/drivers/irqchip/irq-stm32= mp-exti.c index cb83d6cc6113..649b84f12efc 100644 --- a/drivers/irqchip/irq-stm32mp-exti.c +++ b/drivers/irqchip/irq-stm32mp-exti.c @@ -531,7 +531,7 @@ static int stm32mp_exti_domain_alloc(struct irq_domain = *dm, if (ret) return ret; /* we only support one parent, so far */ - if (of_node_to_fwnode(out_irq.np) !=3D dm->parent->fwnode) + if (of_fwnode_handle(out_irq.np) !=3D dm->parent->fwnode) return -EINVAL; =20 of_phandle_args_to_fwspec(out_irq.np, out_irq.args, diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci= -inta.c index a887efba262c..38dfc1f9a56b 100644 --- a/drivers/irqchip/irq-ti-sci-inta.c +++ b/drivers/irqchip/irq-ti-sci-inta.c @@ -233,7 +233,7 @@ static struct ti_sci_inta_vint_desc *ti_sci_inta_alloc_= parent_irq(struct irq_dom INIT_LIST_HEAD(&vint_desc->list); =20 parent_node =3D of_irq_find_parent(dev_of_node(&inta->pdev->dev)); - parent_fwspec.fwnode =3D of_node_to_fwnode(parent_node); + parent_fwspec.fwnode =3D of_fwnode_handle(parent_node); =20 if (of_device_is_compatible(parent_node, "arm,gic-v3")) { /* Parent is GIC */ @@ -709,7 +709,7 @@ static int ti_sci_inta_irq_domain_probe(struct platform= _device *pdev) return -ENOMEM; } =20 - msi_domain =3D ti_sci_inta_msi_create_irq_domain(of_node_to_fwnode(node), + msi_domain =3D ti_sci_inta_msi_create_irq_domain(of_fwnode_handle(node), &ti_sci_inta_msi_domain_info, domain); if (!msi_domain) { diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci= -intr.c index b49a73106c69..686a8f69fd9c 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -149,7 +149,7 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_doma= in *domain, goto err_irqs; =20 parent_node =3D of_irq_find_parent(dev_of_node(intr->dev)); - fwspec.fwnode =3D of_node_to_fwnode(parent_node); + fwspec.fwnode =3D of_fwnode_handle(parent_node); =20 if (of_device_is_compatible(parent_node, "arm,gic-v3")) { /* Parent is GIC */ diff --git a/drivers/irqchip/irq-uniphier-aidet.c b/drivers/irqchip/irq-uni= phier-aidet.c index 601f9343d5b3..6005c2d28dd9 100644 --- a/drivers/irqchip/irq-uniphier-aidet.c +++ b/drivers/irqchip/irq-uniphier-aidet.c @@ -188,7 +188,7 @@ static int uniphier_aidet_probe(struct platform_device = *pdev) priv->domain =3D irq_domain_create_hierarchy( parent_domain, 0, UNIPHIER_AIDET_NR_IRQS, - of_node_to_fwnode(dev->of_node), + of_fwnode_handle(dev->of_node), &uniphier_aidet_domain_ops, priv); if (!priv->domain) return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 15518255226; Wed, 19 Mar 2025 09:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376668; cv=none; b=tPP4Arm5mtqLKv0wlP6EKVb3vdh4N4JC5+3CqjQEWF6ZgGXaQqEdKAGaCZCuNBU3zbcCoVx4/6bnD9rEypl5mWOmKjRNKl8xkW6e36IbsepdXyTM43yV28IpO6ovGDQ1RBZ8VHQk7Gpu6U92EAIpqrf1Hfxi8oDlt9LL2q7QkPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376668; c=relaxed/simple; bh=C0EwI2qvaoCL5JQRyTMhv6szHa2gBhAxP5puHY4y+yY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DTCMhTNkzqofsa9lfJmRaNNnsvq1tIM9FxWP+kRV3E3LRxCN0o6g23FfBDByixYRwy6rmUgkYUoLpjNv7OrNwLgBaIbt0+1mfo1vhprUon+ANm+Z9+W8G76fhQ6QgvbmeIvSyVhjJtq7JfH17GFsFdNW9H5qLbYj4i1Glx/3Efk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OWDYzsHV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OWDYzsHV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19EC1C4CEF2; Wed, 19 Mar 2025 09:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376667; bh=C0EwI2qvaoCL5JQRyTMhv6szHa2gBhAxP5puHY4y+yY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OWDYzsHVjW+SKCwKZUiCBbm9xI2NSyNzywY6ZTgSd4I2UBHIIJKqNypdPGOp9/kz4 pQTvaVcRjWHORZ8rnk4P3URxqEq//bzrKSITS7W8hDcS4BUqzGZDKKGUzypKujDDLG rnyjvt8M4MenNKYIXu6yXjy0HtbN4NBgjtLb3a+4awl6iHv4t/ugVbtR2SAgW6GurN rR9avJoN1oOhLYTetGQE12F/PnQHG1ukJqr72v+Rws6gQ6gyjcM0PDHV2GSI+8+XNE Dlz15Ao37GAi9q+WEB7+bENeKNHz2sx8azwzhRNQhaVVSGRIJG2PyLtM9Lsk1maU4X BLL5ZtGwbhdjg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Karthikeyan Mitran , Hou Zhiqiang , Toan Le , Joyce Ooi , Jim Quinlan , Nicolas Saenz Julienne , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Ryder Lee , Jianjun Wang , Michal Simek , Daire McNamara , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 07/57] irqdomain: pci: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:29:00 +0100 Message-ID: <20250319092951.37667-8-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Jingoo Han Cc: Manivannan Sadhasivam Cc: Lorenzo Pieralisi Cc: "Krzysztof Wilczy=C5=84ski" Cc: Rob Herring Cc: Bjorn Helgaas Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Toan Le Cc: Joyce Ooi Cc: Jim Quinlan Cc: Nicolas Saenz Julienne Cc: Florian Fainelli Cc: Broadcom internal kernel review list Cc: Ray Jui Cc: Scott Branden Cc: Ryder Lee Cc: Jianjun Wang Cc: Michal Simek Cc: Daire McNamara Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org --- drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 2 +- drivers/pci/controller/pci-xgene-msi.c | 2 +- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 2 +- drivers/pci/controller/pcie-mediatek.c | 2 +- drivers/pci/controller/pcie-xilinx-dma-pl.c | 2 +- drivers/pci/controller/pcie-xilinx-nwl.c | 2 +- drivers/pci/controller/plda/pcie-plda-host.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index ecc33f6789e3..d1cd48efad43 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -227,7 +227,7 @@ static const struct irq_domain_ops dw_pcie_msi_domain_o= ps =3D { int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) { struct dw_pcie *pci =3D to_dw_pcie_from_pp(pp); - struct fwnode_handle *fwnode =3D of_node_to_fwnode(pci->dev->of_node); + struct fwnode_handle *fwnode =3D of_fwnode_handle(pci->dev->of_node); =20 pp->irq_domain =3D irq_domain_create_linear(fwnode, pp->num_vectors, &dw_pcie_msi_domain_ops, pp); diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers= /pci/controller/mobiveil/pcie-mobiveil-host.c index 0e088e74155d..6628eed9d26e 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -435,7 +435,7 @@ static const struct irq_domain_ops msi_domain_ops =3D { static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie) { struct device *dev =3D &pcie->pdev->dev; - struct fwnode_handle *fwnode =3D of_node_to_fwnode(dev->of_node); + struct fwnode_handle *fwnode =3D of_fwnode_handle(dev->of_node); struct mobiveil_msi *msi =3D &pcie->rp.msi; =20 mutex_init(&msi->lock); diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controlle= r/pci-xgene-msi.c index 7bce327897c9..69a9c0a87639 100644 --- a/drivers/pci/controller/pci-xgene-msi.c +++ b/drivers/pci/controller/pci-xgene-msi.c @@ -247,7 +247,7 @@ static int xgene_allocate_domains(struct xgene_msi *msi) if (!msi->inner_domain) return -ENOMEM; =20 - msi->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(msi->node= ), + msi->msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(msi->node), &xgene_msi_domain_info, msi->inner_domain); =20 diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/control= ler/pcie-altera-msi.c index e1cee3c0575f..5fb3a2e0017e 100644 --- a/drivers/pci/controller/pcie-altera-msi.c +++ b/drivers/pci/controller/pcie-altera-msi.c @@ -164,7 +164,7 @@ static const struct irq_domain_ops msi_domain_ops =3D { =20 static int altera_allocate_domains(struct altera_msi *msi) { - struct fwnode_handle *fwnode =3D of_node_to_fwnode(msi->pdev->dev.of_node= ); + struct fwnode_handle *fwnode =3D of_fwnode_handle(msi->pdev->dev.of_node); =20 msi->inner_domain =3D irq_domain_add_linear(NULL, msi->num_of_vectors, &msi_domain_ops, msi); diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller= /pcie-brcmstb.c index 8b2b099e81eb..1f356fca07a2 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -581,7 +581,7 @@ static const struct irq_domain_ops msi_domain_ops =3D { =20 static int brcm_allocate_domains(struct brcm_msi *msi) { - struct fwnode_handle *fwnode =3D of_node_to_fwnode(msi->np); + struct fwnode_handle *fwnode =3D of_fwnode_handle(msi->np); struct device *dev =3D msi->dev; =20 msi->inner_domain =3D irq_domain_add_linear(NULL, msi->nr, &msi_domain_op= s, msi); diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controll= er/pcie-iproc-msi.c index 649fcb449f34..804b3a5787c5 100644 --- a/drivers/pci/controller/pcie-iproc-msi.c +++ b/drivers/pci/controller/pcie-iproc-msi.c @@ -451,7 +451,7 @@ static int iproc_msi_alloc_domains(struct device_node *= node, if (!msi->inner_domain) return -ENOMEM; =20 - msi->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(node), + msi->msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(node), &iproc_msi_domain_info, msi->inner_domain); if (!msi->msi_domain) { diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controlle= r/pcie-mediatek.c index 811a8b4acd50..efcc4a7c17be 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -485,7 +485,7 @@ static struct msi_domain_info mtk_msi_domain_info =3D { =20 static int mtk_pcie_allocate_msi_domains(struct mtk_pcie_port *port) { - struct fwnode_handle *fwnode =3D of_node_to_fwnode(port->pcie->dev->of_no= de); + struct fwnode_handle *fwnode =3D of_fwnode_handle(port->pcie->dev->of_nod= e); =20 mutex_init(&port->lock); =20 diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/cont= roller/pcie-xilinx-dma-pl.c index dd117f07fc95..71cf13ae51c7 100644 --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c @@ -470,7 +470,7 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struc= t pl_dma_pcie *port) struct device *dev =3D port->dev; struct xilinx_msi *msi =3D &port->msi; int size =3D BITS_TO_LONGS(XILINX_NUM_MSI_IRQS) * sizeof(long); - struct fwnode_handle *fwnode =3D of_node_to_fwnode(port->dev->of_node); + struct fwnode_handle *fwnode =3D of_fwnode_handle(port->dev->of_node); =20 msi->dev_domain =3D irq_domain_add_linear(NULL, XILINX_NUM_MSI_IRQS, &dev_msi_domain_ops, port); diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/control= ler/pcie-xilinx-nwl.c index 8d6e2a89b067..9cf8a96f7bc4 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -495,7 +495,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie= *pcie) { #ifdef CONFIG_PCI_MSI struct device *dev =3D pcie->dev; - struct fwnode_handle *fwnode =3D of_node_to_fwnode(dev->of_node); + struct fwnode_handle *fwnode =3D of_fwnode_handle(dev->of_node); struct nwl_msi *msi =3D &pcie->msi; =20 msi->dev_domain =3D irq_domain_add_linear(NULL, INT_PCI_MSI_NR, diff --git a/drivers/pci/controller/plda/pcie-plda-host.c b/drivers/pci/con= troller/plda/pcie-plda-host.c index 4153214ca410..4c7a9fa311e3 100644 --- a/drivers/pci/controller/plda/pcie-plda-host.c +++ b/drivers/pci/controller/plda/pcie-plda-host.c @@ -150,7 +150,7 @@ static struct msi_domain_info plda_msi_domain_info =3D { static int plda_allocate_msi_domains(struct plda_pcie_rp *port) { struct device *dev =3D port->dev; - struct fwnode_handle *fwnode =3D of_node_to_fwnode(dev->of_node); + struct fwnode_handle *fwnode =3D of_fwnode_handle(dev->of_node); struct plda_msi *msi =3D &port->msi; =20 mutex_init(&port->msi.lock); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 ABD4A253F04 for ; Wed, 19 Mar 2025 09:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376671; cv=none; b=H5derCNvy8zNEte7kacGsj7oPOxSbDSA8Gvdf/3cvbKJ509q5QaSOsVShzQR4scJfUqIncaNCEOfivFmKUlX8VdeaJFHLIpBr8cKxaVqF3x9tQcUQeEoqsB/bjezUzwNGo2iUAkgffMVec2r+4IZis5HzgWga2BO3P6iOd7MPAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376671; c=relaxed/simple; bh=ZhE2RX1DzogrkLp/XQnGF8fK6IIiYf5DdB69tq+aBqA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HOzjwE6ccd9h7aTPqJOAOdtyWorjmEkHfx33bKAHfHgTW/fjsAoVZlPGiibyuNsB2ZHZT49JLFe3eqlSovEHG6k30qmFNjA/cm9PBpGCrVLtqum0oUZZFSlHXM0OPED6qMI4KCx36kSpBM0e2f0zRU4FWUgfgi8W7SYFSAS+onc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vRyxyYsr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vRyxyYsr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04CE7C4CEE9; Wed, 19 Mar 2025 09:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376670; bh=ZhE2RX1DzogrkLp/XQnGF8fK6IIiYf5DdB69tq+aBqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRyxyYsr9l+WcVCxIWgYxwWPDzfPqHn2pY4ui2Pd6w3YkuxGdswrbAiNSS5k5o/Zk olri7kh5KeOJZ0PoGnYaYikbaGafzSdJSeriOBmOu4BNkXTZ4+W15MgqycDBmoZS1v W4lw1CpsWwgA93v8e0GiOMOp5wvsbl//ICor0BQY7+76rU3ahSF1e3XzKSE3nUEvtH dNwLXYkSApuCqzhIb2hcR0x5u7dwseNWf+mJ+9oBxCvtqeNX6wkW75WXV1hnIfVI55 tNMdTeJMvqCAnJiaWvp4ELLQlz2T/ZBKrDXSAS55Na6/hhjL5UZbCRqwb0vshao6Gl 4bNu5u4wx/XaQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 08/57] irqdomain: ppc: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:29:01 +0100 Message-ID: <20250319092951.37667-9-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- arch/powerpc/platforms/pseries/msi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platf= orms/powernv/pci-ioda.c index ae4b549b5ca0..d8ccf2c9b98a 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1897,7 +1897,7 @@ static int __init pnv_msi_allocate_domains(struct pci= _controller *hose, unsigned return -ENOMEM; } =20 - hose->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(hose->dn= ), + hose->msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(hose->dn), &pnv_msi_domain_info, hose->dev_domain); if (!hose->msi_domain) { diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/= pseries/msi.c index f9d80111c322..5b191f70c088 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -628,7 +628,7 @@ static int __pseries_msi_allocate_domains(struct pci_co= ntroller *phb, return -ENOMEM; } =20 - phb->msi_domain =3D pci_msi_create_irq_domain(of_node_to_fwnode(phb->dn), + phb->msi_domain =3D pci_msi_create_irq_domain(of_fwnode_handle(phb->dn), &pseries_msi_domain_info, phb->dev_domain); if (!phb->msi_domain) { --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5F6B6253F0A; Wed, 19 Mar 2025 09:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376672; cv=none; b=qBT5PG27z4zJhlMVOa+aYnDIoOe9bta1dsdnV9npbGa/2izhY0d/U6boQS5nfNQGlqlWekldogHQhSePe1kl6dDaG8TdtmhM1bCxiT+kJloSLTj10eIFrOsAMPoHhsWwh03cSvM0MhFuiVAyzaz+uSUDIRjzLRwLKHgZx2S0V5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376672; c=relaxed/simple; bh=g816PyXJcj3PW9KR/oQmBslgPC6PMvYLghvAqSoQ0C8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EkKrq2TV/nUcOERrakenTcUpA1dzHFOk8DM5GXBFUBAFd7qOys30iqiNNREyoj7Rg5FAu2hjH3/1+58UAyrTzuumdj5gn/eSNsF+wss5M8fHF2Dw85Bwfno8tZmhH8Rq8/cXYn+bNSQs90GkepIWd97NaO7nB4Bx+GV1sIY9Bog= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rzYaUNqw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rzYaUNqw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A4FCC4CEEE; Wed, 19 Mar 2025 09:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376672; bh=g816PyXJcj3PW9KR/oQmBslgPC6PMvYLghvAqSoQ0C8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rzYaUNqw3yDUYu54/JcI1YvA3lI0bmnIH0PMyL3ifUWgBlhy5L5dEzoWuYcScymUx 5TF7j2HxS/3dRaKeu5MJZdYLOaP4AkUZ9a1TGHGvcGWsg/zXsDEffYIDHh/BSzqliD Gd8TKQrd0WzU8DNgjXaBDfSVslr1L1lHMHw6bIawzMyB6//aMvz1SNxd1oRhXmoPN5 zsJfgJlHRTL8/GiKnYRhc7lkHRYD3iwrmFYZPCZ+zl1GcQBeM6Ztnb064vnfKUkssK +nAkmQKRH5hYqh1RNaeixTR1t9zOVhcRBhSvWsmUy7Ljk2z80DHod/k5eFXvbl8+HS wQLNkFeJWWhcQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Bjorn Andersson , Mathieu Poirier , linux-remoteproc@vger.kernel.org Subject: [PATCH v2 09/57] irqdomain: remoteproc: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:29:02 +0100 Message-ID: <20250319092951.37667-10-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Bjorn Andersson Cc: Mathieu Poirier Cc: linux-remoteproc@vger.kernel.org --- drivers/remoteproc/pru_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 1656574b7317..4a4eb9c0b133 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -563,7 +563,7 @@ static int pru_handle_intrmap(struct rproc *rproc) return -ENODEV; } =20 - fwspec.fwnode =3D of_node_to_fwnode(irq_parent); + fwspec.fwnode =3D of_fwnode_handle(irq_parent); fwspec.param_count =3D 3; for (i =3D 0; i < pru->evt_count; i++) { fwspec.param[0] =3D rsc->pru_intc_map[i].event; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D954B255E39 for ; Wed, 19 Mar 2025 09:31:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376674; cv=none; b=aN6zTxRlH7LooOCX+suToBs8wKXYCPDNiSHc8BYwidnkWQomXeV9wL0G/XPDCB+JE5dnKUZCLpDoAJM8UMhHV9L5JRhFLxapXZJkj6GLdnptFbf8NSl9KED6n61E6IgycPVBx2+X6pDqq1kiXItGOYx1lFDkxo31i2WvPM9Evj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376674; c=relaxed/simple; bh=NaUebujBUUHk/YLaA7S6CPpdQubsvT1Q6Qh1BsUzd/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e4BaxxN7A+1XVaYscY/Zgl6dC+3llV37Yndr7HCDTObVp/co1RdoxRdjhTwYCEdnlAupUWLeSuvt+pG969zE1E6AuQEnw7jAMVOxopE62DBI0t8JKUrNxYYmo521+iakt8Bxo8DjzgQVzFhYaiUFjS/e2kP3b6RBJHJSBNoNg8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fmumnTWt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fmumnTWt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACBE9C4CEEE; Wed, 19 Mar 2025 09:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376674; bh=NaUebujBUUHk/YLaA7S6CPpdQubsvT1Q6Qh1BsUzd/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fmumnTWt09IkQ9Zs54sPuzsWTq54TsLy8Fdp67fx0LeQzaPU6mgHcRgGfbeTbsGzZ Ev87+UcHK6d9xah6YPoAR1bKDvRXDICOipIReKNLnBi8FegARxeJ/Hd0UZjognqsDU 8pGrChIruS6SjslMWqmBAfTl5Yc8J2jTLen1KhmlwIvc1V7FEDbqH//ITGZcup9BA0 sfB+h8aC5Tl8hw94PR+5w5gKFmy/9EzMWr046aCNNvD+GV5ouBraAdMhjEu/Gs/Ipu zVIZM4Arx/D+M1Q4XiKHf74RHOSB4R0dLkl30S+H5nosyX2bHyXUqp5NX6m43xjudc SuEGwhKaaseUQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v2 10/57] irqdomain: x86: Switch to of_fwnode_handle() Date: Wed, 19 Mar 2025 10:29:03 +0100 Message-ID: <20250319092951.37667-11-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" of_node_to_fwnode() is irqdomain's reimplementation of the "officially" defined of_fwnode_handle(). The former is in the process of being removed, so use the latter instead. Signed-off-by: Jiri Slaby (SUSE) Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" --- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index eebc360ed1bb..487992cb0836 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2225,7 +2225,7 @@ static int mp_irqdomain_create(int ioapic) =20 /* Handle device tree enumerated APICs proper */ if (cfg->dev) { - fn =3D of_node_to_fwnode(cfg->dev); + fn =3D of_fwnode_handle(cfg->dev); } else { fn =3D irq_domain_alloc_named_id_fwnode("IO-APIC", mpc_ioapic_id(ioapic)= ); if (!fn) --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 30F8D253F1E for ; Wed, 19 Mar 2025 09:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376678; cv=none; b=ZtarLosuzVTwiSnl7xBGNhNSxaR6pXfyJeR7cPgWEcSJe1Wo6pF33En4cgtJGcg9e7VUFZqbk5PZJIqRgUlKfr84iJ6sjsteM60L632SQzX118bZkeI8RPTTTc78zYaNtfL9Tmv++n3djEPHvems34ioi79RSYu0VKPxd4Evvr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376678; c=relaxed/simple; bh=5X/2KZBe0rTzqTYeY+UtAe+OLiGg47tjFCLWPcVkPKo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lcjyy5F1/R3fxneO+jM4vS48cNDKKxN2tR+5lPcv/nwpQWAF2R6BP4R0iojwC/QG1xFlMISUZy6ywIOGbNV02oW1wQYsqm/cSesD/b6g6TMSMaU4aIL1NtiF4n2348DTAV6imzCAjZsMxquzs0Yj1YhS4Qrh6fEdQkvG1qbvCIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jvi+Ey6A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jvi+Ey6A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2288CC4CEE9; Wed, 19 Mar 2025 09:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376676; bh=5X/2KZBe0rTzqTYeY+UtAe+OLiGg47tjFCLWPcVkPKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jvi+Ey6Ap7q3t1h90SNBYQiWfxRBI4WpOQ27WwhyZ6nsbQjadFSYG+ClF0NsfiTTi nXU3tW5XPs7+hULnW5u2Q3PgDIuh814QaVAY04YQDQqLsk54bP2BSUshYBdsoHclwd 1Fue+Nxwv7qfxI+dUV57EZ45ZUdXrZiJBvUsjvpixdL9EzLyMnYKSFPJX/sMzSEsG5 tYpX7kMkf2dHLYlV65Hm3QZq6hExsTUH3ye0SKZ245vEyhCOMJvzEoY/MnaG9dTaeK JAR7T1oVvFMufFSarmlD+djKczI+hP5lVRviFJCbfeULcSLytlcVuh5bNsbIWKUGFX NiJcf96zy8rCQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 11/57] irqdomain: Drop of_node_to_fwnode() Date: Wed, 19 Mar 2025 10:29:04 +0100 Message-ID: <20250319092951.37667-12-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All uses of of_node_to_fwnode() in non-irqdomain code were changed to "officially" defined of_fwnode_handle(). Therefore, the former can be dropped along with the last uses in the irqdomain code. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/irqdomain.h | 17 ++++++----------- kernel/irq/irqdomain.c | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index bb7111105296..5eaaf74647ed 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -358,11 +358,6 @@ int irq_domain_alloc_descs(int virq, unsigned int nr_i= rqs, irq_hw_number_t hwirq, int node, const struct irq_affinity_desc *affinity); =20 -static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *= node) -{ - return node ? &node->fwnode : NULL; -} - extern const struct fwnode_operations irqchip_fwnode_ops; =20 static inline bool is_fwnode_irqchip(const struct fwnode_handle *fwnode) @@ -387,7 +382,7 @@ struct irq_domain *irq_find_matching_fwnode(struct fwno= de_handle *fwnode, static inline struct irq_domain *irq_find_matching_host(struct device_node= *node, enum irq_domain_bus_token bus_token) { - return irq_find_matching_fwnode(of_node_to_fwnode(node), bus_token); + return irq_find_matching_fwnode(of_fwnode_handle(node), bus_token); } =20 static inline struct irq_domain *irq_find_host(struct device_node *node) @@ -407,7 +402,7 @@ static inline struct irq_domain *irq_domain_add_simple(= struct device_node *of_no const struct irq_domain_ops *ops, void *host_data) { - return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_i= rq, ops, host_data); + return irq_domain_create_simple(of_fwnode_handle(of_node), size, first_ir= q, ops, host_data); } =20 /** @@ -423,7 +418,7 @@ static inline struct irq_domain *irq_domain_add_linear(= struct device_node *of_no void *host_data) { struct irq_domain_info info =3D { - .fwnode =3D of_node_to_fwnode(of_node), + .fwnode =3D of_fwnode_handle(of_node), .size =3D size, .hwirq_max =3D size, .ops =3D ops, @@ -442,7 +437,7 @@ static inline struct irq_domain *irq_domain_add_nomap(s= truct device_node *of_nod void *host_data) { struct irq_domain_info info =3D { - .fwnode =3D of_node_to_fwnode(of_node), + .fwnode =3D of_fwnode_handle(of_node), .hwirq_max =3D max_irq, .direct_max =3D max_irq, .ops =3D ops, @@ -462,7 +457,7 @@ static inline struct irq_domain *irq_domain_add_tree(st= ruct device_node *of_node void *host_data) { struct irq_domain_info info =3D { - .fwnode =3D of_node_to_fwnode(of_node), + .fwnode =3D of_fwnode_handle(of_node), .hwirq_max =3D ~0U, .ops =3D ops, .host_data =3D host_data, @@ -611,7 +606,7 @@ static inline struct irq_domain *irq_domain_add_hierarc= hy(struct irq_domain *par void *host_data) { return irq_domain_create_hierarchy(parent, flags, size, - of_node_to_fwnode(node), + of_fwnode_handle(node), ops, host_data); } =20 diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 9d5c8651492d..abed179737c2 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -502,7 +502,7 @@ struct irq_domain *irq_domain_add_legacy(struct device_= node *of_node, const struct irq_domain_ops *ops, void *host_data) { - return irq_domain_create_legacy(of_node_to_fwnode(of_node), size, + return irq_domain_create_legacy(of_fwnode_handle(of_node), size, first_irq, first_hwirq, ops, host_data); } EXPORT_SYMBOL_GPL(irq_domain_add_legacy); @@ -885,7 +885,7 @@ void of_phandle_args_to_fwspec(struct device_node *np, = const u32 *args, { int i; =20 - fwspec->fwnode =3D of_node_to_fwnode(np); + fwspec->fwnode =3D of_fwnode_handle(np); fwspec->param_count =3D count; =20 for (i =3D 0; i < count; i++) --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 30F26253F17 for ; Wed, 19 Mar 2025 09:31:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376678; cv=none; b=hcgvjmbNnYbaxBv/sAyev1N2D4kFkc1+0My7o6JrYu3xBagUWFgF/nFAnKYBtsl21Rg6dpcgCp0d5/n8IZCs/o4tbJDQEycwVQMGoccwiQHiMt+3rLb0KBUetNZ5yOuC48Y8v6zYCUrxZx6V2q1npuWQ812NV5MP3Il9+g7fuUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376678; c=relaxed/simple; bh=A9JMukVn1ElZ6xIqyhzwrCcloTB2hr9Quxn11wF3+98=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gwweCKoRfAGEZq21ZoJC53TgNlC//BPRtd2X0VWXM5c0p0gyoL2Iz7WSTMnlVSFNWOIPC0UOdG4E5ACuYRIt8ggCJVk3c6corU2EItq7XQhQrdGDLD64CPn20LbWuS3l8xnSAcgqgLm9WKN1tRXCYTAUzTYM8JYutRGyewIsMR0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZE7WoUyw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZE7WoUyw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FAAFC4CEEF; Wed, 19 Mar 2025 09:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376677; bh=A9JMukVn1ElZ6xIqyhzwrCcloTB2hr9Quxn11wF3+98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZE7WoUywE7NIJKwxx4LNiOeGLPxxz2JC+zz6Kq8I0NxChrQ7BgODXdXQUz7KcJX16 bApYzZxNL9101bQbzQzG9OtZDxKIQsjquXHtftT1E1UJJzroTOJt4qTxXCo0aLMjbu 4SMcszopxfeauAxnWOCzF67Dhec8L6cnvPntq76ZFPOGwZMRgvazC18tRja4zRUx4a 3GDup4AR9XdbP1/nc7+9sBvx/y5Z993boLEa+gV8+O4gt+5/L9FLMER0PXgYk6DgYE O+dboNjI8cK7Cjd5V5TXD45YP1BEkXyazvoJ3FmUxbDiX20YpsZLolQN6dGSGj6q3k jAG0l1/uM5w7A== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 12/57] irqdomain: Make irq_domain_create_hierarchy() an inline Date: Wed, 19 Mar 2025 10:29:05 +0100 Message-ID: <20250319092951.37667-13-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is no reason to export the function as an extra symbol. It is simple enough and is just a wrapper to already exported functions. Therefore, switch the exported function to an inline. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/irqdomain.h | 45 +++++++++++++++++++++++++++++++++------ kernel/irq/irqdomain.c | 41 ----------------------------------- 2 files changed, 39 insertions(+), 47 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 5eaaf74647ed..1480951a690b 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -591,12 +591,45 @@ void irq_domain_set_info(struct irq_domain *domain, u= nsigned int virq, void *handler_data, const char *handler_name); void irq_domain_reset_irq_data(struct irq_data *irq_data); #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY -struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, - unsigned int flags, - unsigned int size, - struct fwnode_handle *fwnode, - const struct irq_domain_ops *ops, - void *host_data); +/** + * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy + * @parent: Parent irq domain to associate with the new domain + * @flags: Irq domain flags associated to the domain + * @size: Size of the domain. See below + * @fwnode: Optional fwnode of the interrupt controller + * @ops: Pointer to the interrupt domain callbacks + * @host_data: Controller private data pointer + * + * If @size is 0 a tree domain is created, otherwise a linear domain. + * + * If successful the parent is associated to the new domain and the + * domain flags are set. + * Returns pointer to IRQ domain, or NULL on failure. + */ +static inline struct irq_domain *irq_domain_create_hierarchy(struct irq_do= main *parent, + unsigned int flags, + unsigned int size, + struct fwnode_handle *fwnode, + const struct irq_domain_ops *ops, + void *host_data) +{ + struct irq_domain_info info =3D { + .fwnode =3D fwnode, + .size =3D size, + .hwirq_max =3D size, + .ops =3D ops, + .host_data =3D host_data, + .domain_flags =3D flags, + .parent =3D parent, + }; + struct irq_domain *d; + + if (!info.size) + info.hwirq_max =3D ~0U; + + d =3D irq_domain_instantiate(&info); + return IS_ERR(d) ? NULL : d; +} =20 static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domai= n *parent, unsigned int flags, diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index abed179737c2..b5e111776285 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1252,47 +1252,6 @@ void irq_domain_reset_irq_data(struct irq_data *irq_= data) EXPORT_SYMBOL_GPL(irq_domain_reset_irq_data); =20 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY -/** - * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy - * @parent: Parent irq domain to associate with the new domain - * @flags: Irq domain flags associated to the domain - * @size: Size of the domain. See below - * @fwnode: Optional fwnode of the interrupt controller - * @ops: Pointer to the interrupt domain callbacks - * @host_data: Controller private data pointer - * - * If @size is 0 a tree domain is created, otherwise a linear domain. - * - * If successful the parent is associated to the new domain and the - * domain flags are set. - * Returns pointer to IRQ domain, or NULL on failure. - */ -struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, - unsigned int flags, - unsigned int size, - struct fwnode_handle *fwnode, - const struct irq_domain_ops *ops, - void *host_data) -{ - struct irq_domain_info info =3D { - .fwnode =3D fwnode, - .size =3D size, - .hwirq_max =3D size, - .ops =3D ops, - .host_data =3D host_data, - .domain_flags =3D flags, - .parent =3D parent, - }; - struct irq_domain *d; - - if (!info.size) - info.hwirq_max =3D ~0U; - - d =3D irq_domain_instantiate(&info); - return IS_ERR(d) ? NULL : d; -} -EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy); - static void irq_domain_insert_irq(int virq) { struct irq_data *data; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AE7C1256C65 for ; Wed, 19 Mar 2025 09:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376681; cv=none; b=t0K+DkbTuetcV4kfeDF+x2FpufqnNJ3roquBu+tih4YiEuEtY5NT10heuwud6w1YyYx64ku6aTNyz278Ot7vEuXPLZ2GH+20umj5nDVbxvHuj8VZlNgaoezH0OjiAo99uzSswgH5VkmOx6cR29F4iq2sMszqmLwDXDeZ2mm8PYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376681; c=relaxed/simple; bh=geXQPeT6Ko/A+eBHGZJ7ocWnSItb0Cs6pjE+xVOGMOI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cW7OXLByfBzQk+FeSq/1DMiipw5jrYp2SYIhzxyhZbYZl0Li4Ae3sboExqBtBCMjNXHQSjsIbq8BMfv9tTJ7fjkxtydOy2rC8UiaN6e+JeYft15bkvKoafvv/5i3VfifCBSkNDI4SBfXHY6YMXjQC//vrqUC1biTyNJUuwytO8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X4m2YTZ8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X4m2YTZ8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28A25C4CEEE; Wed, 19 Mar 2025 09:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376679; bh=geXQPeT6Ko/A+eBHGZJ7ocWnSItb0Cs6pjE+xVOGMOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X4m2YTZ8OjLf+TmKDNW5RsCAiPOC0LiIdFlAEIdw2q97LLMBs4hxW2zjFFq8xqWr7 N8maUQYfmeitpGcDqhoRga72NKT/vDb/tNXvHXIabLnp4OzxESyNWMFj/mwm+aA7ss dyyYCHW+vwjlKKp4VU6TbEoUXli5fCLyUsgVKVQPC8LPjkfplkPNnwh3px9rbvRPAS hHa0I3vR7+nTFoJo9WDOcVU7r0ChYyakH3bKEW0OpefBJqKBarYZMb1wS7zgzkpaOi HSpqRonxcjqI5y5yLJIu4d71rIwWhDp2vIuP4WFThDoT9+qyDDTs+xkKxIlDEKYVCs aUI0BmIMSHmzQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH v2 13/57] irqdomain: arc: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:06 +0100 Message-ID: <20250319092951.37667-14-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org --- arch/arc/kernel/intc-arcv2.c | 2 +- arch/arc/kernel/intc-compact.c | 5 +++-- arch/arc/kernel/mcip.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c index fea29d9d18d6..809edc59af25 100644 --- a/arch/arc/kernel/intc-arcv2.c +++ b/arch/arc/kernel/intc-arcv2.c @@ -170,7 +170,7 @@ init_onchip_IRQ(struct device_node *intc, struct device= _node *parent) if (parent) panic("DeviceTree incore intc not a root irq controller\n"); =20 - root_domain =3D irq_domain_add_linear(intc, nr_cpu_irqs, &arcv2_irq_ops, = NULL); + root_domain =3D irq_domain_create_linear(of_fwnode_handle(intc), nr_cpu_i= rqs, &arcv2_irq_ops, NULL); if (!root_domain) panic("root irq domain not avail\n"); =20 diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c index 1d2ff1c6a61b..1b159e9e0234 100644 --- a/arch/arc/kernel/intc-compact.c +++ b/arch/arc/kernel/intc-compact.c @@ -112,8 +112,9 @@ init_onchip_IRQ(struct device_node *intc, struct device= _node *parent) if (parent) panic("DeviceTree incore intc not a root irq controller\n"); =20 - root_domain =3D irq_domain_add_linear(intc, NR_CPU_IRQS, - &arc_intc_domain_ops, NULL); + root_domain =3D irq_domain_create_linear(of_fwnode_handle(intc), + NR_CPU_IRQS, + &arc_intc_domain_ops, NULL); if (!root_domain) panic("root irq domain not avail\n"); =20 diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index cdd370ec9280..02b28a9324f4 100644 --- a/arch/arc/kernel/mcip.c +++ b/arch/arc/kernel/mcip.c @@ -391,7 +391,8 @@ idu_of_init(struct device_node *intc, struct device_nod= e *parent) =20 pr_info("MCIP: IDU supports %u common irqs\n", nr_irqs); =20 - domain =3D irq_domain_add_linear(intc, nr_irqs, &idu_irq_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(intc), nr_irqs, + &idu_irq_ops, NULL); =20 /* Parent interrupts (core-intc) are already mapped */ =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E2C7A256C65 for ; Wed, 19 Mar 2025 09:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376685; cv=none; b=Y7x7gnBdugzXpSw2A9cGsdjBpiw600fhb08mJNF7bgcqzEoHuzQ7pCpiIlb28vo/hpaOAIjdEbgjIol+CpMQC5ZPXbpQzSSAHDUqKxvlAXrVTGwJqz2Vfk9uVK+9Za+916afqVGoohvddm5ONfg2OVEt9m7nKGYHD3KrnmpNSbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376685; c=relaxed/simple; bh=IRPy6rdQAf8FH/TYZqrfLoaXvOKxAtAADXQKa7/vbmg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tweAYa4Dso0On7jtOfImJj8W9uB722ZtZ23MbwiTp4lD2Ycf0ANN/5c43b7MM6WF82pRwWdOVEWTK/DBUCcKAhiiWSJ4rUGVRaVbh41ekCSQEt2prhgVpquMwz0up5ZLyMibz9lOIvKe7tqkrNOj8G2ikuy8TxtpqPKC1DEuJW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lch0q9mJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lch0q9mJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C3BEC4CEEA; Wed, 19 Mar 2025 09:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376684; bh=IRPy6rdQAf8FH/TYZqrfLoaXvOKxAtAADXQKa7/vbmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lch0q9mJZEHRTrKV1pGlv6crfvvguqWqaywvDVeUuQ5Kri/RQi8b2Ng3Eqgt1rPn4 ZZ8M7tEMphO9VPKS6Gc23v9o+U+lmU6hEF2Bri3hGhISPU0q2v3Yv5UejnpU6e/Ixi 3DEzK7AFej9W0dReVe42kwP2V6V4aoRCJk9ULHh1g2TSnNNNvxJv9gZyzJeiFmCoYi iZUY8TV7GjKp1PSAu3NJTeDAOdg3fT2ruJdaA/+iRA3Mq1+RgQrp298d5bfb7nMXTY /5k4SD5GYQTJcpEIizD/mXD7nUlIhawj+knyrHbdTbB32VCZ65fHaPvvmXFwDsMiA9 WHZomiqtTKm7g== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Russell King , Krzysztof Kozlowski , Alim Akhtar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Andreas Kemnade , Kevin Hilman , Roger Quadros , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 14/57] irqdomain: arm: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:07 +0100 Message-ID: <20250319092951.37667-15-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Russell King Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: Tony Lindgren Cc: Andreas Kemnade Cc: Kevin Hilman Cc: Roger Quadros Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/common/sa1111.c | 6 +++--- arch/arm/mach-exynos/suspend.c | 5 ++--- arch/arm/mach-imx/avic.c | 4 ++-- arch/arm/mach-imx/gpc.c | 5 ++--- arch/arm/mach-imx/tzic.c | 4 ++-- arch/arm/mach-omap1/irq.c | 3 +-- arch/arm/mach-omap2/omap-wakeupgen.c | 5 ++--- arch/arm/mach-pxa/irq.c | 5 ++--- arch/arm/plat-orion/gpio.c | 12 ++++++------ 9 files changed, 22 insertions(+), 27 deletions(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 9846f30990f7..02eda44a6faa 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -416,9 +416,9 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsi= gned irq_base) writel_relaxed(~0, irqbase + SA1111_INTSTATCLR0); writel_relaxed(~0, irqbase + SA1111_INTSTATCLR1); =20 - sachip->irqdomain =3D irq_domain_add_linear(NULL, SA1111_IRQ_NR, - &sa1111_irqdomain_ops, - sachip); + sachip->irqdomain =3D irq_domain_create_linear(NULL, SA1111_IRQ_NR, + &sa1111_irqdomain_ops, + sachip); if (!sachip->irqdomain) { irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); return -ENOMEM; diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index cac4e82f6c82..150a1e56dcae 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -209,9 +209,8 @@ static int __init exynos_pmu_irq_init(struct device_nod= e *node, return -ENOMEM; } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, 0, - node, &exynos_pmu_domain_ops, - NULL); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_han= dle(node), + &exynos_pmu_domain_ops, NULL); if (!domain) { iounmap(pmu_base_addr); pmu_base_addr =3D NULL; diff --git a/arch/arm/mach-imx/avic.c b/arch/arm/mach-imx/avic.c index cf6546ddc7a3..3067c06b4b8e 100644 --- a/arch/arm/mach-imx/avic.c +++ b/arch/arm/mach-imx/avic.c @@ -201,8 +201,8 @@ static void __init mxc_init_irq(void __iomem *irqbase) WARN_ON(irq_base < 0); =20 np =3D of_find_compatible_node(NULL, NULL, "fsl,avic"); - domain =3D irq_domain_add_legacy(np, AVIC_NUM_IRQS, irq_base, 0, - &irq_domain_simple_ops, NULL); + domain =3D irq_domain_create_legacy(of_fwnode_handle(np), AVIC_NUM_IRQS, = irq_base, 0, + &irq_domain_simple_ops, NULL); WARN_ON(!domain); =20 for (i =3D 0; i < AVIC_NUM_IRQS / 32; i++, irq_base +=3D 32) diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index 5909088d5482..2e633569d2f8 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c @@ -245,9 +245,8 @@ static int __init imx_gpc_init(struct device_node *node, if (WARN_ON(!gpc_base)) return -ENOMEM; =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS, - node, &imx_gpc_domain_ops, - NULL); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, of= _fwnode_handle(node), + &imx_gpc_domain_ops, NULL); if (!domain) { iounmap(gpc_base); return -ENOMEM; diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c index 8b3d98d288d9..50a5668e65d2 100644 --- a/arch/arm/mach-imx/tzic.c +++ b/arch/arm/mach-imx/tzic.c @@ -175,8 +175,8 @@ static int __init tzic_init_dt(struct device_node *np, = struct device_node *p) irq_base =3D irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id()); WARN_ON(irq_base < 0); =20 - domain =3D irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0, - &irq_domain_simple_ops, NULL); + domain =3D irq_domain_create_legacy(of_fwnode_handle(np), TZIC_NUM_IRQS, = irq_base, 0, + &irq_domain_simple_ops, NULL); WARN_ON(!domain); =20 for (i =3D 0; i < 4; i++, irq_base +=3D 32) diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 9b587ecebb1c..bb1bc060ecd8 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c @@ -220,8 +220,7 @@ void __init omap1_init_irq(void) omap_l2_irq =3D irq_base; omap_l2_irq -=3D NR_IRQS_LEGACY; =20 - domain =3D irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, - &irq_domain_simple_ops, NULL); + domain =3D irq_domain_create_legacy(NULL, nr_irqs, irq_base, 0, &irq_doma= in_simple_ops, NULL); =20 pr_info("Total of %lu interrupts in %i interrupt banks\n", nr_irqs, irq_bank_count); diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/oma= p-wakeupgen.c index 6f0d6120c174..a66b1dc61571 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c @@ -585,9 +585,8 @@ static int __init wakeupgen_init(struct device_node *no= de, wakeupgen_ops =3D &am43xx_wakeupgen_ops; } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, max_irqs, - node, &wakeupgen_domain_ops, - NULL); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, max_irqs, of_fwn= ode_handle(node), + &wakeupgen_domain_ops, NULL); if (!domain) { iounmap(wakeupgen_base); return -ENOMEM; diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index d9cadd97748a..5bfce8aa4102 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -147,9 +147,8 @@ pxa_init_irq_common(struct device_node *node, int irq_n= r, int n; =20 pxa_internal_irq_nr =3D irq_nr; - pxa_irq_domain =3D irq_domain_add_legacy(node, irq_nr, - PXA_IRQ(0), 0, - &pxa_irq_ops, NULL); + pxa_irq_domain =3D irq_domain_create_legacy(of_fwnode_handle(node), irq_n= r, PXA_IRQ(0), 0, + &pxa_irq_ops, NULL); if (!pxa_irq_domain) panic("Unable to add PXA IRQ domain\n"); irq_set_default_domain(pxa_irq_domain); diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 595e9cb33c1d..a15f47450084 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -602,12 +602,12 @@ void __init orion_gpio_init(int gpio_base, int ngpio, IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); =20 /* Setup irq domain on top of the generic chip. */ - ochip->domain =3D irq_domain_add_legacy(NULL, - ochip->chip.ngpio, - ochip->secondary_irq_base, - ochip->secondary_irq_base, - &irq_domain_simple_ops, - ochip); + ochip->domain =3D irq_domain_create_legacy(NULL, + ochip->chip.ngpio, + ochip->secondary_irq_base, + ochip->secondary_irq_base, + &irq_domain_simple_ops, + ochip); if (!ochip->domain) panic("%s: couldn't allocate irq domain (DT).\n", ochip->chip.label); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EA13B2571A1 for ; Wed, 19 Mar 2025 09:31:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376687; cv=none; b=UZfCmCNU6qgYUmLxkkP+CBfV9IzvWxCGi+wiExwOe8Q4TUxy6TBxgdE1OWkJufKiPocngkaX+a5uQ8WGAP8ELh84vx0ZSinYLpL3vAIoBAKeSsiKtOzVrr2q8jBDZq5yxfUjrbok1EGfv7hc1svHEbCEMcAQndnVH7TRgGRrjTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376687; c=relaxed/simple; bh=pag8Nr5xVrgJ9snU+fESIDcnF5aHvXj9M0eC2lbzGoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E4RseWIWISAwxxRM1w0xjJeVdq5FfZTMiImmuesYWeOLwXtZV7V09+wU8UhH5fWKr6cFHCsTrk0y6hf4586AcVl77Ruwbgv2aROf7CDF++ZSBMsNKamGM3QlNNA8aki0Q5AAlQoRHPfkeqWqrGNP3EJSwO0wN53dE9ZtUAPZgtc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KFEtPvcI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KFEtPvcI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 378D1C4CEE9; Wed, 19 Mar 2025 09:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376686; bh=pag8Nr5xVrgJ9snU+fESIDcnF5aHvXj9M0eC2lbzGoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KFEtPvcI3B6djmlwfI4ENNUUVB/eRlUK4TGtc3dZU7aWTbeBFRgxYkQq/ZPgeqQnH jQOAuWC2l7fgLE+zs3Pd3BikKT7qYOJE8QEIaSO3EMu5tnWhjl3V6ec09PUA1fAKYu jNg/nVWwW/ZR+JliDty+dS2VfzgCSRVw4bl051i7n6G7CEsFZKWfq2GV5bunfFHY+R 3Yr0FgiMeQFKplTmMbY/UheD50qVtTfxc3FiyjxUpd45ulUt3qROkS+IaeVrWvGKjr uls3u2CGRwO6K92Lysx4o8EgPcygb/E7KIWoJfO/xJkzsxnaS0zpzuI1yozovPgzst Ts5hI9AKlmG5Q== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH v2 15/57] irqdomain: bus: Switch to irq_domain_create_simple() Date: Wed, 19 Mar 2025 10:29:08 +0100 Message-ID: <20250319092951.37667-16-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: "Marek Beh=C3=BAn" --- drivers/bus/moxtet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c index 1e57ebfb7622..6c3e5c5dae10 100644 --- a/drivers/bus/moxtet.c +++ b/drivers/bus/moxtet.c @@ -737,9 +737,9 @@ static int moxtet_irq_setup(struct moxtet *moxtet) { int i, ret; =20 - moxtet->irq.domain =3D irq_domain_add_simple(moxtet->dev->of_node, - MOXTET_NIRQS, 0, - &moxtet_irq_domain, moxtet); + moxtet->irq.domain =3D irq_domain_create_simple(of_fwnode_handle(moxtet->= dev->of_node), + MOXTET_NIRQS, 0, + &moxtet_irq_domain, moxtet); if (moxtet->irq.domain =3D=3D NULL) { dev_err(moxtet->dev, "Could not add IRQ domain\n"); return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 61DB0257420; Wed, 19 Mar 2025 09:31:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376689; cv=none; b=NABVEulD9KVXF4rYRkYT7mN3fmgZjbk7dRs4WfG/PaW23OgQFGOjKFPtmqFLq/oToudB+L1sMACnoPt6L5Jdgzth2h9Qd9a6HHCTQ6TN15M7osKh1sNX+8NnQ9raoU4yot9CvpfValCn2TTa3CuaHawdKYCOa6eFLrL2PicWTxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376689; c=relaxed/simple; bh=HAa9/NY8fA0dmjIjlUIydLrGLK4XXNza+lgAPO8H1IA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=etF45JeKS7IZVxzhuGTvFWnHWrKvhdLb0gJt22nSU7SDaugFafF4GZJ3pC63Fe4fbEJ8iniq3Vm5ESCjl783fbvDbKiGnUcV2I0/jOc/Y3jkC5QjNozs1jyWWubwaKZ7DXMx3RQiO96j1fQZkKsmkmFugojp4Ozb9VwW3nGuUzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OJOyajWP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OJOyajWP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1BDFC4CEEE; Wed, 19 Mar 2025 09:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376689; bh=HAa9/NY8fA0dmjIjlUIydLrGLK4XXNza+lgAPO8H1IA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OJOyajWP1OTA6AOcPiBNjXscMnyLJnI7pDXVPrjVKYKe0pUeSMqurGSvn18rojfyF CRiV/dY5JmIXWil5IEoJdypthSHEurzylDE8dsgPwnkg8t2Ti8Ue555MgeRhPs5uJf v5omlYcdtQfrDi8mPZe6H2ejYyX8v21/DRZC4o8rGEaUGOuHlp9B/OwCGd4k6GAGaa LRrpOFkLIGyNAbDU8OuKLXCIet4xRSay7GK7XUy8j62g5RdyGgzyN6jQMPuxTocoNV pNdB6fx0dTA1qWuzGyTLb/rzxTGOm9+z38tzFDytz/dDcceDs2l6kq/yPqSeSNdBU5 U0sBSa2CXBTMQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Dinh Nguyen , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , linux-edac@vger.kernel.org Subject: [PATCH v2 16/57] irqdomain: edac: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:09 +0100 Message-ID: <20250319092951.37667-17-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Dinh Nguyen Cc: Borislav Petkov Cc: Tony Luck Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: linux-edac@vger.kernel.org --- drivers/edac/altera_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 3e971f902363..47cea645fc91 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -2130,8 +2130,8 @@ static int altr_edac_a10_probe(struct platform_device= *pdev) edac->irq_chip.name =3D pdev->dev.of_node->name; edac->irq_chip.irq_mask =3D a10_eccmgr_irq_mask; edac->irq_chip.irq_unmask =3D a10_eccmgr_irq_unmask; - edac->domain =3D irq_domain_add_linear(pdev->dev.of_node, 64, - &a10_eccmgr_ic_ops, edac); + edac->domain =3D irq_domain_create_linear(of_fwnode_handle(pdev->dev.of_n= ode), + 64, &a10_eccmgr_ic_ops, edac); if (!edac->domain) { dev_err(&pdev->dev, "Error adding IRQ domain\n"); return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 38339253320; Wed, 19 Mar 2025 09:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376694; cv=none; b=pBWHMXkvcBvVLJLuhGORsmDQ5/KWI6mWGWIbBcQc+8nGJ88ezqu5iARZfsFtGnSLyuFdIaEbGO749hizYhJe5Jrq6wcKRdxp2R34u93gYpBaNKvzmSGFvtYGASSQ94nocM8I55AADHDmrJ20KhfB9RVQh/ISPVz7vi6fw/vzOS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376694; c=relaxed/simple; bh=X95jK7dXfEpY1qM1mZq8gm6tuDS1sRSzbSKDDrKSl1U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BxFv3y+n6XvIWe9dbxE35sevuUXIgy3jreF3WkXfKKcw6qAhQLMH78pGm2nqaPJevuLcvD+Ff2FErp3GSVjVO6A57ztGu0HxfijJj+2YpMYAvvk+xbDw3WZB9HFjs+QHgApxnZWtsehB178YWtnZBhN3f4Foq3j0r0G1kmFprxY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nV08U90c; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nV08U90c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2F41C4CEEE; Wed, 19 Mar 2025 09:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376693; bh=X95jK7dXfEpY1qM1mZq8gm6tuDS1sRSzbSKDDrKSl1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nV08U90cffSUj0fOaIRr0bid2ksSbqHDRmWlsGWFVyYOtLgHqePbsTtevKfZfTOKX BOqlcLvlkxEVaLrME8b/f48iOvGh2MNCAUWj8LnSAysj9RaO2sHur2d1EbwmGz4GHi MZfLAjg4YRmn/Mb28MbJxsItMQBOP4CnrLo9tSe7m7rex7IDNoSvBOl95xElKA9b1T ZwdaCeH+KQ4O/nfTDqwAKe69n5qFf1WwMUEupbKrLKOkGh+jKHe/JGey6VD/hHfD4O kphueHQoHJBKb6sW4dKj330/eEUJX//ftRXqOPKnRMleQCypXqIvH8Ox0AmijT285h hyHixyfsBDx8w== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Doug Berger , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Bartosz Golaszewski , Keerthy , Vladimir Zapolskiy , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Robert Jarzmik , Heiko Stuebner , Andy Shevchenko , linux-gpio@vger.kernel.org Subject: [PATCH v2 17/57] irqdomain: gpio: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:10 +0100 Message-ID: <20250319092951.37667-18-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Doug Berger Cc: Florian Fainelli Cc: Broadcom internal kernel review list Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Keerthy Cc: Vladimir Zapolskiy Cc: "Uwe Kleine-K=C3=B6nig" Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Robert Jarzmik Cc: Heiko Stuebner Cc: Andy Shevchenko Cc: linux-gpio@vger.kernel.org --- drivers/gpio/gpio-brcmstb.c | 2 +- drivers/gpio/gpio-davinci.c | 5 ++--- drivers/gpio/gpio-em.c | 5 +++-- drivers/gpio/gpio-grgpio.c | 2 +- drivers/gpio/gpio-lpc18xx.c | 8 +++----- drivers/gpio/gpio-mvebu.c | 2 +- drivers/gpio/gpio-mxc.c | 2 +- drivers/gpio/gpio-mxs.c | 4 ++-- drivers/gpio/gpio-pxa.c | 6 +++--- drivers/gpio/gpio-rockchip.c | 2 +- drivers/gpio/gpio-sa1100.c | 2 +- drivers/gpio/gpio-sodaville.c | 2 +- drivers/gpio/gpio-tb10x.c | 2 +- drivers/gpio/gpio-twl4030.c | 5 ++--- include/linux/gpio/driver.h | 5 +++-- 15 files changed, 26 insertions(+), 28 deletions(-) diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c index ca3472977431..e7671bcd5c07 100644 --- a/drivers/gpio/gpio-brcmstb.c +++ b/drivers/gpio/gpio-brcmstb.c @@ -437,7 +437,7 @@ static int brcmstb_gpio_irq_setup(struct platform_devic= e *pdev, int err; =20 priv->irq_domain =3D - irq_domain_add_linear(np, priv->num_gpios, + irq_domain_create_linear(of_fwnode_handle(np), priv->num_gpios, &brcmstb_gpio_irq_domain_ops, priv); if (!priv->irq_domain) { diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 63fc7888c1d4..3c3b3ed46d9b 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -479,9 +479,8 @@ static int davinci_gpio_irq_setup(struct platform_devic= e *pdev) return irq; } =20 - irq_domain =3D irq_domain_add_legacy(dev->of_node, ngpio, irq, 0, - &davinci_gpio_irq_ops, - chips); + irq_domain =3D irq_domain_create_legacy(of_fwnode_handle(dev->of_node), = ngpio, irq, 0, + &davinci_gpio_irq_ops, chips); if (!irq_domain) { dev_err(dev, "Couldn't register an IRQ domain\n"); return -ENODEV; diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 6c862c572322..8d86f205f53e 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -323,8 +323,9 @@ static int em_gio_probe(struct platform_device *pdev) irq_chip->irq_release_resources =3D em_gio_irq_relres; irq_chip->flags =3D IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; =20 - p->irq_domain =3D irq_domain_add_simple(dev->of_node, ngpios, 0, - &em_gio_irq_domain_ops, p); + p->irq_domain =3D irq_domain_create_simple(of_fwnode_handle(dev->of_node), + ngpios, 0, + &em_gio_irq_domain_ops, p); if (!p->irq_domain) { dev_err(dev, "cannot initialize irq domain\n"); return -ENXIO; diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 30a0522ae735..641df8f2fd3d 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -397,7 +397,7 @@ static int grgpio_probe(struct platform_device *ofdev) return -EINVAL; } =20 - priv->domain =3D irq_domain_add_linear(np, gc->ngpio, + priv->domain =3D irq_domain_create_linear(of_fwnode_handle(np), gc->ngpi= o, &grgpio_irq_domain_ops, priv); if (!priv->domain) { diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c index 2cf9fb4637a2..ae6182cce723 100644 --- a/drivers/gpio/gpio-lpc18xx.c +++ b/drivers/gpio/gpio-lpc18xx.c @@ -240,11 +240,9 @@ static int lpc18xx_gpio_pin_ic_probe(struct lpc18xx_gp= io_chip *gc) =20 raw_spin_lock_init(&ic->lock); =20 - ic->domain =3D irq_domain_add_hierarchy(parent_domain, 0, - NR_LPC18XX_GPIO_PIN_IC_IRQS, - dev->of_node, - &lpc18xx_gpio_pin_ic_domain_ops, - ic); + ic->domain =3D irq_domain_create_hierarchy(parent_domain, 0, NR_LPC18XX_G= PIO_PIN_IC_IRQS, + of_fwnode_handle(dev->of_node), + &lpc18xx_gpio_pin_ic_domain_ops, ic); if (!ic->domain) { pr_err("unable to add irq domain\n"); ret =3D -ENODEV; diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 3604abcb6fec..4055596faef7 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -1242,7 +1242,7 @@ static int mvebu_gpio_probe(struct platform_device *p= dev) return 0; =20 mvchip->domain =3D - irq_domain_add_linear(np, ngpios, &irq_generic_chip_ops, NULL); + irq_domain_create_linear(of_fwnode_handle(np), ngpios, &irq_generic_c= hip_ops, NULL); if (!mvchip->domain) { dev_err(&pdev->dev, "couldn't allocate irq domain %s (DT).\n", mvchip->chip.label); diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 619b6fb9d833..74bc8f06a97a 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -502,7 +502,7 @@ static int mxc_gpio_probe(struct platform_device *pdev) goto out_bgio; } =20 - port->domain =3D irq_domain_add_legacy(np, 32, irq_base, 0, + port->domain =3D irq_domain_create_legacy(of_fwnode_handle(np), 32, irq_b= ase, 0, &irq_domain_simple_ops, NULL); if (!port->domain) { err =3D -ENODEV; diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index 024ad077e98d..b418fbccb26c 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -303,8 +303,8 @@ static int mxs_gpio_probe(struct platform_device *pdev) goto out_iounmap; } =20 - port->domain =3D irq_domain_add_legacy(np, 32, irq_base, 0, - &irq_domain_simple_ops, NULL); + port->domain =3D irq_domain_create_legacy(of_fwnode_handle(np), 32, irq_b= ase, 0, + &irq_domain_simple_ops, NULL); if (!port->domain) { err =3D -ENODEV; goto out_iounmap; diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 91cea97255fa..c3dfaed45c43 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -636,9 +636,9 @@ static int pxa_gpio_probe(struct platform_device *pdev) if (!pxa_last_gpio) return -EINVAL; =20 - pchip->irqdomain =3D irq_domain_add_legacy(pdev->dev.of_node, - pxa_last_gpio + 1, irq_base, - 0, &pxa_irq_domain_ops, pchip); + pchip->irqdomain =3D irq_domain_create_legacy(of_fwnode_handle(pdev->dev.= of_node), + pxa_last_gpio + 1, irq_base, 0, + &pxa_irq_domain_ops, pchip); if (!pchip->irqdomain) return -ENOMEM; =20 diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 01a3b3dac58b..c63352f2f1ec 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -521,7 +521,7 @@ static int rockchip_interrupts_register(struct rockchip= _pin_bank *bank) struct irq_chip_generic *gc; int ret; =20 - bank->domain =3D irq_domain_add_linear(bank->of_node, 32, + bank->domain =3D irq_domain_create_linear(of_fwnode_handle(bank->of_node)= , 32, &irq_generic_chip_ops, NULL); if (!bank->domain) { dev_warn(bank->dev, "could not init irq domain for bank %s\n", diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index 242dad763ac4..3f3ee36bc3cb 100644 --- a/drivers/gpio/gpio-sa1100.c +++ b/drivers/gpio/gpio-sa1100.c @@ -319,7 +319,7 @@ void __init sa1100_init_gpio(void) =20 gpiochip_add_data(&sa1100_gpio_chip.chip, NULL); =20 - sa1100_gpio_irqdomain =3D irq_domain_add_simple(NULL, + sa1100_gpio_irqdomain =3D irq_domain_create_simple(NULL, 28, IRQ_GPIO0, &sa1100_gpio_irqdomain_ops, sgc); =20 diff --git a/drivers/gpio/gpio-sodaville.c b/drivers/gpio/gpio-sodaville.c index c2a2c76c1652..6a3c4c625138 100644 --- a/drivers/gpio/gpio-sodaville.c +++ b/drivers/gpio/gpio-sodaville.c @@ -169,7 +169,7 @@ static int sdv_register_irqsupport(struct sdv_gpio_chip= _data *sd, IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); =20 - sd->id =3D irq_domain_add_legacy(pdev->dev.of_node, SDV_NUM_PUB_GPIOS, + sd->id =3D irq_domain_create_legacy(of_fwnode_handle(pdev->dev.of_node), = SDV_NUM_PUB_GPIOS, sd->irq_base, 0, &irq_domain_sdv_ops, sd); if (!sd->id) return -ENODEV; diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c index b6335cde455f..8cf676fd0a0b 100644 --- a/drivers/gpio/gpio-tb10x.c +++ b/drivers/gpio/gpio-tb10x.c @@ -183,7 +183,7 @@ static int tb10x_gpio_probe(struct platform_device *pde= v) if (ret !=3D 0) return ret; =20 - tb10x_gpio->domain =3D irq_domain_add_linear(np, + tb10x_gpio->domain =3D irq_domain_create_linear(of_fwnode_handle(np), tb10x_gpio->gc.ngpio, &irq_generic_chip_ops, NULL); if (!tb10x_gpio->domain) { diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c index bcd692229c7c..0d17985a5fdc 100644 --- a/drivers/gpio/gpio-twl4030.c +++ b/drivers/gpio/gpio-twl4030.c @@ -502,7 +502,6 @@ static void gpio_twl4030_power_off_action(void *data) static int gpio_twl4030_probe(struct platform_device *pdev) { struct twl4030_gpio_platform_data *pdata; - struct device_node *node =3D pdev->dev.of_node; struct gpio_twl4030_priv *priv; int ret, irq_base; =20 @@ -524,8 +523,8 @@ static int gpio_twl4030_probe(struct platform_device *p= dev) return irq_base; } =20 - irq_domain_add_legacy(node, TWL4030_GPIO_MAX, irq_base, 0, - &irq_domain_simple_ops, NULL); + irq_domain_create_legacy(of_fwnode_handle(pdev->dev.of_node), TWL4030_GPI= O_MAX, irq_base, 0, + &irq_domain_simple_ops, NULL); =20 ret =3D twl4030_sih_setup(&pdev->dev, TWL4030_MODULE_GPIO, irq_base); if (ret < 0) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 4c0294a9104d..b53233051bee 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -287,8 +287,9 @@ struct gpio_irq_chip { /** * @first: * - * Required for static IRQ allocation. If set, irq_domain_add_simple() - * will allocate and map all IRQs during initialization. + * Required for static IRQ allocation. If set, + * irq_domain_create_simple() will allocate and map all IRQs + * during initialization. */ unsigned int first; =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 84FB925744E for ; Wed, 19 Mar 2025 09:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376697; cv=none; b=NHc4MylS3cz1lP3bUss0S6PdcM74vUOPw3LF0+QlLUhZnr2CDPDh3qZTtpf2wxVZCHhkrDQEwIbhIvO8iq0MR+MzL/34wRqMFMwoA8nDgOBguNwnblfBRvasK64fg1XQDE+15gEteRHed74EFhttWO0ozr3VYreuIzOjGEK9q8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376697; c=relaxed/simple; bh=x7l0PcBAwBQ5PVjrvhw7mYOlBby/JPar1g9BxOMRBIQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B6zwhP4Jxne5tljRLl4mwFBDzEoZyNU7fKBurNdEGBq8rQvUbZM9EMA9H9SlbusPFuKqZ5yhLqTU9M/NeyBdTTq+vOQN/bc772svVADGqnpOWft8jGD/YsHshtBho49uPy1hTtq0bsWiQg+7BBGJJuTt6u+d6geEgTOOje5kOPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cqTmTDLo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cqTmTDLo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A847C4CEE9; Wed, 19 Mar 2025 09:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376697; bh=x7l0PcBAwBQ5PVjrvhw7mYOlBby/JPar1g9BxOMRBIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cqTmTDLoCx/XQ8XTxKWiqTJiJcpbmzBzr07rLr7YAzWt4/zYinNbbxuXOxrTsbvcR 0n4IVwHvRCnjwS9QYzQTuRWTo/WKV2/bbbGoPwdLGbUrR9TSkesYLfghXMd4RmD1g7 woTf/gWvo0I8WIfQ/6N4owbsXhsrGTq6C7IT7bhYzPa+jIEMa53DplXTsdu3ukVkEz lHdo9E2DLUStIHz0eUf6MAuB0jzngF17+6nZC8bLAy3AzRp+QuFY+y835D8oVr+WXj sG6RcL/sW1ZYl6Yk4VJjfTDCd1AYziiLzN6LTwriJnzHErQcj0mB0paVPpi3cY0Hnh eU/JWSyEDN6zw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Simona Vetter , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , Philipp Zabel , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 18/57] irqdomain: gpu: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:11 +0100 Message-ID: <20250319092951.37667-19-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Alex Deucher Cc: "Christian K=C3=B6nig" Cc: David Airlie Cc: Simona Vetter Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten Cc: Philipp Zabel Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++-- drivers/gpu/drm/msm/msm_mdss.c | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_irq.c index 19ce4da285e8..38e7043016e1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -725,8 +725,8 @@ static const struct irq_domain_ops amdgpu_hw_irqdomain_= ops =3D { */ int amdgpu_irq_add_domain(struct amdgpu_device *adev) { - adev->irq.domain =3D irq_domain_add_linear(NULL, AMDGPU_MAX_IRQ_SRC_ID, - &amdgpu_hw_irqdomain_ops, adev); + adev->irq.domain =3D irq_domain_create_linear(NULL, AMDGPU_MAX_IRQ_SRC_ID, + &amdgpu_hw_irqdomain_ops, adev); if (!adev->irq.domain) { DRM_ERROR("GPU irq add domain failed\n"); return -ENODEV; diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index dcb49fd30402..9d006ee88a8a 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -150,7 +150,7 @@ static int _msm_mdss_irq_domain_add(struct msm_mdss *ms= m_mdss) =20 dev =3D msm_mdss->dev; =20 - domain =3D irq_domain_add_linear(dev->of_node, 32, + domain =3D irq_domain_create_linear(of_fwnode_handle(dev->of_node), 32, &msm_mdss_irqdomain_ops, msm_mdss); if (!domain) { dev_err(dev, "failed to add irq_domain\n"); diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-commo= n.c index fa77e4e64f12..223e6d563a6b 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1169,8 +1169,8 @@ static int ipu_irq_init(struct ipu_soc *ipu) }; int ret, i; =20 - ipu->domain =3D irq_domain_add_linear(ipu->dev->of_node, IPU_NUM_IRQS, - &irq_generic_chip_ops, ipu); + ipu->domain =3D irq_domain_create_linear(of_fwnode_handle(ipu->dev->of_no= de), IPU_NUM_IRQS, + &irq_generic_chip_ops, ipu); if (!ipu->domain) { dev_err(ipu->dev, "failed to add irq domain\n"); return -ENODEV; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 307DA257AE7; Wed, 19 Mar 2025 09:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376700; cv=none; b=uX1F17YcWGEXmqv00ixpDqvIohK0DBzZ/HPNC9iTwlxqXXl07jCSSouIVJ7OJxgI8YsHgqDX2AU0nDHgF6+8+geN20Ymkogx0nYljXjSGU8k38C/He70ozfmZxdBsb9icx4dqv9UzUVPDka68ABPrNr+uJmcdcmum2hrQ/LvPhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376700; c=relaxed/simple; bh=g8epWtV0wV72iaajZGoYKR5VVY69o2FdAj6xtRjzIdY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IQrfv4l/SGucqT08gChn9/6RO83Zb15jk9ObD7ZUhKmKAQA2s+AyhnQi5lUL3YQTZDDr23hMJltnOdOGvzaYgZJOV6yV2s4jPi4D2nUpI1Y4SUC1jFy7yVDV9szS3kP4fFRvnSrRSBeN7rwcxaUzKZqDrfaz/tKqt8wnN5pzFkk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gqUv9Bd7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gqUv9Bd7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8B92C4CEE9; Wed, 19 Mar 2025 09:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376699; bh=g8epWtV0wV72iaajZGoYKR5VVY69o2FdAj6xtRjzIdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gqUv9Bd70B8pXRazMLQ+CRph9AGw08H7J+aNsYEUxEPuWxt94g2c4cWbLjUdDEG7r cHpa5KTokcliz+NV6hk98tFwtIjebDprW8qtfwrOYLW759Gqn4+fttaVKSI9DtiLEA YxiIG/s5h5+fTKp2oEAsjQvMh9kfcjTo291haVr5obTva8VHwGfyG4m76X7WorhSbu mjU9s5MdMfByJtp+cMJKMv74Qml4wX0Wj8Me8C3/0jHVpMmBdWDtL0eQICHtB8KxDw /mXtkcaEt4N+CpcY4XzJweXMRmL9stXIbZfGk5YnNWCXPjavQfh3trehepbkNtvEAs 8jBvthToVewSg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Hans de Goede , Andi Shyti , Peter Rosin , linux-i2c@vger.kernel.org Subject: [PATCH v2 19/57] irqdomain: i2c: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:12 +0100 Message-ID: <20250319092951.37667-20-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Hans de Goede Cc: Andi Shyti Cc: Peter Rosin Cc: linux-i2c@vger.kernel.org --- drivers/i2c/busses/i2c-cht-wc.c | 2 +- drivers/i2c/muxes/i2c-mux-pca954x.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-w= c.c index 26a36a65521e..606ac071cb80 100644 --- a/drivers/i2c/busses/i2c-cht-wc.c +++ b/drivers/i2c/busses/i2c-cht-wc.c @@ -467,7 +467,7 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_de= vice *pdev) return ret; =20 /* Alloc and register client IRQ */ - adap->irq_domain =3D irq_domain_add_linear(NULL, 1, &irq_domain_simple_op= s, NULL); + adap->irq_domain =3D irq_domain_create_linear(NULL, 1, &irq_domain_simple= _ops, NULL); if (!adap->irq_domain) return -ENOMEM; =20 diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mu= x-pca954x.c index 6f84018258c4..f6430db6c115 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -442,9 +442,9 @@ static int pca954x_irq_setup(struct i2c_mux_core *muxc) =20 raw_spin_lock_init(&data->lock); =20 - data->irq =3D irq_domain_add_linear(client->dev.of_node, - data->chip->nchans, - &irq_domain_simple_ops, data); + data->irq =3D irq_domain_create_linear(of_fwnode_handle(client->dev.of_no= de), + data->chip->nchans, + &irq_domain_simple_ops, data); if (!data->irq) return -ENODEV; =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 385F8257ADE; Wed, 19 Mar 2025 09:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376702; cv=none; b=fIB+w3mZdZZ/KOQ1oTKlJKqxZGcRqPXiuFUJdzdvZzAJyz8ZqLIHOcngUvQTVxWlUva9Kmbvn8AiUEPmh2yxgqMIUEtUMLDjsL+EKFO+8zXjvtdRQqucrJqKMWVbTPRpYbYKbwGe/FWyaeJdQFYztP36YtfLRI4JTD14hjjtjUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376702; c=relaxed/simple; bh=rb7GIhlA1eO8yU50mfZKS4I1xA6+NXBC7UurAj5NVMw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FzM1MJoi+9c4WEK9oUR7fhylg0HkiFUhbS0rUIGD9hsSssZt1HHVaMuVdBW6iN4Zd+YpKdOUVvGXRSG6Bz1CzAZaszFCWSw3X76MtZps/pJMEJW1SlF9HLZDyWutykEaIy2E65bQ6xbmu7pCpYsrAzUKWgA0JW7wlmDEsIXsEx0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZCh5sO7v; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZCh5sO7v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2135DC4CEEA; Wed, 19 Mar 2025 09:31:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376702; bh=rb7GIhlA1eO8yU50mfZKS4I1xA6+NXBC7UurAj5NVMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZCh5sO7vhI0LokNMNujDluAbLXvdli0nGqzU+orQePlnzlAhgsmkLpI+J1zzT/nJd OtvGdH4r++LrYjLtUMBr4/iT3G63iMctm7JHCmda36CcjqwZ8nRfmKi55hid1+RG34 +M28pJSKlbT8G+yRR77D5g7NOPQPPjXq1FhpG0PXTje31TdMNDc6BndsWWq6xciXFY pQRRldSwpQD6Ti1Z+4H9VCyAFXU63DU+nC4TLNcJONsY7iKv7fkz+Uac3CjI3PSFzL AmPwGlvqjluegdMQJ0zjiW9LnPTl5nCiboneCArkkXH2jrN5YRIhg4pH+3t2cr4hxI yA72YpWfYSNuA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , linux-iio@vger.kernel.org Subject: [PATCH v2 20/57] irqdomain: iio: Switch to irq_domain_create_simple() Date: Wed, 19 Mar 2025 10:29:13 +0100 Message-ID: <20250319092951.37667-21-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-iio@vger.kernel.org --- drivers/iio/adc/stm32-adc-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-c= ore.c index 0914148d1a22..bd3458965bff 100644 --- a/drivers/iio/adc/stm32-adc-core.c +++ b/drivers/iio/adc/stm32-adc-core.c @@ -421,9 +421,10 @@ static int stm32_adc_irq_probe(struct platform_device = *pdev, return priv->irq[i]; } =20 - priv->domain =3D irq_domain_add_simple(np, STM32_ADC_MAX_ADCS, 0, - &stm32_adc_domain_ops, - priv); + priv->domain =3D irq_domain_create_simple(of_fwnode_handle(np), + STM32_ADC_MAX_ADCS, 0, + &stm32_adc_domain_ops, + priv); if (!priv->domain) { dev_err(&pdev->dev, "Failed to add irq domain\n"); return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 90882253B44 for ; Wed, 19 Mar 2025 09:31:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376715; cv=none; b=Vn6AMU+qZ5//tPa4+yDt9kio+gqladjItlh+cy4t+Ev76afMo+qF0CsfSJyeoJmz/m4SzKZesYv9C5pjhkH7v9X02cHK6QAGU6BeN2FYbeO8v7x7KN1ZTYxPNNOITDOV2S/QkYUG+5j4ITYWE7mkRDgKpL10eOdXnZab4z67xtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376715; c=relaxed/simple; bh=CsUoUjAtSeqwIaBDxuFdA7LOdcVOxayCtGAjKKPUjLM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UnQ58M1B77afzRnNQMdzBaqf9XQx8B088w+3pypI0zb+ukeKKLxEPBCQ4KDlKsBk4u9eukmhFvy4LFUTVaSSWu1+aJzCgH4x4bHAUyvRAdr3ZwvU0+ZM9CrviOFUZ04oqqihmXIHG2CP/Ur/gdRkKRH28SsNfb/KIGG8NpZJ7YM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K8Ae0V3H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K8Ae0V3H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D265C4CEEE; Wed, 19 Mar 2025 09:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376715; bh=CsUoUjAtSeqwIaBDxuFdA7LOdcVOxayCtGAjKKPUjLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K8Ae0V3HsE43oZULmHxnu25B7Z24+HmV/I1WMaSE4B6hL8X5DjiLdz/yF4zaC0Nzg qqgaJDCC+QuiDpIYL4nZVYj52jDpRwf7h0lE1yni7MSb2tIXs1jcKpNBmA9zj4XlOh eJCzXI+4q5mYOOpsOoXC6fXoKyvYVqA1aPY+O85iACK5KSkzEH6DGi2+WavfeWGPgK sFbx11Wc1sdjQDkcaVKf3miOppSLQ7E+8p1BY/XwUrjt1nwVABUmjE44tjIVbfmX4L rYcAv/f3p4RPz1yDtTGDcWPp41CZbf+4zzWafYuu7b3gXL3GEDfvSjrrHUtzw91jKB lAeVeJ7Vifefg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Krzysztof Kozlowski , Alim Akhtar , Talel Shenhar , Antoine Tenart , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ryan Chen , Benjamin Herrenschmidt , Joel Stanley , Andrew Jeffery , Eddie James , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Guo Ren , Baruch Siach , Miodrag Dinic , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Vladimir Zapolskiy , Piotr Wojtaszczyk , Thomas Bogendoerfer , Mark-PK Tsai , Daniel Palmer , Matthias Brugger , AngeloGioacchino Del Regno , Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Manivannan Sadhasivam , Qin Jian , Changhuang Liang , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Linus Walleij , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Michal Simek , Chris Zankel , Max Filippov Subject: [PATCH v2 21/57] irqdomain: irqchip: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:14 +0100 Message-ID: <20250319092951.37667-22-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: Talel Shenhar Cc: Antoine Tenart Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Ryan Chen Cc: Benjamin Herrenschmidt Cc: Joel Stanley Cc: Andrew Jeffery Cc: Eddie James Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Florian Fainelli Cc: Broadcom internal kernel review list Cc: Ray Jui Cc: Scott Branden Cc: Guo Ren Cc: Baruch Siach Cc: Miodrag Dinic Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Paul Cercueil Cc: Vladimir Zapolskiy Cc: Piotr Wojtaszczyk Cc: Thomas Bogendoerfer Cc: Mark-PK Tsai Cc: Daniel Palmer Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: Aaro Koskinen Cc: Andreas Kemnade Cc: Kevin Hilman Cc: Roger Quadros Cc: Tony Lindgren Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: "Andreas F=C3=A4rber" Cc: Manivannan Sadhasivam Cc: Qin Jian Cc: Changhuang Liang Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: Thierry Reding Cc: Jonathan Hunter Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: Linus Walleij Cc: "Jonathan Neusch=C3=A4fer" Cc: Michal Simek Cc: Chris Zankel Cc: Max Filippov Acked-by: Changhuang Liang Reviewed-by: Linus Walleij --- drivers/irqchip/exynos-combiner.c | 2 +- drivers/irqchip/irq-al-fic.c | 2 +- drivers/irqchip/irq-alpine-msi.c | 5 ++--- drivers/irqchip/irq-armada-370-xp.c | 4 ++-- drivers/irqchip/irq-aspeed-i2c-ic.c | 2 +- drivers/irqchip/irq-aspeed-intc.c | 2 +- drivers/irqchip/irq-aspeed-scu-ic.c | 2 +- drivers/irqchip/irq-aspeed-vic.c | 4 ++-- drivers/irqchip/irq-ath79-misc.c | 4 ++-- drivers/irqchip/irq-atmel-aic-common.c | 2 +- drivers/irqchip/irq-bcm2712-mip.c | 4 ++-- drivers/irqchip/irq-bcm2835.c | 2 +- drivers/irqchip/irq-bcm2836.c | 2 +- drivers/irqchip/irq-bcm6345-l1.c | 2 +- drivers/irqchip/irq-bcm7038-l1.c | 2 +- drivers/irqchip/irq-bcm7120-l2.c | 2 +- drivers/irqchip/irq-brcmstb-l2.c | 2 +- drivers/irqchip/irq-clps711x.c | 4 ++-- drivers/irqchip/irq-crossbar.c | 6 ++---- drivers/irqchip/irq-csky-apb-intc.c | 2 +- drivers/irqchip/irq-csky-mpintc.c | 2 +- drivers/irqchip/irq-davinci-cp-intc.c | 6 ++++-- drivers/irqchip/irq-digicolor.c | 2 +- drivers/irqchip/irq-dw-apb-ictl.c | 2 +- drivers/irqchip/irq-ftintc010.c | 5 +++-- drivers/irqchip/irq-goldfish-pic.c | 7 +++---- drivers/irqchip/irq-hip04.c | 6 ++---- drivers/irqchip/irq-i8259.c | 4 ++-- drivers/irqchip/irq-idt3243x.c | 2 +- drivers/irqchip/irq-imgpdc.c | 2 +- drivers/irqchip/irq-imx-gpcv2.c | 4 ++-- drivers/irqchip/irq-imx-intmux.c | 2 +- drivers/irqchip/irq-imx-irqsteer.c | 2 +- drivers/irqchip/irq-ingenic-tcu.c | 4 ++-- drivers/irqchip/irq-ingenic.c | 4 ++-- drivers/irqchip/irq-jcore-aic.c | 5 ++--- drivers/irqchip/irq-keystone.c | 4 ++-- drivers/irqchip/irq-lpc32xx.c | 4 ++-- drivers/irqchip/irq-ls-extirq.c | 4 ++-- drivers/irqchip/irq-ls-scfg-msi.c | 8 ++++---- drivers/irqchip/irq-ls1x.c | 4 ++-- drivers/irqchip/irq-mchp-eic.c | 5 +++-- drivers/irqchip/irq-mips-cpu.c | 13 +++++-------- drivers/irqchip/irq-mips-gic.c | 15 ++++++++------- drivers/irqchip/irq-mmp.c | 12 ++++++------ drivers/irqchip/irq-mscc-ocelot.c | 4 ++-- drivers/irqchip/irq-mst-intc.c | 4 ++-- drivers/irqchip/irq-mtk-cirq.c | 5 ++--- drivers/irqchip/irq-mtk-sysirq.c | 4 ++-- drivers/irqchip/irq-mvebu-pic.c | 4 ++-- drivers/irqchip/irq-mxs.c | 4 ++-- drivers/irqchip/irq-nvic.c | 2 +- drivers/irqchip/irq-omap-intc.c | 4 ++-- drivers/irqchip/irq-or1k-pic.c | 4 ++-- drivers/irqchip/irq-orion.c | 6 +++--- drivers/irqchip/irq-owl-sirq.c | 4 ++-- drivers/irqchip/irq-pic32-evic.c | 6 +++--- drivers/irqchip/irq-pruss-intc.c | 4 ++-- drivers/irqchip/irq-realtek-rtl.c | 2 +- drivers/irqchip/irq-renesas-intc-irqpin.c | 6 ++++-- drivers/irqchip/irq-renesas-irqc.c | 4 ++-- drivers/irqchip/irq-renesas-rza1.c | 6 +++--- drivers/irqchip/irq-renesas-rzg2l.c | 6 +++--- drivers/irqchip/irq-renesas-rzv2h.c | 5 +++-- drivers/irqchip/irq-sa11x0.c | 2 +- drivers/irqchip/irq-sni-exiu.c | 4 ++-- drivers/irqchip/irq-sp7021-intc.c | 4 ++-- drivers/irqchip/irq-starfive-jh8100-intc.c | 4 ++-- drivers/irqchip/irq-stm32-exti.c | 4 ++-- drivers/irqchip/irq-stm32mp-exti.c | 7 +++---- drivers/irqchip/irq-sun4i.c | 2 +- drivers/irqchip/irq-sun6i-r.c | 4 ++-- drivers/irqchip/irq-sunxi-nmi.c | 2 +- drivers/irqchip/irq-tb10x.c | 8 ++++---- drivers/irqchip/irq-tegra.c | 5 ++--- drivers/irqchip/irq-ti-sci-inta.c | 6 +++--- drivers/irqchip/irq-ti-sci-intr.c | 5 +++-- drivers/irqchip/irq-ts4800.c | 2 +- drivers/irqchip/irq-versatile-fpga.c | 4 ++-- drivers/irqchip/irq-vf610-mscm-ir.c | 6 +++--- drivers/irqchip/irq-vic.c | 5 +++-- drivers/irqchip/irq-vt8500.c | 2 +- drivers/irqchip/irq-wpcm450-aic.c | 2 +- drivers/irqchip/irq-xilinx-intc.c | 4 ++-- drivers/irqchip/irq-xtensa-mx.c | 5 ++--- drivers/irqchip/irq-xtensa-pic.c | 4 ++-- drivers/irqchip/irq-zevio.c | 4 ++-- drivers/irqchip/spear-shirq.c | 2 +- 88 files changed, 181 insertions(+), 185 deletions(-) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-com= biner.c index 552aa04ff063..e7dfcf0cda43 100644 --- a/drivers/irqchip/exynos-combiner.c +++ b/drivers/irqchip/exynos-combiner.c @@ -180,7 +180,7 @@ static void __init combiner_init(void __iomem *combiner= _base, if (!combiner_data) return; =20 - combiner_irq_domain =3D irq_domain_add_linear(np, nr_irq, + combiner_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(np), nr= _irq, &combiner_irq_domain_ops, combiner_data); if (WARN_ON(!combiner_irq_domain)) { pr_warn("%s: irq domain init failed\n", __func__); diff --git a/drivers/irqchip/irq-al-fic.c b/drivers/irqchip/irq-al-fic.c index dfb761e86c9c..c980e822a10a 100644 --- a/drivers/irqchip/irq-al-fic.c +++ b/drivers/irqchip/irq-al-fic.c @@ -139,7 +139,7 @@ static int al_fic_register(struct device_node *node, struct irq_chip_generic *gc; int ret; =20 - fic->domain =3D irq_domain_add_linear(node, + fic->domain =3D irq_domain_create_linear(of_fwnode_handle(node), NR_FIC_IRQS, &irq_generic_chip_ops, fic); diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-= msi.c index 0207d35135da..a5289dc26dca 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -205,9 +205,8 @@ static int alpine_msix_init_domains(struct alpine_msix_= data *priv, return -ENXIO; } =20 - middle_domain =3D irq_domain_add_hierarchy(gic_domain, 0, 0, NULL, - &alpine_msix_middle_domain_ops, - priv); + middle_domain =3D irq_domain_create_hierarchy(gic_domain, 0, 0, NULL, + &alpine_msix_middle_domain_ops, priv); if (!middle_domain) { pr_err("Failed to create the MSIX middle domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index de98d16c1718..e51612992735 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -348,7 +348,7 @@ static int __init mpic_msi_init(struct mpic *mpic, stru= ct device_node *node, mpic->msi_doorbell_mask =3D PCI_MSI_FULL_DOORBELL_MASK; } =20 - mpic->msi_inner_domain =3D irq_domain_add_linear(NULL, mpic->msi_doorbell= _size, + mpic->msi_inner_domain =3D irq_domain_create_linear(NULL, mpic->msi_doorb= ell_size, &mpic_msi_domain_ops, mpic); if (!mpic->msi_inner_domain) return -ENOMEM; @@ -861,7 +861,7 @@ static int __init mpic_of_init(struct device_node *node= , struct device_node *par if (!mpic_is_ipi_available(mpic)) nr_irqs =3D MPIC_PER_CPU_IRQS_NR; =20 - mpic->domain =3D irq_domain_add_linear(node, nr_irqs, &mpic_irq_ops, mpic= ); + mpic->domain =3D irq_domain_create_linear(of_fwnode_handle(node), nr_irqs= , &mpic_irq_ops, mpic); if (!mpic->domain) { pr_err("%pOF: Unable to add IRQ domain\n", node); return -ENOMEM; diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspe= ed-i2c-ic.c index 9c9fc3e2967e..87c1feb999ff 100644 --- a/drivers/irqchip/irq-aspeed-i2c-ic.c +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c @@ -82,7 +82,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_nod= e *node, goto err_iounmap; } =20 - i2c_ic->irq_domain =3D irq_domain_add_linear(node, ASPEED_I2C_IC_NUM_BUS, + i2c_ic->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), A= SPEED_I2C_IC_NUM_BUS, &aspeed_i2c_ic_irq_domain_ops, NULL); if (!i2c_ic->irq_domain) { diff --git a/drivers/irqchip/irq-aspeed-intc.c b/drivers/irqchip/irq-aspeed= -intc.c index bd3b759b4b2c..8330221799a0 100644 --- a/drivers/irqchip/irq-aspeed-intc.c +++ b/drivers/irqchip/irq-aspeed-intc.c @@ -102,7 +102,7 @@ static int __init aspeed_intc_ic_of_init(struct device_= node *node, writel(0xffffffff, intc_ic->base + INTC_INT_STATUS_REG); writel(0x0, intc_ic->base + INTC_INT_ENABLE_REG); =20 - intc_ic->irq_domain =3D irq_domain_add_linear(node, INTC_IRQS_PER_WORD, + intc_ic->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), = INTC_IRQS_PER_WORD, &aspeed_intc_ic_irq_domain_ops, intc_ic); if (!intc_ic->irq_domain) { ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspe= ed-scu-ic.c index 94a7223e95df..1c7045467c48 100644 --- a/drivers/irqchip/irq-aspeed-scu-ic.c +++ b/drivers/irqchip/irq-aspeed-scu-ic.c @@ -165,7 +165,7 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_s= cu_ic *scu_ic, goto err; } =20 - scu_ic->irq_domain =3D irq_domain_add_linear(node, scu_ic->num_irqs, + scu_ic->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), s= cu_ic->num_irqs, &aspeed_scu_ic_domain_ops, scu_ic); if (!scu_ic->irq_domain) { diff --git a/drivers/irqchip/irq-aspeed-vic.c b/drivers/irqchip/irq-aspeed-= vic.c index 62ccf2c0c414..9b665b5bb531 100644 --- a/drivers/irqchip/irq-aspeed-vic.c +++ b/drivers/irqchip/irq-aspeed-vic.c @@ -211,8 +211,8 @@ static int __init avic_of_init(struct device_node *node, set_handle_irq(avic_handle_irq); =20 /* Register our domain */ - vic->dom =3D irq_domain_add_simple(node, NUM_IRQS, 0, - &avic_dom_ops, vic); + vic->dom =3D irq_domain_create_simple(of_fwnode_handle(node), NUM_IRQS, 0, + &avic_dom_ops, vic); =20 return 0; } diff --git a/drivers/irqchip/irq-ath79-misc.c b/drivers/irqchip/irq-ath79-m= isc.c index 92f001a5ff8d..268cc18b781f 100644 --- a/drivers/irqchip/irq-ath79-misc.c +++ b/drivers/irqchip/irq-ath79-misc.c @@ -147,7 +147,7 @@ static int __init ath79_misc_intc_of_init( return -ENOMEM; } =20 - domain =3D irq_domain_add_linear(node, ATH79_MISC_IRQ_COUNT, + domain =3D irq_domain_create_linear(of_fwnode_handle(node), ATH79_MISC_IR= Q_COUNT, &misc_irq_domain_ops, base); if (!domain) { pr_err("Failed to add MISC irqdomain\n"); @@ -188,7 +188,7 @@ void __init ath79_misc_irq_init(void __iomem *regs, int= irq, else ath79_misc_irq_chip.irq_ack =3D ar724x_misc_irq_ack; =20 - domain =3D irq_domain_add_legacy(NULL, ATH79_MISC_IRQ_COUNT, + domain =3D irq_domain_create_legacy(NULL, ATH79_MISC_IRQ_COUNT, irq_base, 0, &misc_irq_domain_ops, regs); if (!domain) panic("Failed to create MISC irqdomain"); diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-a= tmel-aic-common.c index 4525366d16d6..3cad30a40c19 100644 --- a/drivers/irqchip/irq-atmel-aic-common.c +++ b/drivers/irqchip/irq-atmel-aic-common.c @@ -228,7 +228,7 @@ struct irq_domain *__init aic_common_of_init(struct dev= ice_node *node, goto err_iounmap; } =20 - domain =3D irq_domain_add_linear(node, nchips * 32, ops, aic); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), nchips * 32, = ops, aic); if (!domain) { ret =3D -ENOMEM; goto err_free_aic; diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm271= 2-mip.c index 49a19db2d1e1..c546a063c8d8 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -173,8 +173,8 @@ static int mip_init_domains(struct mip_priv *mip, struc= t device_node *np) { struct irq_domain *middle; =20 - middle =3D irq_domain_add_hierarchy(mip->parent, 0, mip->num_msis, np, - &mip_middle_domain_ops, mip); + middle =3D irq_domain_create_hierarchy(mip->parent, 0, mip->num_msis, of_= fwnode_handle(np), + &mip_middle_domain_ops, mip); if (!middle) return -ENOMEM; =20 diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index 6c20604c2242..1e384c870350 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -144,7 +144,7 @@ static int __init armctrl_of_init(struct device_node *n= ode, if (!base) panic("%pOF: unable to map IC registers\n", node); =20 - intc.domain =3D irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0), + intc.domain =3D irq_domain_create_linear(of_fwnode_handle(node), MAKE_HWI= RQ(NR_BANKS, 0), &armctrl_ops, NULL); if (!intc.domain) panic("%pOF: unable to create IRQ domain\n", node); diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c index e366257684b5..fafd1f71348e 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -325,7 +325,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(s= truct device_node *node, =20 bcm2835_init_local_timer_frequency(); =20 - intc.domain =3D irq_domain_add_linear(node, LAST_IRQ + 1, + intc.domain =3D irq_domain_create_linear(of_fwnode_handle(node), LAST_IRQ= + 1, &bcm2836_arm_irqchip_intc_ops, NULL); if (!intc.domain) diff --git a/drivers/irqchip/irq-bcm6345-l1.c b/drivers/irqchip/irq-bcm6345= -l1.c index 90daa274ef23..ca4e141c5bc2 100644 --- a/drivers/irqchip/irq-bcm6345-l1.c +++ b/drivers/irqchip/irq-bcm6345-l1.c @@ -316,7 +316,7 @@ static int __init bcm6345_l1_of_init(struct device_node= *dn, =20 raw_spin_lock_init(&intc->lock); =20 - intc->domain =3D irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words, + intc->domain =3D irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_= WORD * intc->n_words, &bcm6345_l1_domain_ops, intc); if (!intc->domain) { diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038= -l1.c index 36e71af054e9..04fac0cc857f 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -416,7 +416,7 @@ static int __init bcm7038_l1_of_init(struct device_node= *dn, } } =20 - intc->domain =3D irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words, + intc->domain =3D irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_= WORD * intc->n_words, &bcm7038_l1_domain_ops, intc); if (!intc->domain) { diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120= -l2.c index 1e9dab6e0d86..8a7c088d2081 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -264,7 +264,7 @@ static int __init bcm7120_l2_intc_probe(struct device_n= ode *dn, goto out_free_l1_data; } =20 - data->domain =3D irq_domain_add_linear(dn, IRQS_PER_WORD * data->n_words, + data->domain =3D irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_= WORD * data->n_words, &irq_generic_chip_ops, NULL); if (!data->domain) { ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb= -l2.c index db4c9721fcf2..d15ca092742c 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -182,7 +182,7 @@ static int __init brcmstb_l2_intc_of_init(struct device= _node *np, goto out_unmap; } =20 - data->domain =3D irq_domain_add_linear(np, 32, + data->domain =3D irq_domain_create_linear(of_fwnode_handle(np), 32, &irq_generic_chip_ops, NULL); if (!data->domain) { ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c index 48c73c948ddf..c4b73ba2323b 100644 --- a/drivers/irqchip/irq-clps711x.c +++ b/drivers/irqchip/irq-clps711x.c @@ -184,8 +184,8 @@ static int __init _clps711x_intc_init(struct device_nod= e *np, clps711x_intc->ops.map =3D clps711x_intc_irq_map; clps711x_intc->ops.xlate =3D irq_domain_xlate_onecell; clps711x_intc->domain =3D - irq_domain_add_legacy(np, ARRAY_SIZE(clps711x_irqs), - 0, 0, &clps711x_intc->ops, NULL); + irq_domain_create_legacy(of_fwnode_handle(np), ARRAY_SIZE(clps711x_irqs)= , 0, 0, + &clps711x_intc->ops, NULL); if (!clps711x_intc->domain) { err =3D -ENOMEM; goto out_irqfree; diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index a05a7501e107..66bb39e24a52 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -351,10 +351,8 @@ static int __init irqcrossbar_init(struct device_node = *node, if (err) return err; =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, - cb->max_crossbar_sources, - node, &crossbar_domain_ops, - NULL); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, cb->max_crossbar= _sources, + of_fwnode_handle(node), &crossbar_domain_ops, NULL); if (!domain) { pr_err("%pOF: failed to allocated domain\n", node); return -ENOMEM; diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky= -apb-intc.c index 6710691e4c25..a970f4806f31 100644 --- a/drivers/irqchip/irq-csky-apb-intc.c +++ b/drivers/irqchip/irq-csky-apb-intc.c @@ -114,7 +114,7 @@ ck_intc_init_comm(struct device_node *node, struct devi= ce_node *parent) return -EINVAL; } =20 - root_domain =3D irq_domain_add_linear(node, nr_irq, + root_domain =3D irq_domain_create_linear(of_fwnode_handle(node), nr_irq, &irq_generic_chip_ops, NULL); if (!root_domain) { pr_err("C-SKY Intc irq_domain_add failed.\n"); diff --git a/drivers/irqchip/irq-csky-mpintc.c b/drivers/irqchip/irq-csky-m= pintc.c index 4aebd67d4f8f..1d1f5091f26f 100644 --- a/drivers/irqchip/irq-csky-mpintc.c +++ b/drivers/irqchip/irq-csky-mpintc.c @@ -255,7 +255,7 @@ csky_mpintc_init(struct device_node *node, struct devic= e_node *parent) writel_relaxed(BIT(0), INTCG_base + INTCG_ICTLR); } =20 - root_domain =3D irq_domain_add_linear(node, nr_irq, &csky_irqdomain_ops, + root_domain =3D irq_domain_create_linear(of_fwnode_handle(node), nr_irq, = &csky_irqdomain_ops, NULL); if (!root_domain) return -ENXIO; diff --git a/drivers/irqchip/irq-davinci-cp-intc.c b/drivers/irqchip/irq-da= vinci-cp-intc.c index d7948c55f542..00cdcc90f614 100644 --- a/drivers/irqchip/irq-davinci-cp-intc.c +++ b/drivers/irqchip/irq-davinci-cp-intc.c @@ -204,8 +204,10 @@ static int __init davinci_cp_intc_do_init(struct resou= rce *res, unsigned int num return irq_base; } =20 - davinci_cp_intc_irq_domain =3D irq_domain_add_legacy(node, num_irqs, irq_= base, 0, - &davinci_cp_intc_irq_domain_ops, NULL); + davinci_cp_intc_irq_domain =3D irq_domain_create_legacy(of_fwnode_handle(= node), num_irqs, + irq_base, 0, + &davinci_cp_intc_irq_domain_ops, + NULL); =20 if (!davinci_cp_intc_irq_domain) { pr_err("%s: unable to create an interrupt domain\n", __func__); diff --git a/drivers/irqchip/irq-digicolor.c b/drivers/irqchip/irq-digicolo= r.c index 3b0d78aac13b..eb5a8de82751 100644 --- a/drivers/irqchip/irq-digicolor.c +++ b/drivers/irqchip/irq-digicolor.c @@ -95,7 +95,7 @@ static int __init digicolor_of_init(struct device_node *n= ode, regmap_write(ucregs, UC_IRQ_CONTROL, 1); =20 digicolor_irq_domain =3D - irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL); + irq_domain_create_linear(of_fwnode_handle(node), 64, &irq_generic_chip_o= ps, NULL); if (!digicolor_irq_domain) { pr_err("%pOF: unable to create IRQ domain\n", node); return -ENOMEM; diff --git a/drivers/irqchip/irq-dw-apb-ictl.c b/drivers/irqchip/irq-dw-apb= -ictl.c index d5c1c750c8d2..c8a6d62ccb47 100644 --- a/drivers/irqchip/irq-dw-apb-ictl.c +++ b/drivers/irqchip/irq-dw-apb-ictl.c @@ -173,7 +173,7 @@ static int __init dw_apb_ictl_init(struct device_node *= np, else nrirqs =3D fls(readl_relaxed(iobase + APB_INT_ENABLE_L)); =20 - domain =3D irq_domain_add_linear(np, nrirqs, domain_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(np), nrirqs, domain_= ops, NULL); if (!domain) { pr_err("%pOF: unable to add irq domain\n", np); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-ftintc010.c b/drivers/irqchip/irq-ftintc01= 0.c index b91c358ea6db..a59a66d79da6 100644 --- a/drivers/irqchip/irq-ftintc010.c +++ b/drivers/irqchip/irq-ftintc010.c @@ -180,8 +180,9 @@ static int __init ft010_of_init_irq(struct device_node = *node, writel(0, FT010_IRQ_MASK(f->base)); writel(0, FT010_FIQ_MASK(f->base)); =20 - f->domain =3D irq_domain_add_simple(node, FT010_NUM_IRQS, 0, - &ft010_irqdomain_ops, f); + f->domain =3D irq_domain_create_simple(of_fwnode_handle(node), + FT010_NUM_IRQS, 0, + &ft010_irqdomain_ops, f); set_handle_irq(ft010_irqchip_handle_irq); =20 return 0; diff --git a/drivers/irqchip/irq-goldfish-pic.c b/drivers/irqchip/irq-goldf= ish-pic.c index 513f6edbbe95..a8b23b507ecd 100644 --- a/drivers/irqchip/irq-goldfish-pic.c +++ b/drivers/irqchip/irq-goldfish-pic.c @@ -101,10 +101,9 @@ static int __init goldfish_pic_of_init(struct device_n= ode *of_node, irq_setup_generic_chip(gc, IRQ_MSK(GFPIC_NR_IRQS), 0, IRQ_NOPROBE | IRQ_LEVEL, 0); =20 - gfpic->irq_domain =3D irq_domain_add_legacy(of_node, GFPIC_NR_IRQS, - GFPIC_IRQ_BASE, 0, - &goldfish_irq_domain_ops, - NULL); + gfpic->irq_domain =3D irq_domain_create_legacy(of_fwnode_handle(of_node),= GFPIC_NR_IRQS, + GFPIC_IRQ_BASE, 0, &goldfish_irq_domain_ops, + NULL); if (!gfpic->irq_domain) { pr_err("Failed to add irqdomain!\n"); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c index 31c3f70a5d5e..b7958c5a1221 100644 --- a/drivers/irqchip/irq-hip04.c +++ b/drivers/irqchip/irq-hip04.c @@ -386,10 +386,8 @@ hip04_of_init(struct device_node *node, struct device_= node *parent) return -EINVAL; } =20 - hip04_data.domain =3D irq_domain_add_legacy(node, nr_irqs, irq_base, - 0, - &hip04_irq_domain_ops, - &hip04_data); + hip04_data.domain =3D irq_domain_create_legacy(of_fwnode_handle(node), nr= _irqs, irq_base, 0, + &hip04_irq_domain_ops, &hip04_data); if (WARN_ON(!hip04_data.domain)) return -EINVAL; =20 diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c index 115bdcffab24..91b2f587119c 100644 --- a/drivers/irqchip/irq-i8259.c +++ b/drivers/irqchip/irq-i8259.c @@ -313,8 +313,8 @@ struct irq_domain * __init __init_i8259_irqs(struct dev= ice_node *node) =20 init_8259A(0); =20 - domain =3D irq_domain_add_legacy(node, 16, I8259A_IRQ_BASE, 0, - &i8259A_ops, NULL); + domain =3D irq_domain_create_legacy(of_fwnode_handle(node), 16, I8259A_IR= Q_BASE, 0, + &i8259A_ops, NULL); if (!domain) panic("Failed to add i8259 IRQ domain"); =20 diff --git a/drivers/irqchip/irq-idt3243x.c b/drivers/irqchip/irq-idt3243x.c index 0732a0e9af62..f8324fb1fe8f 100644 --- a/drivers/irqchip/irq-idt3243x.c +++ b/drivers/irqchip/irq-idt3243x.c @@ -72,7 +72,7 @@ static int idt_pic_init(struct device_node *of_node, stru= ct device_node *parent) goto out_unmap_irq; } =20 - domain =3D irq_domain_add_linear(of_node, IDT_PIC_NR_IRQS, + domain =3D irq_domain_create_linear(of_fwnode_handle(of_node), IDT_PIC_NR= _IRQS, &irq_generic_chip_ops, NULL); if (!domain) { pr_err("Failed to add irqdomain!\n"); diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c index 85f80bac0961..f0410d5d7315 100644 --- a/drivers/irqchip/irq-imgpdc.c +++ b/drivers/irqchip/irq-imgpdc.c @@ -372,7 +372,7 @@ static int pdc_intc_probe(struct platform_device *pdev) priv->syswake_irq =3D irq; =20 /* Set up an IRQ domain */ - priv->domain =3D irq_domain_add_linear(node, 16, &irq_generic_chip_ops, + priv->domain =3D irq_domain_create_linear(of_fwnode_handle(node), 16, &ir= q_generic_chip_ops, priv); if (unlikely(!priv->domain)) { dev_err(&pdev->dev, "cannot add IRQ domain\n"); diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv= 2.c index 095ae8e3217e..b91f5c14b405 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -240,8 +240,8 @@ static int __init imx_gpcv2_irqchip_init(struct device_= node *node, return -ENOMEM; } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS, - node, &gpcv2_irqchip_data_domain_ops, cd); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, + of_fwnode_handle(node), &gpcv2_irqchip_data_domain_ops, cd); if (!domain) { iounmap(cd->gpc_base); kfree(cd); diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-int= mux.c index 787543d07565..5f9b204d350b 100644 --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -254,7 +254,7 @@ static int imx_intmux_probe(struct platform_device *pde= v) goto out; } =20 - domain =3D irq_domain_add_linear(np, 32, &imx_intmux_domain_ops, + domain =3D irq_domain_create_linear(of_fwnode_handle(np), 32, &imx_intmu= x_domain_ops, &data->irqchip_data[i]); if (!domain) { ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-i= rqsteer.c index afbfcce3b1e3..6dc9ac48fee5 100644 --- a/drivers/irqchip/irq-imx-irqsteer.c +++ b/drivers/irqchip/irq-imx-irqsteer.c @@ -212,7 +212,7 @@ static int imx_irqsteer_probe(struct platform_device *p= dev) /* steer all IRQs into configured channel */ writel_relaxed(BIT(data->channel), data->regs + CHANCTRL); =20 - data->domain =3D irq_domain_add_linear(np, data->reg_num * 32, + data->domain =3D irq_domain_create_linear(of_fwnode_handle(np), data->reg= _num * 32, &imx_irqsteer_domain_ops, data); if (!data->domain) { dev_err(&pdev->dev, "failed to create IRQ domain\n"); diff --git a/drivers/irqchip/irq-ingenic-tcu.c b/drivers/irqchip/irq-ingeni= c-tcu.c index 3363f83bd7e9..e43ff8935b82 100644 --- a/drivers/irqchip/irq-ingenic-tcu.c +++ b/drivers/irqchip/irq-ingenic-tcu.c @@ -114,8 +114,8 @@ static int __init ingenic_tcu_irq_init(struct device_no= de *np, =20 tcu->nb_parent_irqs =3D irqs; =20 - tcu->domain =3D irq_domain_add_linear(np, 32, &irq_generic_chip_ops, - NULL); + tcu->domain =3D irq_domain_create_linear(of_fwnode_handle(np), 32, &irq_g= eneric_chip_ops, + NULL); if (!tcu->domain) { ret =3D -ENOMEM; goto err_free_tcu; diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c index cee839ca627e..52393724f213 100644 --- a/drivers/irqchip/irq-ingenic.c +++ b/drivers/irqchip/irq-ingenic.c @@ -90,8 +90,8 @@ static int __init ingenic_intc_of_init(struct device_node= *node, goto out_unmap_irq; } =20 - domain =3D irq_domain_add_linear(node, num_chips * 32, - &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), num_chips * 3= 2, + &irq_generic_chip_ops, NULL); if (!domain) { err =3D -ENOMEM; goto out_unmap_base; diff --git a/drivers/irqchip/irq-jcore-aic.c b/drivers/irqchip/irq-jcore-ai= c.c index 1f613eb7b7f0..94c05cf974be 100644 --- a/drivers/irqchip/irq-jcore-aic.c +++ b/drivers/irqchip/irq-jcore-aic.c @@ -107,9 +107,8 @@ static int __init aic_irq_of_init(struct device_node *n= ode, if (ret < 0) return ret; =20 - domain =3D irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, min_irq, - &jcore_aic_irqdomain_ops, - &jcore_aic); + domain =3D irq_domain_create_legacy(of_fwnode_handle(node), dom_sz - min_= irq, min_irq, + min_irq, &jcore_aic_irqdomain_ops, &jcore_aic); if (!domain) return -ENOMEM; =20 diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c index 37e1a03fcbb4..c9e902b7bf48 100644 --- a/drivers/irqchip/irq-keystone.c +++ b/drivers/irqchip/irq-keystone.c @@ -157,8 +157,8 @@ static int keystone_irq_probe(struct platform_device *p= dev) kirq->chip.irq_mask =3D keystone_irq_setmask; kirq->chip.irq_unmask =3D keystone_irq_unmask; =20 - kirq->irqd =3D irq_domain_add_linear(np, KEYSTONE_N_IRQ, - &keystone_irq_ops, kirq); + kirq->irqd =3D irq_domain_create_linear(of_fwnode_handle(np), KEYSTONE_N_= IRQ, + &keystone_irq_ops, kirq); if (!kirq->irqd) { dev_err(dev, "IRQ domain registration failed\n"); return -ENODEV; diff --git a/drivers/irqchip/irq-lpc32xx.c b/drivers/irqchip/irq-lpc32xx.c index 4d70a857133f..14cca44baa14 100644 --- a/drivers/irqchip/irq-lpc32xx.c +++ b/drivers/irqchip/irq-lpc32xx.c @@ -210,8 +210,8 @@ static int __init lpc32xx_of_ic_init(struct device_node= *node, return -EINVAL; } =20 - irqc->domain =3D irq_domain_add_linear(node, NR_LPC32XX_IC_IRQS, - &lpc32xx_irq_domain_ops, irqc); + irqc->domain =3D irq_domain_create_linear(of_fwnode_handle(node), NR_LPC3= 2XX_IC_IRQS, + &lpc32xx_irq_domain_ops, irqc); if (!irqc->domain) { pr_err("unable to add irq domain\n"); iounmap(irqc->base); diff --git a/drivers/irqchip/irq-ls-extirq.c b/drivers/irqchip/irq-ls-extir= q.c index 139f26b0a6ef..50a7b38381b9 100644 --- a/drivers/irqchip/irq-ls-extirq.c +++ b/drivers/irqchip/irq-ls-extirq.c @@ -208,8 +208,8 @@ ls_extirq_of_init(struct device_node *node, struct devi= ce_node *parent) of_device_is_compatible(node, "fsl,ls1043a-extirq"); raw_spin_lock_init(&priv->lock); =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, priv->nirq, node, - &extirq_domain_ops, priv); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, priv->nirq, of_f= wnode_handle(node), + &extirq_domain_ops, priv); if (!domain) { ret =3D -ENOMEM; goto err_add_hierarchy; diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scf= g-msi.c index cbe11a8afe4f..84bc5e4b47cf 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -215,10 +215,10 @@ static void ls_scfg_msi_irq_handler(struct irq_desc *= desc) static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) { /* Initialize MSI domain parent */ - msi_data->parent =3D irq_domain_add_linear(NULL, - msi_data->irqs_num, - &ls_scfg_msi_domain_ops, - msi_data); + msi_data->parent =3D irq_domain_create_linear(NULL, + msi_data->irqs_num, + &ls_scfg_msi_domain_ops, + msi_data); if (!msi_data->parent) { dev_err(&msi_data->pdev->dev, "failed to create IRQ domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-ls1x.c b/drivers/irqchip/irq-ls1x.c index 77a3f7dfaaf0..589d32007fca 100644 --- a/drivers/irqchip/irq-ls1x.c +++ b/drivers/irqchip/irq-ls1x.c @@ -126,8 +126,8 @@ static int __init ls1x_intc_of_init(struct device_node = *node, } =20 /* Set up an IRQ domain */ - priv->domain =3D irq_domain_add_linear(node, 32, &irq_generic_chip_ops, - NULL); + priv->domain =3D irq_domain_create_linear(of_fwnode_handle(node), 32, &ir= q_generic_chip_ops, + NULL); if (!priv->domain) { pr_err("ls1x-irq: cannot add IRQ domain\n"); err =3D -ENOMEM; diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c index 5dcd94c000a2..516a3a0e359c 100644 --- a/drivers/irqchip/irq-mchp-eic.c +++ b/drivers/irqchip/irq-mchp-eic.c @@ -248,8 +248,9 @@ static int mchp_eic_init(struct device_node *node, stru= ct device_node *parent) eic->irqs[i] =3D irq.args[1]; } =20 - eic->domain =3D irq_domain_add_hierarchy(parent_domain, 0, MCHP_EIC_NIRQ, - node, &mchp_eic_domain_ops, eic); + eic->domain =3D irq_domain_create_hierarchy(parent_domain, 0, MCHP_EIC_NI= RQ, + of_fwnode_handle(node), &mchp_eic_domain_ops, + eic); if (!eic->domain) { pr_err("%pOF: Failed to add domain\n", node); ret =3D -ENODEV; diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c index 0c7ae71a0af0..ac784ef3ed4b 100644 --- a/drivers/irqchip/irq-mips-cpu.c +++ b/drivers/irqchip/irq-mips-cpu.c @@ -238,11 +238,9 @@ static void mips_cpu_register_ipi_domain(struct device= _node *of_node) struct cpu_ipi_domain_state *ipi_domain_state; =20 ipi_domain_state =3D kzalloc(sizeof(*ipi_domain_state), GFP_KERNEL); - ipi_domain =3D irq_domain_add_hierarchy(irq_domain, - IRQ_DOMAIN_FLAG_IPI_SINGLE, - 2, of_node, - &mips_cpu_ipi_chip_ops, - ipi_domain_state); + ipi_domain =3D irq_domain_create_hierarchy(irq_domain, IRQ_DOMAIN_FLAG_IP= I_SINGLE, 2, + of_fwnode_handle(of_node), + &mips_cpu_ipi_chip_ops, ipi_domain_state); if (!ipi_domain) panic("Failed to add MIPS CPU IPI domain"); irq_domain_update_bus_token(ipi_domain, DOMAIN_BUS_IPI); @@ -260,9 +258,8 @@ static void __init __mips_cpu_irq_init(struct device_no= de *of_node) clear_c0_status(ST0_IM); clear_c0_cause(CAUSEF_IP); =20 - irq_domain =3D irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, 0, - &mips_cpu_intc_irq_domain_ops, - NULL); + irq_domain =3D irq_domain_create_legacy(of_fwnode_handle(of_node), 8, MIP= S_CPU_IRQ_BASE, 0, + &mips_cpu_intc_irq_domain_ops, NULL); if (!irq_domain) panic("Failed to add irqdomain for MIPS CPU"); =20 diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index bca8053864b2..34e8d09c12a0 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c @@ -841,10 +841,10 @@ static int gic_register_ipi_domain(struct device_node= *node) struct irq_domain *gic_ipi_domain; unsigned int v[2], num_ipis; =20 - gic_ipi_domain =3D irq_domain_add_hierarchy(gic_irq_domain, - IRQ_DOMAIN_FLAG_IPI_PER_CPU, - GIC_NUM_LOCAL_INTRS + gic_shared_intrs, - node, &gic_ipi_domain_ops, NULL); + gic_ipi_domain =3D irq_domain_create_hierarchy(gic_irq_domain, IRQ_DOMAIN= _FLAG_IPI_PER_CPU, + GIC_NUM_LOCAL_INTRS + gic_shared_intrs, + of_fwnode_handle(node), &gic_ipi_domain_ops, + NULL); if (!gic_ipi_domain) { pr_err("Failed to add IPI domain"); return -ENXIO; @@ -963,9 +963,10 @@ static int __init gic_of_init(struct device_node *node, gic_irq_dispatch); } =20 - gic_irq_domain =3D irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS + - gic_shared_intrs, 0, - &gic_irq_domain_ops, NULL); + gic_irq_domain =3D irq_domain_create_simple(of_fwnode_handle(node), + GIC_NUM_LOCAL_INTRS + + gic_shared_intrs, 0, + &gic_irq_domain_ops, NULL); if (!gic_irq_domain) { pr_err("Failed to add IRQ domain"); return -ENXIO; diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index 25cf4f80e767..09e640430208 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -261,9 +261,9 @@ static int __init mmp_init_bases(struct device_node *no= de) } =20 icu_data[0].virq_base =3D 0; - icu_data[0].domain =3D irq_domain_add_linear(node, nr_irqs, - &mmp_irq_domain_ops, - &icu_data[0]); + icu_data[0].domain =3D irq_domain_create_linear(of_fwnode_handle(node), n= r_irqs, + &mmp_irq_domain_ops, + &icu_data[0]); for (irq =3D 0; irq < nr_irqs; irq++) { ret =3D irq_create_mapping(icu_data[0].domain, irq); if (!ret) { @@ -391,9 +391,9 @@ static int __init mmp2_mux_of_init(struct device_node *= node, return -EINVAL; =20 icu_data[i].virq_base =3D 0; - icu_data[i].domain =3D irq_domain_add_linear(node, nr_irqs, - &mmp_irq_domain_ops, - &icu_data[i]); + icu_data[i].domain =3D irq_domain_create_linear(of_fwnode_handle(node), n= r_irqs, + &mmp_irq_domain_ops, + &icu_data[i]); for (irq =3D 0; irq < nr_irqs; irq++) { ret =3D irq_create_mapping(icu_data[i].domain, irq); if (!ret) { diff --git a/drivers/irqchip/irq-mscc-ocelot.c b/drivers/irqchip/irq-mscc-o= celot.c index 3dc745b14caf..7b3020f480d5 100644 --- a/drivers/irqchip/irq-mscc-ocelot.c +++ b/drivers/irqchip/irq-mscc-ocelot.c @@ -132,8 +132,8 @@ static int __init vcoreiii_irq_init(struct device_node = *node, if (!parent_irq) return -EINVAL; =20 - domain =3D irq_domain_add_linear(node, p->n_irq, - &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), p->n_irq, + &irq_generic_chip_ops, NULL); if (!domain) { pr_err("%pOFn: unable to add irq domain\n", node); return -ENOMEM; diff --git a/drivers/irqchip/irq-mst-intc.c b/drivers/irqchip/irq-mst-intc.c index f6133ae28155..9643cc3a77d7 100644 --- a/drivers/irqchip/irq-mst-intc.c +++ b/drivers/irqchip/irq-mst-intc.c @@ -273,8 +273,8 @@ static int __init mst_intc_of_init(struct device_node *= dn, raw_spin_lock_init(&cd->lock); cd->irq_start =3D irq_start; cd->nr_irqs =3D irq_end - irq_start + 1; - domain =3D irq_domain_add_hierarchy(domain_parent, 0, cd->nr_irqs, dn, - &mst_intc_domain_ops, cd); + domain =3D irq_domain_create_hierarchy(domain_parent, 0, cd->nr_irqs, of_= fwnode_handle(dn), + &mst_intc_domain_ops, cd); if (!domain) { iounmap(cd->base); kfree(cd); diff --git a/drivers/irqchip/irq-mtk-cirq.c b/drivers/irqchip/irq-mtk-cirq.c index 76bc0283e3b9..de481ba340f8 100644 --- a/drivers/irqchip/irq-mtk-cirq.c +++ b/drivers/irqchip/irq-mtk-cirq.c @@ -336,9 +336,8 @@ static int __init mtk_cirq_of_init(struct device_node *= node, cirq_data->offsets =3D match->data; =20 irq_num =3D cirq_data->ext_irq_end - cirq_data->ext_irq_start + 1; - domain =3D irq_domain_add_hierarchy(domain_parent, 0, - irq_num, node, - &cirq_domain_ops, cirq_data); + domain =3D irq_domain_create_hierarchy(domain_parent, 0, irq_num, of_fwno= de_handle(node), + &cirq_domain_ops, cirq_data); if (!domain) { ret =3D -ENOMEM; goto out_unmap; diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sys= irq.c index 586e52d5442b..6895e7096b27 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c @@ -207,8 +207,8 @@ static int __init mtk_sysirq_of_init(struct device_node= *node, chip_data->which_word[i] =3D word; } =20 - domain =3D irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node, - &sysirq_domain_ops, chip_data); + domain =3D irq_domain_create_hierarchy(domain_parent, 0, intpol_num, of_f= wnode_handle(node), + &sysirq_domain_ops, chip_data); if (!domain) { ret =3D -ENOMEM; goto out_free_which_word; diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pi= c.c index 3888b7585981..8db638aa21d2 100644 --- a/drivers/irqchip/irq-mvebu-pic.c +++ b/drivers/irqchip/irq-mvebu-pic.c @@ -150,8 +150,8 @@ static int mvebu_pic_probe(struct platform_device *pdev) return -EINVAL; } =20 - pic->domain =3D irq_domain_add_linear(node, PIC_MAX_IRQS, - &mvebu_pic_domain_ops, pic); + pic->domain =3D irq_domain_create_linear(of_fwnode_handle(node), PIC_MAX_= IRQS, + &mvebu_pic_domain_ops, pic); if (!pic->domain) { dev_err(&pdev->dev, "Failed to allocate irq domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c index d67b5da38982..0bb423dd5280 100644 --- a/drivers/irqchip/irq-mxs.c +++ b/drivers/irqchip/irq-mxs.c @@ -162,8 +162,8 @@ static const struct irq_domain_ops icoll_irq_domain_ops= =3D { static void __init icoll_add_domain(struct device_node *np, int num) { - icoll_domain =3D irq_domain_add_linear(np, num, - &icoll_irq_domain_ops, NULL); + icoll_domain =3D irq_domain_create_linear(of_fwnode_handle(np), num, + &icoll_irq_domain_ops, NULL); =20 if (!icoll_domain) panic("%pOF: unable to create irq domain", np); diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c index ba6332b00a0a..76e11cac9631 100644 --- a/drivers/irqchip/irq-nvic.c +++ b/drivers/irqchip/irq-nvic.c @@ -90,7 +90,7 @@ static int __init nvic_of_init(struct device_node *node, irqs =3D NVIC_MAX_IRQ; =20 nvic_irq_domain =3D - irq_domain_add_linear(node, irqs, &nvic_irq_domain_ops, NULL); + irq_domain_create_linear(of_fwnode_handle(node), irqs, &nvic_irq_domain_= ops, NULL); =20 if (!nvic_irq_domain) { pr_warn("Failed to allocate irq domain\n"); diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-int= c.c index ad84a2f03368..16f00db570e7 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -248,7 +248,7 @@ static int __init omap_init_irq_of(struct device_node *= node) if (WARN_ON(!omap_irq_base)) return -ENOMEM; =20 - domain =3D irq_domain_add_linear(node, omap_nr_irqs, + domain =3D irq_domain_create_linear(of_fwnode_handle(node), omap_nr_irqs, &irq_generic_chip_ops, NULL); =20 omap_irq_soft_reset(); @@ -274,7 +274,7 @@ static int __init omap_init_irq_legacy(u32 base, struct= device_node *node) irq_base =3D 0; } =20 - domain =3D irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0, + domain =3D irq_domain_create_legacy(of_fwnode_handle(node), omap_nr_irqs,= irq_base, 0, &irq_domain_simple_ops, NULL); =20 omap_irq_soft_reset(); diff --git a/drivers/irqchip/irq-or1k-pic.c b/drivers/irqchip/irq-or1k-pic.c index f289ccd95291..48126067c54b 100644 --- a/drivers/irqchip/irq-or1k-pic.c +++ b/drivers/irqchip/irq-or1k-pic.c @@ -144,8 +144,8 @@ static int __init or1k_pic_init(struct device_node *nod= e, /* Disable all interrupts until explicitly requested */ mtspr(SPR_PICMR, (0UL)); =20 - root_domain =3D irq_domain_add_linear(node, 32, &or1k_irq_domain_ops, - pic); + root_domain =3D irq_domain_create_linear(of_fwnode_handle(node), 32, &or1= k_irq_domain_ops, + pic); =20 set_handle_irq(or1k_pic_handle_irq); =20 diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c index 4e4e874e09a8..dddbc05917c0 100644 --- a/drivers/irqchip/irq-orion.c +++ b/drivers/irqchip/irq-orion.c @@ -59,7 +59,7 @@ static int __init orion_irq_init(struct device_node *np, /* count number of irq chips by valid reg addresses */ num_chips =3D of_address_count(np); =20 - orion_irq_domain =3D irq_domain_add_linear(np, + orion_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(np), num_chips * ORION_IRQS_PER_CHIP, &irq_generic_chip_ops, NULL); if (!orion_irq_domain) @@ -146,8 +146,8 @@ static int __init orion_bridge_irq_init(struct device_n= ode *np, /* get optional number of interrupts provided */ of_property_read_u32(np, "marvell,#interrupts", &nrirqs); =20 - domain =3D irq_domain_add_linear(np, nrirqs, - &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(np), nrirqs, + &irq_generic_chip_ops, NULL); if (!domain) { pr_err("%pOFn: unable to add irq domain\n", np); return -ENOMEM; diff --git a/drivers/irqchip/irq-owl-sirq.c b/drivers/irqchip/irq-owl-sirq.c index 6e4127465094..3d93d21f6732 100644 --- a/drivers/irqchip/irq-owl-sirq.c +++ b/drivers/irqchip/irq-owl-sirq.c @@ -323,8 +323,8 @@ static int __init owl_sirq_init(const struct owl_sirq_p= arams *params, owl_sirq_clear_set_extctl(chip_data, 0, INTC_EXTCTL_CLK_SEL, i); } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, NUM_SIRQ, node, - &owl_sirq_domain_ops, chip_data); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, NUM_SIRQ, of_fwn= ode_handle(node), + &owl_sirq_domain_ops, chip_data); if (!domain) { pr_err("%pOF: failed to add domain\n", node); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-e= vic.c index b546b1036e12..5dfda8e8df10 100644 --- a/drivers/irqchip/irq-pic32-evic.c +++ b/drivers/irqchip/irq-pic32-evic.c @@ -227,9 +227,9 @@ static int __init pic32_of_init(struct device_node *nod= e, goto err_iounmap; } =20 - evic_irq_domain =3D irq_domain_add_linear(node, nchips * 32, - &pic32_irq_domain_ops, - priv); + evic_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), nchi= ps * 32, + &pic32_irq_domain_ops, + priv); if (!evic_irq_domain) { ret =3D -ENOMEM; goto err_free_priv; diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-i= ntc.c index bee01980b463..8f7c9dc45953 100644 --- a/drivers/irqchip/irq-pruss-intc.c +++ b/drivers/irqchip/irq-pruss-intc.c @@ -555,8 +555,8 @@ static int pruss_intc_probe(struct platform_device *pde= v) =20 mutex_init(&intc->lock); =20 - intc->domain =3D irq_domain_add_linear(dev->of_node, max_system_events, - &pruss_intc_irq_domain_ops, intc); + intc->domain =3D irq_domain_create_linear(of_fwnode_handle(dev->of_node),= max_system_events, + &pruss_intc_irq_domain_ops, intc); if (!intc->domain) return -ENOMEM; =20 diff --git a/drivers/irqchip/irq-realtek-rtl.c b/drivers/irqchip/irq-realte= k-rtl.c index 2a349082af81..942c1f8c363d 100644 --- a/drivers/irqchip/irq-realtek-rtl.c +++ b/drivers/irqchip/irq-realtek-rtl.c @@ -162,7 +162,7 @@ static int __init realtek_rtl_of_init(struct device_nod= e *node, struct device_no else if (!parent_irq) return -ENODEV; =20 - domain =3D irq_domain_add_linear(node, RTL_ICTL_NUM_INPUTS, &irq_domain_o= ps, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), RTL_ICTL_NUM_= INPUTS, &irq_domain_ops, NULL); if (!domain) return -ENOMEM; =20 diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/ir= q-renesas-intc-irqpin.c index 954419f2460d..0959ed43b1a9 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -513,8 +513,10 @@ static int intc_irqpin_probe(struct platform_device *p= dev) irq_chip->irq_set_wake =3D intc_irqpin_irq_set_wake; irq_chip->flags =3D IRQCHIP_MASK_ON_SUSPEND; =20 - p->irq_domain =3D irq_domain_add_simple(dev->of_node, nirqs, 0, - &intc_irqpin_irq_domain_ops, p); + p->irq_domain =3D irq_domain_create_simple(of_fwnode_handle(dev->of_node), + nirqs, 0, + &intc_irqpin_irq_domain_ops, + p); if (!p->irq_domain) { ret =3D -ENXIO; dev_err(dev, "cannot initialize irq domain\n"); diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renes= as-irqc.c index cbce8ffc7de4..5c3196e5a437 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -168,8 +168,8 @@ static int irqc_probe(struct platform_device *pdev) =20 p->cpu_int_base =3D p->iomem + IRQC_INT_CPU_BASE(0); /* SYS-SPI */ =20 - p->irq_domain =3D irq_domain_add_linear(dev->of_node, p->number_of_irqs, - &irq_generic_chip_ops, p); + p->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(dev->of_node)= , p->number_of_irqs, + &irq_generic_chip_ops, p); if (!p->irq_domain) { ret =3D -ENXIO; dev_err(dev, "cannot initialize irq domain\n"); diff --git a/drivers/irqchip/irq-renesas-rza1.c b/drivers/irqchip/irq-renes= as-rza1.c index d4e6a68889ec..0a9640ba0adb 100644 --- a/drivers/irqchip/irq-renesas-rza1.c +++ b/drivers/irqchip/irq-renesas-rza1.c @@ -231,9 +231,9 @@ static int rza1_irqc_probe(struct platform_device *pdev) priv->chip.irq_set_type =3D rza1_irqc_set_type; priv->chip.flags =3D IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE; =20 - priv->irq_domain =3D irq_domain_add_hierarchy(parent, 0, IRQC_NUM_IRQ, - np, &rza1_irqc_domain_ops, - priv); + priv->irq_domain =3D irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, + of_fwnode_handle(np), &rza1_irqc_domain_ops, + priv); if (!priv->irq_domain) { dev_err(dev, "cannot initialize irq domain\n"); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 6a2e41f02446..1e861bd64f97 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -574,9 +574,9 @@ static int rzg2l_irqc_common_init(struct device_node *n= ode, struct device_node * =20 raw_spin_lock_init(&rzg2l_irqc_data->lock); =20 - irq_domain =3D irq_domain_add_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, - node, &rzg2l_irqc_domain_ops, - rzg2l_irqc_data); + irq_domain =3D irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, + of_fwnode_handle(node), &rzg2l_irqc_domain_ops, + rzg2l_irqc_data); if (!irq_domain) { pm_runtime_put(dev); return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n"); diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-rene= sas-rzv2h.c index 3d5b5fdf9bde..7a61d454a1a5 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -514,8 +514,9 @@ static int rzv2h_icu_init_common(struct device_node *no= de, struct device_node *p =20 raw_spin_lock_init(&rzv2h_icu_data->lock); =20 - irq_domain =3D irq_domain_add_hierarchy(parent_domain, 0, ICU_NUM_IRQ, no= de, - &rzv2h_icu_domain_ops, rzv2h_icu_data); + irq_domain =3D irq_domain_create_hierarchy(parent_domain, 0, ICU_NUM_IRQ, + of_fwnode_handle(node), &rzv2h_icu_domain_ops, + rzv2h_icu_data); if (!irq_domain) { dev_err(&pdev->dev, "failed to add irq domain\n"); ret =3D -ENOMEM; diff --git a/drivers/irqchip/irq-sa11x0.c b/drivers/irqchip/irq-sa11x0.c index 9d0b80271949..d8d4dff16276 100644 --- a/drivers/irqchip/irq-sa11x0.c +++ b/drivers/irqchip/irq-sa11x0.c @@ -162,7 +162,7 @@ void __init sa11x0_init_irq_nodt(int irq_start, resourc= e_size_t io_start) */ writel_relaxed(1, iobase + ICCR); =20 - sa1100_normal_irqdomain =3D irq_domain_add_simple(NULL, + sa1100_normal_irqdomain =3D irq_domain_create_simple(NULL, 32, irq_start, &sa1100_normal_irqdomain_ops, NULL); =20 diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c index 7d10bf6e5824..0cad68aa8388 100644 --- a/drivers/irqchip/irq-sni-exiu.c +++ b/drivers/irqchip/irq-sni-exiu.c @@ -253,8 +253,8 @@ static int __init exiu_dt_init(struct device_node *node, if (IS_ERR(data)) return PTR_ERR(data); =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, NUM_IRQS, node, - &exiu_domain_ops, data); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, NUM_IRQS, of_fwn= ode_handle(node), + &exiu_domain_ops, data); if (!domain) { pr_err("%pOF: failed to allocate domain\n", node); goto out_unmap; diff --git a/drivers/irqchip/irq-sp7021-intc.c b/drivers/irqchip/irq-sp7021= -intc.c index bed78d1def3d..2a6eda9ab62e 100644 --- a/drivers/irqchip/irq-sp7021-intc.c +++ b/drivers/irqchip/irq-sp7021-intc.c @@ -256,8 +256,8 @@ static int __init sp_intc_init_dt(struct device_node *n= ode, struct device_node * writel_relaxed(~0, REG_INTR_CLEAR + i * 4); } =20 - sp_intc.domain =3D irq_domain_add_linear(node, SP_INTC_NR_IRQS, - &sp_intc_dm_ops, &sp_intc); + sp_intc.domain =3D irq_domain_create_linear(of_fwnode_handle(node), SP_IN= TC_NR_IRQS, + &sp_intc_dm_ops, &sp_intc); if (!sp_intc.domain) { ret =3D -ENOMEM; goto out_unmap1; diff --git a/drivers/irqchip/irq-starfive-jh8100-intc.c b/drivers/irqchip/i= rq-starfive-jh8100-intc.c index 0f5837176e53..2460798ec158 100644 --- a/drivers/irqchip/irq-starfive-jh8100-intc.c +++ b/drivers/irqchip/irq-starfive-jh8100-intc.c @@ -158,8 +158,8 @@ static int __init starfive_intc_init(struct device_node= *intc, =20 raw_spin_lock_init(&irqc->lock); =20 - irqc->domain =3D irq_domain_add_linear(intc, STARFIVE_INTC_SRC_IRQ_NUM, - &starfive_intc_domain_ops, irqc); + irqc->domain =3D irq_domain_create_linear(of_fwnode_handle(intc), STARFIV= E_INTC_SRC_IRQ_NUM, + &starfive_intc_domain_ops, irqc); if (!irqc->domain) { pr_err("Unable to create IRQ domain\n"); ret =3D -EINVAL; diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-e= xti.c index 7c6a0080c330..7cd34f9b0269 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -344,8 +344,8 @@ static int __init stm32_exti_init(const struct stm32_ex= ti_drv_data *drv_data, if (!host_data) return -ENOMEM; =20 - domain =3D irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK, - &irq_exti_domain_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), drv_data->ban= k_nr * IRQS_PER_BANK, + &irq_exti_domain_ops, NULL); if (!domain) { pr_err("%pOFn: Could not register interrupt domain.\n", node); diff --git a/drivers/irqchip/irq-stm32mp-exti.c b/drivers/irqchip/irq-stm32= mp-exti.c index 649b84f12efc..c6b4407d05f9 100644 --- a/drivers/irqchip/irq-stm32mp-exti.c +++ b/drivers/irqchip/irq-stm32mp-exti.c @@ -682,10 +682,9 @@ static int stm32mp_exti_probe(struct platform_device *= pdev) return -EINVAL; } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, - drv_data->bank_nr * IRQS_PER_BANK, - np, &stm32mp_exti_domain_ops, - host_data); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, drv_data->bank_n= r * IRQS_PER_BANK, + of_fwnode_handle(np), &stm32mp_exti_domain_ops, + host_data); =20 if (!domain) { dev_err(dev, "Could not register exti domain\n"); diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c index dd506ebfdacb..9c2c9caeca2a 100644 --- a/drivers/irqchip/irq-sun4i.c +++ b/drivers/irqchip/irq-sun4i.c @@ -133,7 +133,7 @@ static int __init sun4i_of_init(struct device_node *nod= e, /* Configure the external interrupt source type */ writel(0x00, irq_ic_data->irq_base + SUN4I_IRQ_NMI_CTRL_REG); =20 - irq_ic_data->irq_domain =3D irq_domain_add_linear(node, 3 * 32, + irq_ic_data->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(nod= e), 3 * 32, &sun4i_irq_ops, NULL); if (!irq_ic_data->irq_domain) panic("%pOF: unable to create IRQ domain\n", node); diff --git a/drivers/irqchip/irq-sun6i-r.c b/drivers/irqchip/irq-sun6i-r.c index 99958d470d62..37d4b29763bc 100644 --- a/drivers/irqchip/irq-sun6i-r.c +++ b/drivers/irqchip/irq-sun6i-r.c @@ -338,8 +338,8 @@ static int __init sun6i_r_intc_init(struct device_node = *node, return PTR_ERR(base); } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, 0, node, - &sun6i_r_intc_domain_ops, NULL); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_han= dle(node), + &sun6i_r_intc_domain_ops, NULL); if (!domain) { pr_err("%pOF: Failed to allocate domain\n", node); iounmap(base); diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nm= i.c index 01b0d8321728..f521341f50d9 100644 --- a/drivers/irqchip/irq-sunxi-nmi.c +++ b/drivers/irqchip/irq-sunxi-nmi.c @@ -159,7 +159,7 @@ static int __init sunxi_sc_nmi_irq_init(struct device_n= ode *node, struct irq_domain *domain; int ret; =20 - domain =3D irq_domain_add_linear(node, 1, &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), 1, &irq_gener= ic_chip_ops, NULL); if (!domain) { pr_err("Could not register interrupt domain.\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-tb10x.c b/drivers/irqchip/irq-tb10x.c index d59bfbe8c6d0..733dbda18a82 100644 --- a/drivers/irqchip/irq-tb10x.c +++ b/drivers/irqchip/irq-tb10x.c @@ -121,13 +121,13 @@ static int __init of_tb10x_init_irq(struct device_nod= e *ictl, goto ioremap_fail; } =20 - domain =3D irq_domain_add_linear(ictl, AB_IRQCTL_MAXIRQ, - &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(ictl), AB_IRQCTL_MAX= IRQ, + &irq_generic_chip_ops, NULL); if (!domain) { ret =3D -ENOMEM; pr_err("%pOFn: Could not register interrupt domain.\n", ictl); - goto irq_domain_add_fail; + goto irq_domain_create_fail; } =20 ret =3D irq_alloc_domain_generic_chips(domain, AB_IRQCTL_MAXIRQ, @@ -174,7 +174,7 @@ static int __init of_tb10x_init_irq(struct device_node = *ictl, =20 gc_alloc_fail: irq_domain_remove(domain); -irq_domain_add_fail: +irq_domain_create_fail: iounmap(reg_base); ioremap_fail: release_mem_region(mem.start, resource_size(&mem)); diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c index ad3e2c1b3c87..66cbb9f77ff3 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -330,9 +330,8 @@ static int __init tegra_ictlr_init(struct device_node *= node, node, num_ictlrs, soc->num_ictlrs); =20 =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32, - node, &tegra_ictlr_domain_ops, - lic); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, num_ictlrs * 32, + of_fwnode_handle(node), &tegra_ictlr_domain_ops, lic); if (!domain) { pr_err("%pOF: failed to allocated domain\n", node); err =3D -ENOMEM; diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci= -inta.c index 38dfc1f9a56b..7de59238e6b0 100644 --- a/drivers/irqchip/irq-ti-sci-inta.c +++ b/drivers/irqchip/irq-ti-sci-inta.c @@ -701,9 +701,9 @@ static int ti_sci_inta_irq_domain_probe(struct platform= _device *pdev) if (ret) return ret; =20 - domain =3D irq_domain_add_linear(dev_of_node(dev), - ti_sci_get_num_resources(inta->vint), - &ti_sci_inta_irq_domain_ops, inta); + domain =3D irq_domain_create_linear(of_fwnode_handle(dev_of_node(dev)), + ti_sci_get_num_resources(inta->vint), + &ti_sci_inta_irq_domain_ops, inta); if (!domain) { dev_err(dev, "Failed to allocate IRQ domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci= -intr.c index 686a8f69fd9c..07fff5ae5ce0 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -274,8 +274,9 @@ static int ti_sci_intr_irq_domain_probe(struct platform= _device *pdev) return PTR_ERR(intr->out_irqs); } =20 - domain =3D irq_domain_add_hierarchy(parent_domain, 0, 0, dev_of_node(dev), - &ti_sci_intr_irq_domain_ops, intr); + domain =3D irq_domain_create_hierarchy(parent_domain, 0, 0, + of_fwnode_handle(dev_of_node(dev)), + &ti_sci_intr_irq_domain_ops, intr); if (!domain) { dev_err(dev, "Failed to allocate IRQ domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-ts4800.c b/drivers/irqchip/irq-ts4800.c index 960c343d5781..e625f4fb2bb8 100644 --- a/drivers/irqchip/irq-ts4800.c +++ b/drivers/irqchip/irq-ts4800.c @@ -125,7 +125,7 @@ static int ts4800_ic_probe(struct platform_device *pdev) return -EINVAL; } =20 - data->domain =3D irq_domain_add_linear(node, 8, &ts4800_ic_ops, data); + data->domain =3D irq_domain_create_linear(of_fwnode_handle(node), 8, &ts4= 800_ic_ops, data); if (!data->domain) { dev_err(&pdev->dev, "cannot add IRQ domain\n"); return -ENOMEM; diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-ver= satile-fpga.c index 0abc8934c2ee..034ce6afe170 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -176,8 +176,8 @@ static void __init fpga_irq_init(void __iomem *base, in= t parent_irq, f); } =20 - f->domain =3D irq_domain_add_linear(node, fls(valid), - &fpga_irqdomain_ops, f); + f->domain =3D irq_domain_create_linear(of_fwnode_handle(node), fls(valid), + &fpga_irqdomain_ops, f); =20 /* This will allocate all valid descriptors in the linear case */ for (i =3D 0; i < fls(valid); i++) diff --git a/drivers/irqchip/irq-vf610-mscm-ir.c b/drivers/irqchip/irq-vf61= 0-mscm-ir.c index 2b9a8ba58e26..5d9c7503aa7f 100644 --- a/drivers/irqchip/irq-vf610-mscm-ir.c +++ b/drivers/irqchip/irq-vf610-mscm-ir.c @@ -209,9 +209,9 @@ static int __init vf610_mscm_ir_of_init(struct device_n= ode *node, regmap_read(mscm_cp_regmap, MSCM_CPxNUM, &cpuid); mscm_ir_data->cpu_mask =3D 0x1 << cpuid; =20 - domain =3D irq_domain_add_hierarchy(domain_parent, 0, - MSCM_IRSPRC_NUM, node, - &mscm_irq_domain_ops, mscm_ir_data); + domain =3D irq_domain_create_hierarchy(domain_parent, 0, MSCM_IRSPRC_NUM, + of_fwnode_handle(node), &mscm_irq_domain_ops, + mscm_ir_data); if (!domain) { ret =3D -ENOMEM; goto out_unmap; diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c index ea93e7236c4a..2bcdf216a000 100644 --- a/drivers/irqchip/irq-vic.c +++ b/drivers/irqchip/irq-vic.c @@ -289,8 +289,9 @@ static void __init vic_register(void __iomem *base, uns= igned int parent_irq, vic_handle_irq_cascaded, v); } =20 - v->domain =3D irq_domain_add_simple(node, fls(valid_sources), irq, - &vic_irqdomain_ops, v); + v->domain =3D irq_domain_create_simple(of_fwnode_handle(node), + fls(valid_sources), irq, + &vic_irqdomain_ops, v); /* create an IRQ mapping for each valid IRQ */ for (i =3D 0; i < fls(valid_sources); i++) if (valid_sources & (1 << i)) diff --git a/drivers/irqchip/irq-vt8500.c b/drivers/irqchip/irq-vt8500.c index e17dd3a8c2d5..55d5cd1211d9 100644 --- a/drivers/irqchip/irq-vt8500.c +++ b/drivers/irqchip/irq-vt8500.c @@ -200,7 +200,7 @@ static int __init vt8500_irq_init(struct device_node *n= ode, } =20 intc[active_cnt].base =3D of_iomap(np, 0); - intc[active_cnt].domain =3D irq_domain_add_linear(node, 64, + intc[active_cnt].domain =3D irq_domain_create_linear(of_fwnode_handle(nod= e), 64, &vt8500_irq_domain_ops, &intc[active_cnt]); =20 if (!intc[active_cnt].base) { diff --git a/drivers/irqchip/irq-wpcm450-aic.c b/drivers/irqchip/irq-wpcm45= 0-aic.c index 91df62a64cd9..a8ed4894d29e 100644 --- a/drivers/irqchip/irq-wpcm450-aic.c +++ b/drivers/irqchip/irq-wpcm450-aic.c @@ -154,7 +154,7 @@ static int __init wpcm450_aic_of_init(struct device_nod= e *node, =20 set_handle_irq(wpcm450_aic_handle_irq); =20 - aic->domain =3D irq_domain_add_linear(node, AIC_NUM_IRQS, &wpcm450_aic_op= s, aic); + aic->domain =3D irq_domain_create_linear(of_fwnode_handle(node), AIC_NUM_= IRQS, &wpcm450_aic_ops, aic); =20 return 0; } diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx= -intc.c index 38727e9cc713..92dcb9fdcb25 100644 --- a/drivers/irqchip/irq-xilinx-intc.c +++ b/drivers/irqchip/irq-xilinx-intc.c @@ -212,8 +212,8 @@ static int __init xilinx_intc_of_init(struct device_nod= e *intc, xintc_write(irqc, MER, MER_HIE | MER_ME); } =20 - irqc->root_domain =3D irq_domain_add_linear(intc, irqc->nr_irq, - &xintc_irq_domain_ops, irqc); + irqc->root_domain =3D irq_domain_create_linear(of_fwnode_handle(intc), ir= qc->nr_irq, + &xintc_irq_domain_ops, irqc); if (!irqc->root_domain) { pr_err("irq-xilinx: Unable to create IRQ domain\n"); ret =3D -EINVAL; diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-m= x.c index 9b441d180299..9fdacbd89a63 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c @@ -167,8 +167,7 @@ static void __init xtensa_mx_init_common(struct irq_dom= ain *root_domain) int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent) { struct irq_domain *root_domain =3D - irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, - &xtensa_mx_irq_domain_ops, + irq_domain_create_legacy(NULL, NR_IRQS - 1, 1, 0, &xtensa_mx_irq_domain_= ops, &xtensa_mx_irq_chip); xtensa_mx_init_common(root_domain); return 0; @@ -178,7 +177,7 @@ static int __init xtensa_mx_init(struct device_node *np, struct device_node *interrupt_parent) { struct irq_domain *root_domain =3D - irq_domain_add_linear(np, NR_IRQS, &xtensa_mx_irq_domain_ops, + irq_domain_create_linear(of_fwnode_handle(np), NR_IRQS, &xtensa_mx_irq_d= omain_ops, &xtensa_mx_irq_chip); xtensa_mx_init_common(root_domain); return 0; diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-= pic.c index 9be7b7c5cd23..44e7be051a2e 100644 --- a/drivers/irqchip/irq-xtensa-pic.c +++ b/drivers/irqchip/irq-xtensa-pic.c @@ -85,7 +85,7 @@ static struct irq_chip xtensa_irq_chip =3D { int __init xtensa_pic_init_legacy(struct device_node *interrupt_parent) { struct irq_domain *root_domain =3D - irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, + irq_domain_create_legacy(NULL, NR_IRQS - 1, 1, 0, &xtensa_irq_domain_ops, &xtensa_irq_chip); irq_set_default_domain(root_domain); return 0; @@ -95,7 +95,7 @@ static int __init xtensa_pic_init(struct device_node *np, struct device_node *interrupt_parent) { struct irq_domain *root_domain =3D - irq_domain_add_linear(np, NR_IRQS, &xtensa_irq_domain_ops, + irq_domain_create_linear(of_fwnode_handle(np), NR_IRQS, &xtensa_irq_doma= in_ops, &xtensa_irq_chip); irq_set_default_domain(root_domain); return 0; diff --git a/drivers/irqchip/irq-zevio.c b/drivers/irqchip/irq-zevio.c index 7a72620fc478..22d46c246594 100644 --- a/drivers/irqchip/irq-zevio.c +++ b/drivers/irqchip/irq-zevio.c @@ -92,8 +92,8 @@ static int __init zevio_of_init(struct device_node *node, zevio_init_irq_base(zevio_irq_io + IO_IRQ_BASE); zevio_init_irq_base(zevio_irq_io + IO_FIQ_BASE); =20 - zevio_irq_domain =3D irq_domain_add_linear(node, MAX_INTRS, - &irq_generic_chip_ops, NULL); + zevio_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), MAX= _INTRS, + &irq_generic_chip_ops, NULL); BUG_ON(!zevio_irq_domain); =20 ret =3D irq_alloc_domain_generic_chips(zevio_irq_domain, MAX_INTRS, 1, diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c index 7c17a6f643ef..576e55569d77 100644 --- a/drivers/irqchip/spear-shirq.c +++ b/drivers/irqchip/spear-shirq.c @@ -239,7 +239,7 @@ static int __init shirq_init(struct spear_shirq **shirq= _blocks, int block_nr, goto err_unmap; } =20 - shirq_domain =3D irq_domain_add_legacy(np, nr_irqs, virq_base, 0, + shirq_domain =3D irq_domain_create_legacy(of_fwnode_handle(np), nr_irqs, = virq_base, 0, &irq_domain_simple_ops, NULL); if (WARN_ON(!shirq_domain)) { pr_warn("%s: irq domain init failed\n", __func__); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 884BA25486D; Wed, 19 Mar 2025 09:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376717; cv=none; b=Ji6fmtOUEw8duLzH2s8eVwGCj0FxH0i5cTROTso2dtB1b2rM59TfE/bKhQaDbDQTjo2s1MU/K0YuwriVi12lxXTxuiLwu1iRShILnydZQKvTgFvlgcxeJgtc2vEEHZlwCSrxSR91jvdsYMLVah57H0mfQBgaNBbFSl0M4RUhk/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376717; c=relaxed/simple; bh=P6sjrUHXsoaSHeq3CPkjoBE3d6J1juF5K3BefowhNh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FuFJLOw5qgESGIu4Rcz1tlLj5N8CoYouneIueDjZ+Si7mnKTyn7x+xA9FQTrJmeH8AU06SMYIle3sum73kGMRNsKCze3fMYCfe10A659OE1N2HOEQbtxs5nCLWBznX6S4LHkmFWVz7vzB0MZpTSpoNO4AeWKHX6Gk5KXc1LHI3w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cfXLsQ3Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cfXLsQ3Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D3C3C4CEF2; Wed, 19 Mar 2025 09:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376717; bh=P6sjrUHXsoaSHeq3CPkjoBE3d6J1juF5K3BefowhNh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cfXLsQ3ZnczG0sKBKJ+DvST6vAjMbjKz8guv23LSY6x6jwTzi5wjMZYwSAQvDdT6p oxQ39/hBr84fSvuzqc08/LV44EgDOD9ir1nQCIoK3sHqwqoHSfAKh9K3CAwgBPlcUk fIQjCoD0E3QLa3yyketenltkK/TRjJ1kfizyNUsMG7TM5k/gbhZy2SG+LAV9Yct/ao oH7mX2uKZ5H6GUDCIgFbMlAUJjFO3+wV6e1fEdPmWPdPR5fvI7Hr3QZ33eQnidNNha Zunf+dgnfKa3u7ZHazwkkocGVa6Eg7TIjMovXfqDPNvbKLIcCvJVnYNBHnd11Xs2cr GBtT4E2YmfGfA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Manivannan Sadhasivam , Jassi Brar , linux-arm-msm@vger.kernel.org Subject: [PATCH v2 22/57] irqdomain: mailbox: Switch to irq_domain_create_tree() Date: Wed, 19 Mar 2025 10:29:15 +0100 Message-ID: <20250319092951.37667-23-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Manivannan Sadhasivam Cc: Jassi Brar Cc: linux-arm-msm@vger.kernel.org --- drivers/mailbox/qcom-ipcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 0b17a38ea6bf..ea44ffb5ce1a 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -312,8 +312,8 @@ static int qcom_ipcc_probe(struct platform_device *pdev) if (!name) return -ENOMEM; =20 - ipcc->irq_domain =3D irq_domain_add_tree(pdev->dev.of_node, - &qcom_ipcc_irq_ops, ipcc); + ipcc->irq_domain =3D irq_domain_create_tree(of_fwnode_handle(pdev->dev.of= _node), + &qcom_ipcc_irq_ops, ipcc); if (!ipcc->irq_domain) return -ENOMEM; =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CB559254AF0; Wed, 19 Mar 2025 09:31:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376720; cv=none; b=LwVuKhjdr/X9DFPu9FJ8yF58Wt5rXyptyj5vg8VvKtqaeZv2aMLFt7bh+OggmzWUlig22VE2AvibrpbFZUsVK/qxCcJKmIwPzelHMdY1naGauCYZCkcuyjW5lU2NMbcAmUyFKwyakNJN0O07NgrHnTE7AjKGCnkdIw0jTAD4JU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376720; c=relaxed/simple; bh=pamQx90P4JddVSDYgi5dG5r3b51ayH5Zzm7osNypMq0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gN4FMCn8jYmPN1ys4WaJD2nwPi4aB7Z2Xdoqb12F5ImTlzKiybyhdpivHrr8dFfifGomh3GYejlyHsFlXApTmMDX0Sn0+peoAh1i9lLLpYaXVtIJk5sLVdkw26wurou1cGHL5pk9RDDvqQTsYMJ/ezLf/t7hYUzzLrTX3Lmdhqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t9O7b8oc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t9O7b8oc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C114C4CEE9; Wed, 19 Mar 2025 09:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376719; bh=pamQx90P4JddVSDYgi5dG5r3b51ayH5Zzm7osNypMq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t9O7b8ocFw8kA+vzq8XMGOcyEJq/e5s0gsWqqhllYzh9jPwE3ylw9RNcN8WljA0RN Jk7kma1tOdMEPMdvJCNcnsRYXGaq9R0Rbrde5cEUe9b6Pz6grJvY4jcA9Fy3htSSdh 3+6VGdYfz7s67VW+g3bQqlFV5rV3Ksq8WU7qynBlJ1Yoa5/ETqw1KgIwPJAeb+Eefe SGMYPJqhEjDD5O5CQkjX21vdGIY2bbqOiAjOvqys5SqAeDXB6akQCNkBxZLATsohBH CGWc6/1+tqu/StrcmECZ2ZWbLt2rA42dfw9QxbnAqOqCQrW4LuDzh90GFT43AQ6370 NVr1JhdtCO3xA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Roger Quadros , Tony Lindgren , Krzysztof Kozlowski , linux-omap@vger.kernel.org Subject: [PATCH v2 23/57] irqdomain: memory: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:16 +0100 Message-ID: <20250319092951.37667-24-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Roger Quadros Cc: Tony Lindgren Cc: Krzysztof Kozlowski Cc: linux-omap@vger.kernel.org --- drivers/memory/omap-gpmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 53f1888cc84f..d5bf3243fe78 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -1455,10 +1455,8 @@ static int gpmc_setup_irq(struct gpmc_device *gpmc) gpmc->irq_chip.irq_unmask =3D gpmc_irq_unmask; gpmc->irq_chip.irq_set_type =3D gpmc_irq_set_type; =20 - gpmc_irq_domain =3D irq_domain_add_linear(gpmc->dev->of_node, - gpmc->nirqs, - &gpmc_irq_domain_ops, - gpmc); + gpmc_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(gpmc->dev->= of_node), + gpmc->nirqs, &gpmc_irq_domain_ops, gpmc); if (!gpmc_irq_domain) { dev_err(gpmc->dev, "IRQ domain add failed\n"); return -ENODEV; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1A936254AF5 for ; Wed, 19 Mar 2025 09:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376724; cv=none; b=aFHXQpk1ux6kVunnC1posxYIbq6vBEKL3w2zCFFML0nbblvDrML2Av9/wpjpE1PyCt2BddwZh8H1gtbSRvvBphq0SyIR5bwI3BQWLlG9Y07/xKIcg2o0Y/+rhN98Ref/ASlvm34mE9B7QDdmyBux2jBtSJgl2Qmz7FL29RyVUX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376724; c=relaxed/simple; bh=5VJv2nEcmxeqP/NoN8miVJO7VItSA++SbGsff9FKovQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i/jQfCAeIdk98Xbhd6B9nWaooiFNktQhWNdji3bycrNDzTvjaPjFiOkw8NVkvVyqa9TXX5SkvDHbs56SS4yJaxw+g0DVPDy9SATBTUpDx4UX54Ef0lhRlZJCFmkaXVU0VrEaRpP2KwyDFzBLFkpQ1u4ItmroBXLNwl/VXpqOgg0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G0kwKlwh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G0kwKlwh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA7C6C4CEEF; Wed, 19 Mar 2025 09:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376723; bh=5VJv2nEcmxeqP/NoN8miVJO7VItSA++SbGsff9FKovQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G0kwKlwhAFiYp+QIzDqYKAV+zNoCzdZRKivcZr7gpckEbP6cByeoef0vgPDlrUQis EzfUi6sqO1U557RqfZ8TFTKjaCTrauvYTG5ChGdQABMYX6Wjirg/ZLpbk80vtZATTJ t5CvRSKhxenzo9OKjh6mQ8tRQFRzhblNYOShijdaYmtjNaiw1xhf872Vig7kcrhSdM tJyVPJD5A4d8I3nzZScUeUwBKaKWc1qIUB1lDmYf4Feoi3jMBcMYO0iuxrTngOz+T1 utxCDQ24aRDdd6snfgMdOFF6gvZiFhrWzKO2Eljs0o3YVqCJLp2dWmQhtbxGZA2Khw U+P6fUOMGus+g== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Lee Jones , Linus Walleij , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno , Maxime Coquelin , Alexandre Torgue , Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren Subject: [PATCH v2 24/57] irqdomain: mfd: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:17 +0100 Message-ID: <20250319092951.37667-25-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Lee Jones Cc: Linus Walleij Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Aaro Koskinen Cc: Andreas Kemnade Cc: Kevin Hilman Cc: Roger Quadros Cc: Tony Lindgren --- drivers/mfd/88pm860x-core.c | 4 ++-- drivers/mfd/ab8500-core.c | 6 +++--- drivers/mfd/arizona-irq.c | 3 +-- drivers/mfd/db8500-prcmu.c | 6 +++--- drivers/mfd/fsl-imx25-tsadc.c | 5 ++--- drivers/mfd/lp8788-irq.c | 2 +- drivers/mfd/max8925-core.c | 4 ++-- drivers/mfd/max8997-irq.c | 4 ++-- drivers/mfd/max8998-irq.c | 2 +- drivers/mfd/mt6358-irq.c | 6 +++--- drivers/mfd/mt6397-irq.c | 6 ++---- drivers/mfd/qcom-pm8xxx.c | 6 ++---- drivers/mfd/stmfx.c | 2 +- drivers/mfd/stmpe.c | 4 ++-- drivers/mfd/tc3589x.c | 6 +++--- drivers/mfd/tps65217.c | 2 +- drivers/mfd/tps6586x.c | 2 +- drivers/mfd/twl4030-irq.c | 4 ++-- drivers/mfd/twl6030-irq.c | 5 ++--- drivers/mfd/wm831x-irq.c | 15 ++++++--------- drivers/mfd/wm8994-irq.c | 4 +--- 21 files changed, 43 insertions(+), 55 deletions(-) diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 8e68b64bd7f8..488e346047c1 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -624,8 +624,8 @@ static int device_irq_init(struct pm860x_chip *chip, ret =3D -EBUSY; goto out; } - irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0, - &pm860x_irq_domain_ops, chip); + irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip->irq_base,= 0, + &pm860x_irq_domain_ops, chip); chip->core_irq =3D i2c->irq; if (!chip->core_irq) goto out; diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 15c95828b09a..049abcbd71ce 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -580,9 +580,9 @@ static int ab8500_irq_init(struct ab8500 *ab8500, struc= t device_node *np) num_irqs =3D AB8500_NR_IRQS; =20 /* If ->irq_base is zero this will give a linear mapping */ - ab8500->domain =3D irq_domain_add_simple(ab8500->dev->of_node, - num_irqs, 0, - &ab8500_irq_ops, ab8500); + ab8500->domain =3D irq_domain_create_simple(of_fwnode_handle(ab8500->dev-= >of_node), + num_irqs, 0, + &ab8500_irq_ops, ab8500); =20 if (!ab8500->domain) { dev_err(ab8500->dev, "Failed to create irqdomain\n"); diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c index d919ae9691e2..ac2139597fab 100644 --- a/drivers/mfd/arizona-irq.c +++ b/drivers/mfd/arizona-irq.c @@ -312,8 +312,7 @@ int arizona_irq_init(struct arizona *arizona) flags |=3D arizona->pdata.irq_flags; =20 /* Allocate a virtual IRQ domain to distribute to the regmap domains */ - arizona->virq =3D irq_domain_add_linear(NULL, 2, &arizona_domain_ops, - arizona); + arizona->virq =3D irq_domain_create_linear(NULL, 2, &arizona_domain_ops, = arizona); if (!arizona->virq) { dev_err(arizona->dev, "Failed to add core IRQ domain\n"); ret =3D -EINVAL; diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 5b3e355e78f6..21e68a382b11 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2607,9 +2607,9 @@ static int db8500_irq_init(struct device_node *np) { int i; =20 - db8500_irq_domain =3D irq_domain_add_simple( - np, NUM_PRCMU_WAKEUPS, 0, - &db8500_irq_ops, NULL); + db8500_irq_domain =3D irq_domain_create_simple(of_fwnode_handle(np), + NUM_PRCMU_WAKEUPS, 0, + &db8500_irq_ops, NULL); =20 if (!db8500_irq_domain) { pr_err("Failed to create irqdomain\n"); diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c index 6fe388da6fb6..d47152467951 100644 --- a/drivers/mfd/fsl-imx25-tsadc.c +++ b/drivers/mfd/fsl-imx25-tsadc.c @@ -65,15 +65,14 @@ static int mx25_tsadc_setup_irq(struct platform_device = *pdev, struct mx25_tsadc *tsadc) { struct device *dev =3D &pdev->dev; - struct device_node *np =3D dev->of_node; int irq; =20 irq =3D platform_get_irq(pdev, 0); if (irq < 0) return irq; =20 - tsadc->domain =3D irq_domain_add_simple(np, 2, 0, &mx25_tsadc_domain_ops, - tsadc); + tsadc->domain =3D irq_domain_create_simple(of_fwnode_handle(dev->of_node)= , 2, 0, + &mx25_tsadc_domain_ops, tsadc); if (!tsadc->domain) { dev_err(dev, "Failed to add irq domain\n"); return -ENOMEM; diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c index 39006297f3d2..ea0fdf7a4b6e 100644 --- a/drivers/mfd/lp8788-irq.c +++ b/drivers/mfd/lp8788-irq.c @@ -161,7 +161,7 @@ int lp8788_irq_init(struct lp8788 *lp, int irq) return -ENOMEM; =20 irqd->lp =3D lp; - irqd->domain =3D irq_domain_add_linear(lp->dev->of_node, LP8788_INT_MAX, + irqd->domain =3D irq_domain_create_linear(of_fwnode_handle(lp->dev->of_no= de), LP8788_INT_MAX, &lp8788_domain_ops, irqd); if (!irqd->domain) { dev_err(lp->dev, "failed to add irq domain err\n"); diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 105d79b91493..78b16c67a5fc 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c @@ -682,8 +682,8 @@ static int max8925_irq_init(struct max8925_chip *chip, = int irq, return -EBUSY; } =20 - irq_domain_add_legacy(node, MAX8925_NR_IRQS, chip->irq_base, 0, - &max8925_irq_domain_ops, chip); + irq_domain_create_legacy(of_fwnode_handle(node), MAX8925_NR_IRQS, chip->i= rq_base, 0, + &max8925_irq_domain_ops, chip); =20 /* request irq handler for pmic main irq*/ chip->core_irq =3D irq; diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c index 92e348df03d1..cc87571c9af5 100644 --- a/drivers/mfd/max8997-irq.c +++ b/drivers/mfd/max8997-irq.c @@ -327,8 +327,8 @@ int max8997_irq_init(struct max8997_dev *max8997) true : false; } =20 - domain =3D irq_domain_add_linear(NULL, MAX8997_IRQ_NR, - &max8997_irq_domain_ops, max8997); + domain =3D irq_domain_create_linear(NULL, MAX8997_IRQ_NR, + &max8997_irq_domain_ops, max8997); if (!domain) { dev_err(max8997->dev, "could not create irq domain\n"); return -ENODEV; diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c index 83b6f510bc05..b0773fa6e07f 100644 --- a/drivers/mfd/max8998-irq.c +++ b/drivers/mfd/max8998-irq.c @@ -230,7 +230,7 @@ int max8998_irq_init(struct max8998_dev *max8998) max8998_write_reg(max8998->i2c, MAX8998_REG_STATUSM1, 0xff); max8998_write_reg(max8998->i2c, MAX8998_REG_STATUSM2, 0xff); =20 - domain =3D irq_domain_add_simple(NULL, MAX8998_IRQ_NR, + domain =3D irq_domain_create_simple(NULL, MAX8998_IRQ_NR, max8998->irq_base, &max8998_irq_domain_ops, max8998); if (!domain) { dev_err(max8998->dev, "could not create irq domain\n"); diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c index 49830b526ee8..9f0bcc3ad7a1 100644 --- a/drivers/mfd/mt6358-irq.c +++ b/drivers/mfd/mt6358-irq.c @@ -272,9 +272,9 @@ int mt6358_irq_init(struct mt6397_chip *chip) irqd->pmic_ints[i].en_reg_shift * j, 0); } =20 - chip->irq_domain =3D irq_domain_add_linear(chip->dev->of_node, - irqd->num_pmic_irqs, - &mt6358_irq_domain_ops, chip); + chip->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(chip->dev-= >of_node), + irqd->num_pmic_irqs, + &mt6358_irq_domain_ops, chip); if (!chip->irq_domain) { dev_err(chip->dev, "Could not create IRQ domain\n"); return -ENODEV; diff --git a/drivers/mfd/mt6397-irq.c b/drivers/mfd/mt6397-irq.c index 1310665200ed..badc614b4345 100644 --- a/drivers/mfd/mt6397-irq.c +++ b/drivers/mfd/mt6397-irq.c @@ -216,10 +216,8 @@ int mt6397_irq_init(struct mt6397_chip *chip) regmap_write(chip->regmap, chip->int_con[2], 0x0); =20 chip->pm_nb.notifier_call =3D mt6397_irq_pm_notifier; - chip->irq_domain =3D irq_domain_add_linear(chip->dev->of_node, - MT6397_IRQ_NR, - &mt6397_irq_domain_ops, - chip); + chip->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(chip->dev-= >of_node), + MT6397_IRQ_NR, &mt6397_irq_domain_ops, chip); if (!chip->irq_domain) { dev_err(chip->dev, "could not create irq domain\n"); return -ENOMEM; diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c index f9ebdf5845b8..c96ea6fbede8 100644 --- a/drivers/mfd/qcom-pm8xxx.c +++ b/drivers/mfd/qcom-pm8xxx.c @@ -559,10 +559,8 @@ static int pm8xxx_probe(struct platform_device *pdev) chip->pm_irq_data =3D data; spin_lock_init(&chip->pm_irq_lock); =20 - chip->irqdomain =3D irq_domain_add_linear(pdev->dev.of_node, - data->num_irqs, - &pm8xxx_irq_domain_ops, - chip); + chip->irqdomain =3D irq_domain_create_linear(of_fwnode_handle(pdev->dev.o= f_node), + data->num_irqs, &pm8xxx_irq_domain_ops, chip); if (!chip->irqdomain) return -ENODEV; =20 diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c index f391c2ccaa72..823b1d29389e 100644 --- a/drivers/mfd/stmfx.c +++ b/drivers/mfd/stmfx.c @@ -269,7 +269,7 @@ static int stmfx_irq_init(struct i2c_client *client) u32 irqoutpin =3D 0, irqtrigger; int ret; =20 - stmfx->irq_domain =3D irq_domain_add_simple(stmfx->dev->of_node, + stmfx->irq_domain =3D irq_domain_create_simple(of_fwnode_handle(stmfx->de= v->of_node), STMFX_REG_IRQ_SRC_MAX, 0, &stmfx_irq_ops, stmfx); if (!stmfx->irq_domain) { diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 9c3cf58457a7..819d19dc9b4a 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1219,8 +1219,8 @@ static int stmpe_irq_init(struct stmpe *stmpe, struct= device_node *np) int base =3D 0; int num_irqs =3D stmpe->variant->num_irqs; =20 - stmpe->domain =3D irq_domain_add_simple(np, num_irqs, base, - &stmpe_irq_ops, stmpe); + stmpe->domain =3D irq_domain_create_simple(of_fwnode_handle(np), num_irqs, + base, &stmpe_irq_ops, stmpe); if (!stmpe->domain) { dev_err(stmpe->dev, "Failed to create irqdomain\n"); return -ENOSYS; diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index ef953ee73145..2d4eb771e230 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -234,9 +234,9 @@ static const struct irq_domain_ops tc3589x_irq_ops =3D { =20 static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *n= p) { - tc3589x->domain =3D irq_domain_add_simple( - np, TC3589x_NR_INTERNAL_IRQS, 0, - &tc3589x_irq_ops, tc3589x); + tc3589x->domain =3D irq_domain_create_simple(of_fwnode_handle(np), + TC3589x_NR_INTERNAL_IRQS, 0, + &tc3589x_irq_ops, tc3589x); =20 if (!tc3589x->domain) { dev_err(tc3589x->dev, "Failed to create irqdomain\n"); diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 029ecc32f078..4e9669d327b4 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -158,7 +158,7 @@ static int tps65217_irq_init(struct tps65217 *tps, int = irq) tps65217_set_bits(tps, TPS65217_REG_INT, TPS65217_INT_MASK, TPS65217_INT_MASK, TPS65217_PROTECT_NONE); =20 - tps->irq_domain =3D irq_domain_add_linear(tps->dev->of_node, + tps->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(tps->dev->o= f_node), TPS65217_NUM_IRQ, &tps65217_irq_domain_ops, tps); if (!tps->irq_domain) { dev_err(tps->dev, "Could not create IRQ domain\n"); diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 82714899efb2..853c48286071 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c @@ -363,7 +363,7 @@ static int tps6586x_irq_init(struct tps6586x *tps6586x,= int irq, new_irq_base =3D 0; } =20 - tps6586x->irq_domain =3D irq_domain_add_simple(tps6586x->dev->of_node, + tps6586x->irq_domain =3D irq_domain_create_simple(of_fwnode_handle(tps658= 6x->dev->of_node), irq_num, new_irq_base, &tps6586x_domain_ops, tps6586x); if (!tps6586x->irq_domain) { diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 87496c1cb8bc..232c2bfe8c18 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -691,8 +691,8 @@ int twl4030_init_irq(struct device *dev, int irq_num) return irq_base; } =20 - irq_domain_add_legacy(node, nr_irqs, irq_base, 0, - &irq_domain_simple_ops, NULL); + irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, irq_base, 0, + &irq_domain_simple_ops, NULL); =20 irq_end =3D irq_base + TWL4030_CORE_NR_IRQS; =20 diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index 3c03681c124c..00b14cef1dfb 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -364,7 +364,6 @@ static const struct of_device_id twl6030_of_match[] __m= aybe_unused =3D { =20 int twl6030_init_irq(struct device *dev, int irq_num) { - struct device_node *node =3D dev->of_node; int nr_irqs; int status; u8 mask[3]; @@ -412,8 +411,8 @@ int twl6030_init_irq(struct device *dev, int irq_num) twl6030_irq->irq_mapping_tbl =3D of_id->data; =20 twl6030_irq->irq_domain =3D - irq_domain_add_linear(node, nr_irqs, - &twl6030_irq_domain_ops, twl6030_irq); + irq_domain_create_linear(of_fwnode_handle(dev->of_node), nr_irqs, + &twl6030_irq_domain_ops, twl6030_irq); if (!twl6030_irq->irq_domain) { dev_err(dev, "Can't add irq_domain\n"); return -ENOMEM; diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index f1f58e3149ae..b3883fa5dd9f 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c @@ -587,16 +587,13 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq) } =20 if (irq_base) - domain =3D irq_domain_add_legacy(wm831x->dev->of_node, - ARRAY_SIZE(wm831x_irqs), - irq_base, 0, - &wm831x_irq_domain_ops, - wm831x); + domain =3D irq_domain_create_legacy(of_fwnode_handle(wm831x->dev->of_nod= e), + ARRAY_SIZE(wm831x_irqs), irq_base, 0, + &wm831x_irq_domain_ops, wm831x); else - domain =3D irq_domain_add_linear(wm831x->dev->of_node, - ARRAY_SIZE(wm831x_irqs), - &wm831x_irq_domain_ops, - wm831x); + domain =3D irq_domain_create_linear(of_fwnode_handle(wm831x->dev->of_nod= e), + ARRAY_SIZE(wm831x_irqs), &wm831x_irq_domain_ops, + wm831x); =20 if (!domain) { dev_warn(wm831x->dev, "Failed to allocate IRQ domain\n"); diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c index 651a028bc519..1475b1ac6983 100644 --- a/drivers/mfd/wm8994-irq.c +++ b/drivers/mfd/wm8994-irq.c @@ -213,9 +213,7 @@ int wm8994_irq_init(struct wm8994 *wm8994) return ret; } =20 - wm8994->edge_irq =3D irq_domain_add_linear(NULL, 1, - &wm8994_edge_irq_ops, - wm8994); + wm8994->edge_irq =3D irq_domain_create_linear(NULL, 1, &wm8994_edge_irq_= ops, wm8994); =20 ret =3D regmap_add_irq_chip(wm8994->regmap, irq_create_mapping(wm8994->edge_irq, --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E7D142528E0; Wed, 19 Mar 2025 09:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376726; cv=none; b=Z2R9HXhRd7jT+u2dnwaS2PHKB7cU2F6cKluhAM5wPfuPPZBCbfmOxYpE9VVuI+N4nURYkabwkpD3i2sJpcimmh02iHOvbqGnIrA6h0GtapI2ah0j2aAbdyDBKGClc7YT4wnr/GI4VLJlCK8yMCMyRRVojQhvbqWRYxNsK5HPxpA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376726; c=relaxed/simple; bh=7ZlX+S9p5Ba3lNfaTo9/MPtYEzDOa+8LY3UeZVGkFaQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eSTceP8RgpEE2ynVjIIXbrNoWJ706J14kpAbbCIoghxL3wX9xO1eB4c3KiXrkqFFmkn629qzZoHcEK6a7rkKIKh/exZrk0CqLLlfCwBR4M2Fb9X9YNXd4oFU/O3n5UZBGAlYtzQH5D0I/glKSatwGBGdTWocjk6eSX0HO5MSH1M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H9m3i3ep; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H9m3i3ep" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08CCBC4CEF0; Wed, 19 Mar 2025 09:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376725; bh=7ZlX+S9p5Ba3lNfaTo9/MPtYEzDOa+8LY3UeZVGkFaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H9m3i3ep0C5U55YhMHLwecBq+Q6TkF6oiMrv3Bu767tDJMRH90LkBbeiR0tKF1nzh xwcQHAeBQCXDhAzTqdjg28qQRCbYAIA4QItVveUTHf94RMufckCVLXOgVu6f74AER/ DSATwRiKBRzjZ48xuC/xgl7iu+QJ0Md/YkSCIDDI37lfyJC6HE/Bj8zg6zYkCxdtNX 17JU0lCjyx3aYSt/IwLbYvNiIiRfu8eJ38MLas/yuJDCBWfCinmVcJ0Fz+TmWaF1fz IvzykEOmZ/v/l7sFyUua5syksDrbcr5XgRso+Lpg/2RBcygMbJrsx3OkdcoEZxBOBk LfrEG3+CSOEbQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Thomas Bogendoerfer , John Crispin , Sergio Paracuellos , linux-mips@vger.kernel.org Subject: [PATCH v2 25/57] irqdomain: mips: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:18 +0100 Message-ID: <20250319092951.37667-26-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Thomas Bogendoerfer Cc: John Crispin Cc: Sergio Paracuellos Cc: linux-mips@vger.kernel.org --- arch/mips/ath25/ar2315.c | 4 ++-- arch/mips/ath25/ar5312.c | 4 ++-- arch/mips/cavium-octeon/octeon-irq.c | 25 +++++++++++++------------ arch/mips/lantiq/irq.c | 2 +- arch/mips/pci/pci-ar2315.c | 4 ++-- arch/mips/pci/pci-rt3883.c | 7 ++++--- arch/mips/ralink/irq.c | 2 +- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/arch/mips/ath25/ar2315.c b/arch/mips/ath25/ar2315.c index 8ccf167c167e..e8c38aaf46a2 100644 --- a/arch/mips/ath25/ar2315.c +++ b/arch/mips/ath25/ar2315.c @@ -149,8 +149,8 @@ void __init ar2315_arch_init_irq(void) =20 ath25_irq_dispatch =3D ar2315_irq_dispatch; =20 - domain =3D irq_domain_add_linear(NULL, AR2315_MISC_IRQ_COUNT, - &ar2315_misc_irq_domain_ops, NULL); + domain =3D irq_domain_create_linear(NULL, AR2315_MISC_IRQ_COUNT, + &ar2315_misc_irq_domain_ops, NULL); if (!domain) panic("Failed to add IRQ domain"); =20 diff --git a/arch/mips/ath25/ar5312.c b/arch/mips/ath25/ar5312.c index cfa103518113..4a1d874be766 100644 --- a/arch/mips/ath25/ar5312.c +++ b/arch/mips/ath25/ar5312.c @@ -143,8 +143,8 @@ void __init ar5312_arch_init_irq(void) =20 ath25_irq_dispatch =3D ar5312_irq_dispatch; =20 - domain =3D irq_domain_add_linear(NULL, AR5312_MISC_IRQ_COUNT, - &ar5312_misc_irq_domain_ops, NULL); + domain =3D irq_domain_create_linear(NULL, AR5312_MISC_IRQ_COUNT, + &ar5312_misc_irq_domain_ops, NULL); if (!domain) panic("Failed to add IRQ domain"); =20 diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon= /octeon-irq.c index e6b4d9c0c169..5c3de175ef5b 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -1503,8 +1503,8 @@ static int __init octeon_irq_init_ciu( /* Mips internal */ octeon_irq_init_core(); =20 - ciu_domain =3D irq_domain_add_tree( - ciu_node, &octeon_irq_domain_ciu_ops, dd); + ciu_domain =3D irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon= _irq_domain_ciu_ops, + dd); irq_set_default_domain(ciu_domain); =20 /* CIU_0 */ @@ -1637,8 +1637,8 @@ static int __init octeon_irq_init_gpio( if (gpiod) { /* gpio domain host_data is the base hwirq number. */ gpiod->base_hwirq =3D base_hwirq; - irq_domain_add_linear( - gpio_node, 16, &octeon_irq_domain_gpio_ops, gpiod); + irq_domain_create_linear(of_fwnode_handle(gpio_node), 16, + &octeon_irq_domain_gpio_ops, gpiod); } else { pr_warn("Cannot allocate memory for GPIO irq_domain.\n"); return -ENOMEM; @@ -2074,8 +2074,8 @@ static int __init octeon_irq_init_ciu2( /* Mips internal */ octeon_irq_init_core(); =20 - ciu_domain =3D irq_domain_add_tree( - ciu_node, &octeon_irq_domain_ciu2_ops, NULL); + ciu_domain =3D irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon= _irq_domain_ciu2_ops, + NULL); irq_set_default_domain(ciu_domain); =20 /* CUI2 */ @@ -2331,11 +2331,12 @@ static int __init octeon_irq_init_cib(struct device= _node *ciu_node, } host_data->max_bits =3D val; =20 - cib_domain =3D irq_domain_add_linear(ciu_node, host_data->max_bits, - &octeon_irq_domain_cib_ops, - host_data); + cib_domain =3D irq_domain_create_linear(of_fwnode_handle(ciu_node), + host_data->max_bits, + &octeon_irq_domain_cib_ops, + host_data); if (!cib_domain) { - pr_err("ERROR: Couldn't irq_domain_add_linear()\n"); + pr_err("ERROR: Couldn't irq_domain_create_linear()\n"); return -ENOMEM; } =20 @@ -2918,8 +2919,8 @@ static int __init octeon_irq_init_ciu3(struct device_= node *ciu_node, * Initialize all domains to use the default domain. Specific major * blocks will overwrite the default domain as needed. */ - domain =3D irq_domain_add_tree(ciu_node, &octeon_dflt_domain_ciu3_ops, - ciu3_info); + domain =3D irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_dfl= t_domain_ciu3_ops, + ciu3_info); for (i =3D 0; i < MAX_CIU3_DOMAINS; i++) ciu3_info->domain[i] =3D domain; =20 diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index 8f208007b8e8..a112573b6e37 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c @@ -377,7 +377,7 @@ int __init icu_of_init(struct device_node *node, struct= device_node *parent) for (i =3D 0; i < MAX_IM; i++) irq_set_chained_handler(i + 2, ltq_hw_irq_handler); =20 - ltq_domain =3D irq_domain_add_linear(node, + ltq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), (MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE, &irq_domain_ops, 0); =20 diff --git a/arch/mips/pci/pci-ar2315.c b/arch/mips/pci/pci-ar2315.c index a925842ee125..17fa97ec6ffb 100644 --- a/arch/mips/pci/pci-ar2315.c +++ b/arch/mips/pci/pci-ar2315.c @@ -469,8 +469,8 @@ static int ar2315_pci_probe(struct platform_device *pde= v) if (err) return err; =20 - apc->domain =3D irq_domain_add_linear(NULL, AR2315_PCI_IRQ_COUNT, - &ar2315_pci_irq_domain_ops, apc); + apc->domain =3D irq_domain_create_linear(NULL, AR2315_PCI_IRQ_COUNT, + &ar2315_pci_irq_domain_ops, apc); if (!apc->domain) { dev_err(dev, "failed to add IRQ domain\n"); return -ENOMEM; diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index 4ac68a534e4f..14454ece485d 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c @@ -208,9 +208,10 @@ static int rt3883_pci_irq_init(struct device *dev, rt3883_pci_w32(rpc, 0, RT3883_PCI_REG_PCIENA); =20 rpc->irq_domain =3D - irq_domain_add_linear(rpc->intc_of_node, RT3883_PCI_IRQ_COUNT, - &rt3883_pci_irq_domain_ops, - rpc); + irq_domain_create_linear(of_fwnode_handle(rpc->intc_of_node), + RT3883_PCI_IRQ_COUNT, + &rt3883_pci_irq_domain_ops, + rpc); if (!rpc->irq_domain) { dev_err(dev, "unable to add IRQ domain\n"); return -ENODEV; diff --git a/arch/mips/ralink/irq.c b/arch/mips/ralink/irq.c index 46aef0a1b22a..af5bbbea949b 100644 --- a/arch/mips/ralink/irq.c +++ b/arch/mips/ralink/irq.c @@ -176,7 +176,7 @@ static int __init intc_of_init(struct device_node *node, /* route all INTC interrupts to MIPS HW0 interrupt */ rt_intc_w32(0, INTC_REG_TYPE); =20 - domain =3D irq_domain_add_legacy(node, RALINK_INTC_IRQ_COUNT, + domain =3D irq_domain_create_legacy(of_fwnode_handle(node), RALINK_INTC_I= RQ_COUNT, RALINK_INTC_IRQ_BASE, 0, &irq_domain_ops, NULL); if (!domain) panic("Failed to add irqdomain"); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2BCD4259C83 for ; Wed, 19 Mar 2025 09:32:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376728; cv=none; b=bm8zZQDEirQukJqxlHMqD/7DLgfT+1qBRiFHRIBz+tJz5zPqcExcRfAZVF3uZfBIVkOS9HhVCvVCAx1elg7fHeTIMXzZ5+/UWCGxWDI/nueyMFbEc2WoYVBWCpEatnPdL8baq5ifBHyKGVDZUc60a/IkpSP2vU0NlgJDBsRbGV4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376728; c=relaxed/simple; bh=58OahlrnwSdGfcXKgZZBiLlBcI4gqu49x0cWY1ElmVg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pBSj0/vlk1VYJoUzXMsi+SIlligiOpka/zKMXHfP9AjJs5Qdamfm5EKdbf9k97jlaAftU7/KULDVi/uE7LhpUDPl5w03OkYssqhkV2AJnnDkDLsJm2IEkB/Gbt+aSkk0aPCNj50Cp6BpSkYz3p20AspdRcJSPAt5kUWnU8EGywI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m5WiM2IE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m5WiM2IE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4612DC4CEEE; Wed, 19 Mar 2025 09:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376727; bh=58OahlrnwSdGfcXKgZZBiLlBcI4gqu49x0cWY1ElmVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m5WiM2IEEaR/9PDRj+oA6ut255iMC1BwBPAK7TUPhoQYmo13LGpVCr3p/EmfMdVO1 Xl/+4iG/D+Z3S8aVivLH3KY4ml9MimZsz6JdCrTGslixbKkMGpB/Ad+C09dMBNFl/F jxE1RyV6fdmm9WUCORjk1Nu+74FoFdHH0RSb8oLZB/7/aAccI2cplVAw/iH5lWXyb4 Mm58xzYk5DxyNRrDxuaI1LcJXjjm1iPuBuHy1NBzgKDUmGKAS6+JH3sQ3o8hYP+B+X XKmn8DZfrK/QC6eotSTYl/ceT5/jDQoqS9rVYW+zBWB+SWCHW5e61J1jLnH+6Y26Ds iIHpKGtj7uGeA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH v2 26/57] irqdomain: misc: Switch to irq_domain_create_simple() Date: Wed, 19 Mar 2025 10:29:19 +0100 Message-ID: <20250319092951.37667-27-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_simple() is going away as being obsolete now. Switch to the preferred irq_domain_create_simple(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/misc/hi6421v600-irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c index 69ee4f39af2a..187c5bc91e31 100644 --- a/drivers/misc/hi6421v600-irq.c +++ b/drivers/misc/hi6421v600-irq.c @@ -254,8 +254,9 @@ static int hi6421v600_irq_probe(struct platform_device = *pdev) if (!priv->irqs) return -ENOMEM; =20 - priv->domain =3D irq_domain_add_simple(np, PMIC_IRQ_LIST_MAX, 0, - &hi6421v600_domain_ops, priv); + priv->domain =3D irq_domain_create_simple(of_fwnode_handle(np), + PMIC_IRQ_LIST_MAX, 0, + &hi6421v600_domain_ops, priv); if (!priv->domain) { dev_err(dev, "Failed to create IRQ domain\n"); return -ENODEV; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 75FF8254AFC; Wed, 19 Mar 2025 09:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376733; cv=none; b=qYChm15u1r9VqRVJVz5Xy10Z9A6pd0S4l4na1x31IR0alCtx0cQ5UsAIyVspdA3oQMAA/wlGNtwcm8G0iYiTqC70uJqWThFTUyBx2YX8gcKFcJx45IjTlHuKWrjpqHwSUPuG2LOE76opQ8EtFnLIHp3Untj5I0djcyXkcWOLwec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376733; c=relaxed/simple; bh=IsSr0wX0D/RHalSLc13nA67slNDqv2KI4EP4GC8jN1o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Wmg1wq/YNw1jrS5dQ7s0oEtRHv+cB+kcit9VD8JSKAA0EC63YwX5rPQX/yjwA0vPF3VbM2bIAzV1Pd6qbfh+iibhtqZKKwd94fGaPjbNQp1xoFCYCtljodZdh1T9hosVbmWPfLe1e3mCDqReLWDlPQbWYpoKeDza5YKFRSOwqE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ea6p1KBN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ea6p1KBN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A1F2C4CEF2; Wed, 19 Mar 2025 09:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376733; bh=IsSr0wX0D/RHalSLc13nA67slNDqv2KI4EP4GC8jN1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ea6p1KBNR8PESCP7Nup1708/++FB5ztSkIaPeEET1r7L7lIJvwXfbZkb7HwayAWyi T0+13+UD/YxOW/XIUE5nbXN3sgN6J2XDo01InETzr6VUK1pF6ysJ2UDKYAYlEfXK44 uhAz82JsqfwuTW+p1WII3HEZFTimm+cHzgtqdwCzHYHTYgoqwsS+OdqGiCA6Fk6LIs JzIUfmKPNGVCMXUPW8VM870svvKoKa0FB/3MItg5hzoXxXPVfyAugOjQDfKtb8marP LJZTuOU0rMQ9Dfs7DNZiSaLAIfsXZNymajP/FNhjKXMwUTpr2IXuzK3Iwg3d8WWHGK 9ODvGwO9v9Rog== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Chester A. Unal" , Daniel Golle , DENG Qingfang , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , Jiawen Wu , Mengyuan Lou , Thangaraj Samynathan , Rengarajan Sundararajan , Richard Cochran , netdev@vger.kernel.org Subject: [PATCH v2 27/57] irqdomain: net: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:20 +0100 Message-ID: <20250319092951.37667-28-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Woojung Huh Cc: UNGLinuxDriver@microchip.com Cc: Andrew Lunn Cc: Vladimir Oltean Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Chester A. Unal" Cc: Daniel Golle Cc: DENG Qingfang Cc: Sean Wang Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: Linus Walleij Cc: "Alvin =C5=A0ipraga" Cc: Jiawen Wu Cc: Mengyuan Lou Cc: Thangaraj Samynathan Cc: Rengarajan Sundararajan Cc: Richard Cochran Cc: netdev@vger.kernel.org --- drivers/net/dsa/microchip/ksz_common.c | 5 +++-- drivers/net/dsa/microchip/ksz_ptp.c | 4 ++-- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global2.c | 6 ++++-- drivers/net/dsa/qca/ar9331.c | 4 ++-- drivers/net/dsa/realtek/rtl8365mb.c | 4 ++-- drivers/net/dsa/realtek/rtl8366rb.c | 6 ++---- drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c | 6 ++++-- drivers/net/usb/lan78xx.c | 9 ++++----- 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/micro= chip/ksz_common.c index 89f0796894af..579ee504fed5 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -2697,8 +2697,9 @@ static int ksz_irq_common_setup(struct ksz_device *de= v, struct ksz_irq *kirq) kirq->dev =3D dev; kirq->masked =3D ~0; =20 - kirq->domain =3D irq_domain_add_simple(dev->dev->of_node, kirq->nirqs, 0, - &ksz_irq_domain_ops, kirq); + kirq->domain =3D irq_domain_create_simple(of_fwnode_handle(dev->dev->of_n= ode), + kirq->nirqs, 0, + &ksz_irq_domain_ops, kirq); if (!kirq->domain) return -ENOMEM; =20 diff --git a/drivers/net/dsa/microchip/ksz_ptp.c b/drivers/net/dsa/microchi= p/ksz_ptp.c index 22fb9ef4645c..992101e4bdee 100644 --- a/drivers/net/dsa/microchip/ksz_ptp.c +++ b/drivers/net/dsa/microchip/ksz_ptp.c @@ -1136,8 +1136,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p) =20 init_completion(&port->tstamp_msg_comp); =20 - ptpirq->domain =3D irq_domain_add_linear(dev->dev->of_node, ptpirq->nirqs, - &ksz_ptp_irq_domain_ops, ptpirq); + ptpirq->domain =3D irq_domain_create_linear(of_fwnode_handle(dev->dev->of= _node), + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq); if (!ptpirq->domain) return -ENOMEM; =20 diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/c= hip.c index 5db96ca52505..a39aab7cd606 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -297,7 +297,7 @@ static int mv88e6xxx_g1_irq_setup_common(struct mv88e6x= xx_chip *chip) u16 reg, mask; =20 chip->g1_irq.nirqs =3D chip->info->g1_irqs; - chip->g1_irq.domain =3D irq_domain_add_simple( + chip->g1_irq.domain =3D irq_domain_create_simple( NULL, chip->g1_irq.nirqs, 0, &mv88e6xxx_g1_irq_domain_ops, chip); if (!chip->g1_irq.domain) diff --git a/drivers/net/dsa/mv88e6xxx/global2.c b/drivers/net/dsa/mv88e6xx= x/global2.c index b2b5f6ba438f..aaf97c1e3167 100644 --- a/drivers/net/dsa/mv88e6xxx/global2.c +++ b/drivers/net/dsa/mv88e6xxx/global2.c @@ -1154,8 +1154,10 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *ch= ip) if (err) return err; =20 - chip->g2_irq.domain =3D irq_domain_add_simple( - chip->dev->of_node, 16, 0, &mv88e6xxx_g2_irq_domain_ops, chip); + chip->g2_irq.domain =3D irq_domain_create_simple(of_fwnode_handle(chip->d= ev->of_node), + 16, 0, + &mv88e6xxx_g2_irq_domain_ops, + chip); if (!chip->g2_irq.domain) return -ENOMEM; =20 diff --git a/drivers/net/dsa/qca/ar9331.c b/drivers/net/dsa/qca/ar9331.c index e9f2c67bc15f..79a29676ca6f 100644 --- a/drivers/net/dsa/qca/ar9331.c +++ b/drivers/net/dsa/qca/ar9331.c @@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *pr= iv) return ret; } =20 - priv->irqdomain =3D irq_domain_add_linear(np, 1, &ar9331_sw_irqdomain_ops, - priv); + priv->irqdomain =3D irq_domain_create_linear(of_fwnode_handle(np), 1, + &ar9331_sw_irqdomain_ops, priv); if (!priv->irqdomain) { dev_err(dev, "failed to create IRQ domain\n"); return -EINVAL; diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/= rtl8365mb.c index 7e96355c28bd..964a56ee16cc 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -1719,8 +1719,8 @@ static int rtl8365mb_irq_setup(struct realtek_priv *p= riv) goto out_put_node; } =20 - priv->irqdomain =3D irq_domain_add_linear(intc, priv->num_ports, - &rtl8365mb_irqdomain_ops, priv); + priv->irqdomain =3D irq_domain_create_linear(of_fwnode_handle(intc), priv= ->num_ports, + &rtl8365mb_irqdomain_ops, priv); if (!priv->irqdomain) { dev_err(priv->dev, "failed to add irq domain\n"); ret =3D -ENOMEM; diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/= rtl8366rb.c index f54771cab56d..8bdb52b5fdcb 100644 --- a/drivers/net/dsa/realtek/rtl8366rb.c +++ b/drivers/net/dsa/realtek/rtl8366rb.c @@ -550,10 +550,8 @@ static int rtl8366rb_setup_cascaded_irq(struct realtek= _priv *priv) dev_err(priv->dev, "unable to request irq: %d\n", ret); goto out_put_node; } - priv->irqdomain =3D irq_domain_add_linear(intc, - RTL8366RB_NUM_INTERRUPT, - &rtl8366rb_irqdomain_ops, - priv); + priv->irqdomain =3D irq_domain_create_linear(of_fwnode_handle(intc), RTL8= 366RB_NUM_INTERRUPT, + &rtl8366rb_irqdomain_ops, priv); if (!priv->irqdomain) { dev_err(priv->dev, "failed to create IRQ domain\n"); ret =3D -EINVAL; diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c b/drivers/net/e= thernet/wangxun/txgbe/txgbe_irq.c index 8658a51ee810..f60c8a73ddce 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c @@ -184,8 +184,10 @@ int txgbe_setup_misc_irq(struct txgbe *txgbe) goto skip_sp_irq; =20 txgbe->misc.nirqs =3D 1; - txgbe->misc.domain =3D irq_domain_add_simple(NULL, txgbe->misc.nirqs, 0, - &txgbe_misc_irq_domain_ops, txgbe); + txgbe->misc.domain =3D irq_domain_create_simple(NULL, txgbe->misc.nirqs, + 0, + &txgbe_misc_irq_domain_ops, + txgbe); if (!txgbe->misc.domain) return -ENOMEM; =20 diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 137adf6d5b08..9a5de0098ec0 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -2456,14 +2456,11 @@ static struct irq_chip lan78xx_irqchip =3D { =20 static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) { - struct device_node *of_node; struct irq_domain *irqdomain; unsigned int irqmap =3D 0; u32 buf; int ret =3D 0; =20 - of_node =3D dev->udev->dev.parent->of_node; - mutex_init(&dev->domain_data.irq_lock); =20 ret =3D lan78xx_read_reg(dev, INT_EP_CTL, &buf); @@ -2475,8 +2472,10 @@ static int lan78xx_setup_irq_domain(struct lan78xx_n= et *dev) dev->domain_data.irqchip =3D &lan78xx_irqchip; dev->domain_data.irq_handler =3D handle_simple_irq; =20 - irqdomain =3D irq_domain_add_simple(of_node, MAX_INT_EP, 0, - &chip_domain_ops, &dev->domain_data); + irqdomain =3D irq_domain_create_simple(of_fwnode_handle(dev->udev->dev.pa= rent->of_node), + MAX_INT_EP, 0, + &chip_domain_ops, + &dev->domain_data); if (irqdomain) { /* create mapping for PHY interrupt */ irqmap =3D irq_create_mapping(irqdomain, INT_EP_PHY); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 209A725A32A for ; Wed, 19 Mar 2025 09:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376735; cv=none; b=PpgoJbFm6t4WgfPmNT7bJ+DMG3cMqdoU6RDavoSO6tCXQeZoMxRpjipAdENcPjcKKyTQkWOr6FqzMFznE5nPv1YVh0AusP9qybFM3GoFGEbkK6Y1v2KDmYRMKzQ2ReUWJo0rAZsIZvBYELKdo4Fj170QRHm66xkrdWLweDGI6oc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376735; c=relaxed/simple; bh=f0dWSgJvlbqpksXdJKfOe7BCnUM3QhjW8ZzPV9bgfZE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IuO6FgIJoLPkJF5/Pb8AwdmWIG/2PYGVkFLhoyyQwmQTmDwoA1nq0qCkNe9+AE/f4sBguKTF4/XDwkQF8OWCnMtfHB82MyCNsJ9qQZghsnL3eAxtywqrQdOwuX/W4OJpVTQP3+EptVZcEYOdpVRL0EcBTDp2CNcmQprL68ywHgU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HwjUA4ME; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HwjUA4ME" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB3BAC4CEF0; Wed, 19 Mar 2025 09:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376735; bh=f0dWSgJvlbqpksXdJKfOe7BCnUM3QhjW8ZzPV9bgfZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HwjUA4MEr63Hg3LfwHhw5F9O2Ctvtsu5cI7SYVe/hM2z10pwbW5qUU2XoqPY8IGtt XHdHU9eVbZOJIuu9KZyrj5kL9SR9LeBlcFAVeunnfB6udNOuy/rCpkssVlsGUxvBnm FUIeOIBKNOsvWlOJFgTdLsTQoxrqYGuMmYSKbHCmu5apJ58wwLSULBL2gNag6gmbw9 UfiEjUCLK/Q3nsZPUW/pxAWlhDoCZ89+8gBJNOaNR9SokBdetIR0xr/yf58qoLV7Vp DLBj0DUkMIXIFifoDU4uw1VU7B6RiI5ZiSXjAWi0XAteYDKaHMjjWIinXQgod8RmL6 to7sbzgdT/bnw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Dinh Nguyen Subject: [PATCH v2 28/57] irqdomain: nios2: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:21 +0100 Message-ID: <20250319092951.37667-29-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Dinh Nguyen --- arch/nios2/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/nios2/kernel/irq.c b/arch/nios2/kernel/irq.c index 8fa280660051..73568d8e21e0 100644 --- a/arch/nios2/kernel/irq.c +++ b/arch/nios2/kernel/irq.c @@ -69,7 +69,8 @@ void __init init_IRQ(void) =20 BUG_ON(!node); =20 - domain =3D irq_domain_add_linear(node, NIOS2_CPU_NR_IRQS, &irq_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(node), + NIOS2_CPU_NR_IRQS, &irq_ops, NULL); BUG_ON(!domain); =20 irq_set_default_domain(domain); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5E0DF253B6E; Wed, 19 Mar 2025 09:32:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376742; cv=none; b=s5eDPeB3VKmu4nvmvzbf0Q5rnHhvcdFcIh6qi8ojoBadUlrEEWXEhXpK5bTOAER+lmNQX6p361rDVPZ7BC5UzgPRzsRE8XpPAVcZ2h+nSJA4rKrs/GsqjmVJPh6zSJBCmGgqb0AjJIewMwfIX6qrc46dQTsdaNa3SL0mdRV1Va0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376742; c=relaxed/simple; bh=WmolbYADk/HgtcX4FFtbA+sZUbnRdoFjblnJqTCUNwc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=opVyA5EO2BEtkVLXhJ1hywRd6FYJirWPJVMShBoTKJHO/yyM4ZSne5ONPxb3mBZuMJHLAncvQ8iMpvKxOLL74DHhwiRIBnN2d059ewayPohg09YE4SQk5ubCZrh1CWCac/yYQjuIERnRY9QgU0z+jjHu8TCpmX60ZzUjB6AtABM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MAm11FZz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MAm11FZz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 723C7C4CEE9; Wed, 19 Mar 2025 09:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376741; bh=WmolbYADk/HgtcX4FFtbA+sZUbnRdoFjblnJqTCUNwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MAm11FZz7MlEOZr364jjvY6giNGkq7ov/vCfF2HUB8KdSmXFnfO6qnf7RRcae/QQC OstaI6YFA6WM+/SL7z77M6BtbpqqCPNw0JyiyoZmITT7s92B1WY4eY2JdsYPTZIx6+ 7DQfZAzLA/b1q21BPpCxJvMM9um8qmBKdEBJbtj1c/IV1FOzj5qJpvriqjW+T5cHwS BmxA6iwfMD14eVt+xjYG1fCex6qiazLNHwhY4SaDtA2RqQtQTqQ5SmO0sBf047AmJT AwX5GwYCikNHekntK+5aWDcvCPw0vb6XuSu+HxpM6fZZq8GiYhLIuYpaYpHAe5bgO4 +LfsxdU1EHiOw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Heiko Stuebner , Kunihiko Hayashi , Masami Hiramatsu , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Toan Le , Joyce Ooi , Jim Quinlan , Nicolas Saenz Julienne , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Ryder Lee , Jianjun Wang , Shawn Lin , Bharat Kumar Gogada , Michal Simek , Daire McNamara , linux-pci@vger.kernel.org Subject: [PATCH v2 29/57] irqdomain: pci: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:22 +0100 Message-ID: <20250319092951.37667-30-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Vignesh Raghavendra Cc: Siddharth Vadapalli Cc: Lorenzo Pieralisi Cc: "Krzysztof Wilczy=C5=84ski" Cc: Manivannan Sadhasivam Cc: Rob Herring Cc: Bjorn Helgaas Cc: Heiko Stuebner Cc: Kunihiko Hayashi Cc: Masami Hiramatsu Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Thomas Petazzoni Cc: "Pali Roh=C3=A1r" Cc: Toan Le Cc: Joyce Ooi Cc: Jim Quinlan Cc: Nicolas Saenz Julienne Cc: Florian Fainelli Cc: Broadcom internal kernel review list Cc: Ray Jui Cc: Scott Branden Cc: Ryder Lee Cc: Jianjun Wang Cc: Shawn Lin Cc: Bharat Kumar Gogada Cc: Michal Simek Cc: Daire McNamara Cc: linux-pci@vger.kernel.org --- drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++-- drivers/pci/controller/dwc/pci-keystone.c | 2 +- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 ++-- drivers/pci/controller/dwc/pcie-uniphier.c | 2 +- .../pci/controller/mobiveil/pcie-mobiveil-host.c | 9 ++++----- drivers/pci/controller/pci-aardvark.c | 14 +++++--------- drivers/pci/controller/pci-ftpci100.c | 4 ++-- drivers/pci/controller/pci-mvebu.c | 6 +++--- drivers/pci/controller/pci-xgene-msi.c | 3 +-- drivers/pci/controller/pcie-altera-msi.c | 2 +- drivers/pci/controller/pcie-altera.c | 2 +- drivers/pci/controller/pcie-brcmstb.c | 2 +- drivers/pci/controller/pcie-iproc-msi.c | 4 ++-- drivers/pci/controller/pcie-mediatek-gen3.c | 9 +++++---- drivers/pci/controller/pcie-mediatek.c | 4 ++-- drivers/pci/controller/pcie-rockchip-host.c | 4 ++-- drivers/pci/controller/pcie-xilinx-cpm.c | 10 ++++------ drivers/pci/controller/pcie-xilinx-dma-pl.c | 12 ++++++------ drivers/pci/controller/pcie-xilinx-nwl.c | 9 +++------ drivers/pci/controller/pcie-xilinx.c | 5 ++--- drivers/pci/controller/plda/pcie-plda-host.c | 14 ++++++-------- 21 files changed, 56 insertions(+), 69 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controll= er/dwc/pci-dra7xx.c index 33d6bf460ffe..3219704aba0e 100644 --- a/drivers/pci/controller/dwc/pci-dra7xx.c +++ b/drivers/pci/controller/dwc/pci-dra7xx.c @@ -359,8 +359,8 @@ static int dra7xx_pcie_init_irq_domain(struct dw_pcie_r= p *pp) =20 irq_set_chained_handler_and_data(pp->irq, dra7xx_pcie_msi_irq_handler, pp); - dra7xx->irq_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, pp); + dra7xx->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_int= c_node), + PCI_NUM_INTX, &intx_domain_ops, pp); of_node_put(pcie_intc_node); if (!dra7xx->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/contro= ller/dwc/pci-keystone.c index 76a37368ae4f..1385d9db7b32 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -761,7 +761,7 @@ static int ks_pcie_config_intx_irq(struct keystone_pcie= *ks_pcie) ks_pcie); } =20 - intx_irq_domain =3D irq_domain_add_linear(intc_np, PCI_NUM_INTX, + intx_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(intc_np), P= CI_NUM_INTX, &ks_pcie_intx_irq_domain_ops, NULL); if (!intx_irq_domain) { dev_err(dev, "Failed to add irq domain for INTX irqs\n"); diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/co= ntroller/dwc/pcie-dw-rockchip.c index c624b7ebd118..678d510a261d 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -144,8 +144,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchi= p_pcie *rockchip) return -EINVAL; } =20 - rockchip->irq_domain =3D irq_domain_add_linear(intc, PCI_NUM_INTX, - &intx_domain_ops, rockchip); + rockchip->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(intc),= PCI_NUM_INTX, + &intx_domain_ops, rockchip); of_node_put(intc); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/contr= oller/dwc/pcie-uniphier.c index 5757ca3803c9..43b28f826edd 100644 --- a/drivers/pci/controller/dwc/pcie-uniphier.c +++ b/drivers/pci/controller/dwc/pcie-uniphier.c @@ -279,7 +279,7 @@ static int uniphier_pcie_config_intx_irq(struct dw_pcie= _rp *pp) goto out_put_node; } =20 - pcie->intx_irq_domain =3D irq_domain_add_linear(np_intc, PCI_NUM_INTX, + pcie->intx_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(np_in= tc), PCI_NUM_INTX, &uniphier_intx_domain_ops, pp); if (!pcie->intx_irq_domain) { dev_err(pci->dev, "Failed to get INTx domain\n"); diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers= /pci/controller/mobiveil/pcie-mobiveil-host.c index 6628eed9d26e..a600f46ee3c3 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -439,8 +439,8 @@ static int mobiveil_allocate_msi_domains(struct mobivei= l_pcie *pcie) struct mobiveil_msi *msi =3D &pcie->rp.msi; =20 mutex_init(&msi->lock); - msi->dev_domain =3D irq_domain_add_linear(NULL, msi->num_of_vectors, - &msi_domain_ops, pcie); + msi->dev_domain =3D irq_domain_create_linear(NULL, msi->num_of_vectors, + &msi_domain_ops, pcie); if (!msi->dev_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; @@ -461,12 +461,11 @@ static int mobiveil_allocate_msi_domains(struct mobiv= eil_pcie *pcie) static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie) { struct device *dev =3D &pcie->pdev->dev; - struct device_node *node =3D dev->of_node; struct mobiveil_root_port *rp =3D &pcie->rp; =20 /* setup INTx */ - rp->intx_domain =3D irq_domain_add_linear(node, PCI_NUM_INTX, - &intx_domain_ops, pcie); + rp->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(dev->of_nod= e), PCI_NUM_INTX, + &intx_domain_ops, pcie); =20 if (!rp->intx_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller= /pci-aardvark.c index a29796cce420..7bac64533b14 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1456,9 +1456,8 @@ static int advk_pcie_init_msi_irq_domain(struct advk_= pcie *pcie) raw_spin_lock_init(&pcie->msi_irq_lock); mutex_init(&pcie->msi_used_lock); =20 - pcie->msi_inner_domain =3D - irq_domain_add_linear(NULL, MSI_IRQ_NUM, - &advk_msi_domain_ops, pcie); + pcie->msi_inner_domain =3D irq_domain_create_linear(NULL, MSI_IRQ_NUM, + &advk_msi_domain_ops, pcie); if (!pcie->msi_inner_domain) return -ENOMEM; =20 @@ -1508,9 +1507,8 @@ static int advk_pcie_init_irq_domain(struct advk_pcie= *pcie) irq_chip->irq_mask =3D advk_pcie_irq_mask; irq_chip->irq_unmask =3D advk_pcie_irq_unmask; =20 - pcie->irq_domain =3D - irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &advk_pcie_irq_domain_ops, pcie); + pcie->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc_= node), PCI_NUM_INTX, + &advk_pcie_irq_domain_ops, pcie); if (!pcie->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); ret =3D -ENOMEM; @@ -1549,9 +1547,7 @@ static const struct irq_domain_ops advk_pcie_rp_irq_d= omain_ops =3D { =20 static int advk_pcie_init_rp_irq_domain(struct advk_pcie *pcie) { - pcie->rp_irq_domain =3D irq_domain_add_linear(NULL, 1, - &advk_pcie_rp_irq_domain_ops, - pcie); + pcie->rp_irq_domain =3D irq_domain_create_linear(NULL, 1, &advk_pcie_rp_i= rq_domain_ops, pcie); if (!pcie->rp_irq_domain) { dev_err(&pcie->pdev->dev, "Failed to add Root Port IRQ domain\n"); return -ENOMEM; diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller= /pci-ftpci100.c index ffdeed25e961..28e43831c0f1 100644 --- a/drivers/pci/controller/pci-ftpci100.c +++ b/drivers/pci/controller/pci-ftpci100.c @@ -345,8 +345,8 @@ static int faraday_pci_setup_cascaded_irq(struct farada= y_pci *p) return irq ?: -EINVAL; } =20 - p->irqdomain =3D irq_domain_add_linear(intc, PCI_NUM_INTX, - &faraday_pci_irqdomain_ops, p); + p->irqdomain =3D irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM= _INTX, + &faraday_pci_irqdomain_ops, p); of_node_put(intc); if (!p->irqdomain) { dev_err(p->dev, "failed to create Gemini PCI IRQ domain\n"); diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pc= i-mvebu.c index b0e3bce10aa4..60da24ba0a19 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -1078,9 +1078,9 @@ static int mvebu_pcie_init_irq_domain(struct mvebu_pc= ie_port *port) return -ENODEV; } =20 - port->intx_irq_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_I= NTX, - &mvebu_pcie_intx_irq_domain_ops, - port); + port->intx_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_= intc_node), + PCI_NUM_INTX, + &mvebu_pcie_intx_irq_domain_ops, port); of_node_put(pcie_intc_node); if (!port->intx_irq_domain) { dev_err(dev, "Failed to get INTx IRQ domain for %s\n", port->name); diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controlle= r/pci-xgene-msi.c index 69a9c0a87639..d07e97e22d6d 100644 --- a/drivers/pci/controller/pci-xgene-msi.c +++ b/drivers/pci/controller/pci-xgene-msi.c @@ -242,8 +242,7 @@ static const struct irq_domain_ops msi_domain_ops =3D { =20 static int xgene_allocate_domains(struct xgene_msi *msi) { - msi->inner_domain =3D irq_domain_add_linear(NULL, NR_MSI_VEC, - &msi_domain_ops, msi); + msi->inner_domain =3D irq_domain_create_linear(NULL, NR_MSI_VEC, &msi_dom= ain_ops, msi); if (!msi->inner_domain) return -ENOMEM; =20 diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/control= ler/pcie-altera-msi.c index 5fb3a2e0017e..a43f21eb8fbb 100644 --- a/drivers/pci/controller/pcie-altera-msi.c +++ b/drivers/pci/controller/pcie-altera-msi.c @@ -166,7 +166,7 @@ static int altera_allocate_domains(struct altera_msi *m= si) { struct fwnode_handle *fwnode =3D of_fwnode_handle(msi->pdev->dev.of_node); =20 - msi->inner_domain =3D irq_domain_add_linear(NULL, msi->num_of_vectors, + msi->inner_domain =3D irq_domain_create_linear(NULL, msi->num_of_vectors, &msi_domain_ops, msi); if (!msi->inner_domain) { dev_err(&msi->pdev->dev, "failed to create IRQ domain\n"); diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/= pcie-altera.c index 70409e71a18f..0fc77176a52e 100644 --- a/drivers/pci/controller/pcie-altera.c +++ b/drivers/pci/controller/pcie-altera.c @@ -855,7 +855,7 @@ static int altera_pcie_init_irq_domain(struct altera_pc= ie *pcie) struct device_node *node =3D dev->of_node; =20 /* Setup INTx */ - pcie->irq_domain =3D irq_domain_add_linear(node, PCI_NUM_INTX, + pcie->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(node), PCI= _NUM_INTX, &intx_domain_ops, pcie); if (!pcie->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller= /pcie-brcmstb.c index 1f356fca07a2..fbbbe9f2d171 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -584,7 +584,7 @@ static int brcm_allocate_domains(struct brcm_msi *msi) struct fwnode_handle *fwnode =3D of_fwnode_handle(msi->np); struct device *dev =3D msi->dev; =20 - msi->inner_domain =3D irq_domain_add_linear(NULL, msi->nr, &msi_domain_op= s, msi); + msi->inner_domain =3D irq_domain_create_linear(NULL, msi->nr, &msi_domain= _ops, msi); if (!msi->inner_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controll= er/pcie-iproc-msi.c index 804b3a5787c5..d2cb4c4f821a 100644 --- a/drivers/pci/controller/pcie-iproc-msi.c +++ b/drivers/pci/controller/pcie-iproc-msi.c @@ -446,8 +446,8 @@ static void iproc_msi_disable(struct iproc_msi *msi) static int iproc_msi_alloc_domains(struct device_node *node, struct iproc_msi *msi) { - msi->inner_domain =3D irq_domain_add_linear(NULL, msi->nr_msi_vecs, - &msi_domain_ops, msi); + msi->inner_domain =3D irq_domain_create_linear(NULL, msi->nr_msi_vecs, + &msi_domain_ops, msi); if (!msi->inner_domain) return -ENOMEM; =20 diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/cont= roller/pcie-mediatek-gen3.c index 9d52504acae4..b55f5973414c 100644 --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c @@ -745,8 +745,8 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pc= ie *pcie) return -ENODEV; } =20 - pcie->intx_domain =3D irq_domain_add_linear(intc_node, PCI_NUM_INTX, - &intx_domain_ops, pcie); + pcie->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(intc_node= ), PCI_NUM_INTX, + &intx_domain_ops, pcie); if (!pcie->intx_domain) { dev_err(dev, "failed to create INTx IRQ domain\n"); ret =3D -ENODEV; @@ -756,8 +756,9 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pc= ie *pcie) /* Setup MSI */ mutex_init(&pcie->lock); =20 - pcie->msi_bottom_domain =3D irq_domain_add_linear(node, PCIE_MSI_IRQS_NUM, - &mtk_msi_bottom_domain_ops, pcie); + pcie->msi_bottom_domain =3D irq_domain_create_linear(of_fwnode_handle(nod= e), + PCIE_MSI_IRQS_NUM, + &mtk_msi_bottom_domain_ops, pcie); if (!pcie->msi_bottom_domain) { dev_err(dev, "failed to create MSI bottom domain\n"); ret =3D -ENODEV; diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controlle= r/pcie-mediatek.c index efcc4a7c17be..e1934aa06c8d 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -569,8 +569,8 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_por= t *port, return -ENODEV; } =20 - port->irq_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, port); + port->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc_= node), PCI_NUM_INTX, + &intx_domain_ops, port); of_node_put(pcie_intc_node); if (!port->irq_domain) { dev_err(dev, "failed to get INTx IRQ domain\n"); diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/cont= roller/pcie-rockchip-host.c index 6a46be17aa91..b9e7a8710cf0 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -693,8 +693,8 @@ static int rockchip_pcie_init_irq_domain(struct rockchi= p_pcie *rockchip) return -EINVAL; } =20 - rockchip->irq_domain =3D irq_domain_add_linear(intc, PCI_NUM_INTX, - &intx_domain_ops, rockchip); + rockchip->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(intc),= PCI_NUM_INTX, + &intx_domain_ops, rockchip); of_node_put(intc); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/control= ler/pcie-xilinx-cpm.c index d0ab187d917f..879746e82c50 100644 --- a/drivers/pci/controller/pcie-xilinx-cpm.c +++ b/drivers/pci/controller/pcie-xilinx-cpm.c @@ -395,17 +395,15 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xil= inx_cpm_pcie *port) return -EINVAL; } =20 - port->cpm_domain =3D irq_domain_add_linear(pcie_intc_node, 32, - &event_domain_ops, - port); + port->cpm_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc_= node), 32, + &event_domain_ops, port); if (!port->cpm_domain) goto out; =20 irq_domain_update_bus_token(port->cpm_domain, DOMAIN_BUS_NEXUS); =20 - port->intx_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, - port); + port->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc= _node), PCI_NUM_INTX, + &intx_domain_ops, port); if (!port->intx_domain) goto out; =20 diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/cont= roller/pcie-xilinx-dma-pl.c index 71cf13ae51c7..dc9690a535e1 100644 --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c @@ -472,8 +472,8 @@ static int xilinx_pl_dma_pcie_init_msi_irq_domain(struc= t pl_dma_pcie *port) int size =3D BITS_TO_LONGS(XILINX_NUM_MSI_IRQS) * sizeof(long); struct fwnode_handle *fwnode =3D of_fwnode_handle(port->dev->of_node); =20 - msi->dev_domain =3D irq_domain_add_linear(NULL, XILINX_NUM_MSI_IRQS, - &dev_msi_domain_ops, port); + msi->dev_domain =3D irq_domain_create_linear(NULL, XILINX_NUM_MSI_IRQS, + &dev_msi_domain_ops, port); if (!msi->dev_domain) goto out; =20 @@ -585,15 +585,15 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct = pl_dma_pcie *port) return -EINVAL; } =20 - port->pldma_domain =3D irq_domain_add_linear(pcie_intc_node, 32, - &event_domain_ops, port); + port->pldma_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_int= c_node), 32, + &event_domain_ops, port); if (!port->pldma_domain) return -ENOMEM; =20 irq_domain_update_bus_token(port->pldma_domain, DOMAIN_BUS_NEXUS); =20 - port->intx_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, port); + port->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc= _node), PCI_NUM_INTX, + &intx_domain_ops, port); if (!port->intx_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); return -ENOMEM; diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/control= ler/pcie-xilinx-nwl.c index 9cf8a96f7bc4..c8b05477b719 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -498,8 +498,7 @@ static int nwl_pcie_init_msi_irq_domain(struct nwl_pcie= *pcie) struct fwnode_handle *fwnode =3D of_fwnode_handle(dev->of_node); struct nwl_msi *msi =3D &pcie->msi; =20 - msi->dev_domain =3D irq_domain_add_linear(NULL, INT_PCI_MSI_NR, - &dev_msi_domain_ops, pcie); + msi->dev_domain =3D irq_domain_create_linear(NULL, INT_PCI_MSI_NR, &dev_m= si_domain_ops, pcie); if (!msi->dev_domain) { dev_err(dev, "failed to create dev IRQ domain\n"); return -ENOMEM; @@ -582,10 +581,8 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *p= cie) return -EINVAL; } =20 - pcie->intx_irq_domain =3D irq_domain_add_linear(intc_node, - PCI_NUM_INTX, - &intx_domain_ops, - pcie); + pcie->intx_irq_domain =3D irq_domain_create_linear(of_fwnode_handle(intc_= node), PCI_NUM_INTX, + &intx_domain_ops, pcie); of_node_put(intc_node); if (!pcie->intx_irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); diff --git a/drivers/pci/controller/pcie-xilinx.c b/drivers/pci/controller/= pcie-xilinx.c index 0b534f73a942..e36aa874bae9 100644 --- a/drivers/pci/controller/pcie-xilinx.c +++ b/drivers/pci/controller/pcie-xilinx.c @@ -461,9 +461,8 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pc= ie *pcie) return -ENODEV; } =20 - pcie->leg_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, - pcie); + pcie->leg_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc_= node), PCI_NUM_INTX, + &intx_domain_ops, pcie); of_node_put(pcie_intc_node); if (!pcie->leg_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); diff --git a/drivers/pci/controller/plda/pcie-plda-host.c b/drivers/pci/con= troller/plda/pcie-plda-host.c index 4c7a9fa311e3..3abedf723215 100644 --- a/drivers/pci/controller/plda/pcie-plda-host.c +++ b/drivers/pci/controller/plda/pcie-plda-host.c @@ -155,8 +155,7 @@ static int plda_allocate_msi_domains(struct plda_pcie_r= p *port) =20 mutex_init(&port->msi.lock); =20 - msi->dev_domain =3D irq_domain_add_linear(NULL, msi->num_vectors, - &msi_domain_ops, port); + msi->dev_domain =3D irq_domain_create_linear(NULL, msi->num_vectors, &msi= _domain_ops, port); if (!msi->dev_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; @@ -393,10 +392,9 @@ static int plda_pcie_init_irq_domains(struct plda_pcie= _rp *port) return -EINVAL; } =20 - port->event_domain =3D irq_domain_add_linear(pcie_intc_node, - port->num_events, - &plda_event_domain_ops, - port); + port->event_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_int= c_node), + port->num_events, &plda_event_domain_ops, + port); if (!port->event_domain) { dev_err(dev, "failed to get event domain\n"); of_node_put(pcie_intc_node); @@ -405,8 +403,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_= rp *port) =20 irq_domain_update_bus_token(port->event_domain, DOMAIN_BUS_NEXUS); =20 - port->intx_domain =3D irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, - &intx_domain_ops, port); + port->intx_domain =3D irq_domain_create_linear(of_fwnode_handle(pcie_intc= _node), PCI_NUM_INTX, + &intx_domain_ops, port); if (!port->intx_domain) { dev_err(dev, "failed to get an INTx IRQ domain\n"); of_node_put(pcie_intc_node); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0A509252910; Wed, 19 Mar 2025 09:32:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376746; cv=none; b=pKwRc54ytbQrjjqzFA8Wvk28kZQDrHgqZ2OTlKvryWP6uz4nWD9l36vgmViYg78G0oGdvd22Cz78IlDbc7vjWKZwj63pETArB+FF0tlbHyICtWbFfGhigBy9kK4SFYlMwFxQAaYhIi3iduaQX8cI1HOcuhPxtNR1AhCbsNbvB+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376746; c=relaxed/simple; bh=J4LXR0Y2qS0piBOOlokPYpkVy5zQirVcAhf7ufpp67I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T0ldQdTB1AWKD7r6naElyHIcFLwMTg4LRpsh8Qx2aQoA+PsiwuSKw29m76VqXBKQVb+/DPuJWoZOBKa8DEAeoDeaZviCozWNv4NSiRfWwuUH1LTl+QJcMaOVBgRnnooW3LBfx8rRo0ezJHeb4cyBaSVnvLBZcgLaaNk9m7x5OgQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bhcEic3y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bhcEic3y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49551C4CEF1; Wed, 19 Mar 2025 09:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376745; bh=J4LXR0Y2qS0piBOOlokPYpkVy5zQirVcAhf7ufpp67I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bhcEic3ycqf6Nj2QnNFq8kBIZE85TZWizQkWHeLOtAXmNKz2GrhCSJIYPXQ3DxBje wQwER4s9G9hLwyHJAimwTpHOzaGs5MHTu6lQ/9OuUsRF2fYzlXjL1vN9GAqD5SUV2j DhHtj0GyODaoyPHDxVa09v8O7Nhnn5hXjN80O/4o/F3Q7rNL+UmX4u5bVCpOIgi18c 2rX8WPnE/yMsDg9mKjc2nlQpRhN1UuQgxV90loPm5lFrKLeaMqKqaUZj+tc0ML2fKl rlnK4dId2bKWojLocDEAqbN44kD3U5lz7BoilDTYG+7Qr/VkMwjjii+zr4K5iYwfo0 skh5Fn8fKK02Q== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Tony Lindgren , Haojian Zhuang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-gpio@vger.kernel.org Subject: [PATCH v2 30/57] irqdomain: pinctrl: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:23 +0100 Message-ID: <20250319092951.37667-31-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Sean Wang Cc: Linus Walleij Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: Ludovic Desroches Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Tony Lindgren Cc: Haojian Zhuang Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij --- drivers/pinctrl/mediatek/mtk-eint.c | 5 ++--- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-single.c | 9 +++++---- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/mediatek/mtk-eint.c b/drivers/pinctrl/mediatek= /mtk-eint.c index 27f0a54e12bf..855df9d8baec 100644 --- a/drivers/pinctrl/mediatek/mtk-eint.c +++ b/drivers/pinctrl/mediatek/mtk-eint.c @@ -508,9 +508,8 @@ int mtk_eint_do_init(struct mtk_eint *eint) if (!eint->dual_edge) return -ENOMEM; =20 - eint->domain =3D irq_domain_add_linear(eint->dev->of_node, - eint->hw->ap_num, - &irq_domain_simple_ops, NULL); + eint->domain =3D irq_domain_create_linear(of_fwnode_handle(eint->dev->of_= node), + eint->hw->ap_num, &irq_domain_simple_ops, NULL); if (!eint->domain) return -ENOMEM; =20 diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-= at91-pio4.c index 8b01d312305a..e57ac4ea91dd 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device= *pdev) dev_dbg(dev, "bank %i: irq=3D%d\n", i, ret); } =20 - atmel_pioctrl->irq_domain =3D irq_domain_add_linear(dev->of_node, + atmel_pioctrl->irq_domain =3D irq_domain_create_linear(of_fwnode_handle(d= ev->of_node), atmel_pioctrl->gpio_chip->ngpio, &irq_domain_simple_ops, NULL); if (!atmel_pioctrl->irq_domain) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-sin= gle.c index 5be14dc979e2..5cda6201b60f 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_= device *pcs, =20 /* * We can use the register offset as the hardirq - * number as irq_domain_add_simple maps them lazily. + * number as irq_domain_create_simple maps them lazily. * This way we can easily support more than one * interrupt per function if needed. */ num_irqs =3D pcs->size; =20 - pcs->domain =3D irq_domain_add_simple(np, num_irqs, 0, - &pcs_irqdomain_ops, - pcs_soc); + pcs->domain =3D irq_domain_create_simple(of_fwnode_handle(np), + num_irqs, 0, + &pcs_irqdomain_ops, + pcs_soc); if (!pcs->domain) { irq_set_chained_handler(pcs_soc->irq, NULL); return -EINVAL; diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/= pinctrl-sunxi.c index f1c5a991cf7b..bf8612d72daa 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_de= vice *pdev, } } =20 - pctl->domain =3D irq_domain_add_linear(node, - pctl->desc->irq_banks * IRQ_PER_BANK, - &sunxi_pinctrl_irq_domain_ops, - pctl); + pctl->domain =3D irq_domain_create_linear(of_fwnode_handle(node), + pctl->desc->irq_banks * IRQ_PER_BANK, + &sunxi_pinctrl_irq_domain_ops, pctl); if (!pctl->domain) { dev_err(&pdev->dev, "Couldn't register IRQ domain\n"); ret =3D -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C9D8125A655; Wed, 19 Mar 2025 09:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376748; cv=none; b=aCOYBICgiJMRVbtotnmnS4XUC0ICUQPDSRsiAZQdw7mLe2BvPmAkI3gQyayjccm5JnoXTz8ougIphgGlE3E7xNGi4eBK2HlyzCOh2EXUgvZ7a0A7cDwDdnqgdBN6gi7AGLsh548punRlQJBYhVQ7q6bgV2AF73vVgXNVESZIsj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376748; c=relaxed/simple; bh=WiX4WeKHacFFfrdeoVaai4OC93Gt3ejm2Wmh8P+mBrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZJKIxCR7GJEy2ajnP2XkNR5eDTIFo0Ru8H2+a6WKMtugHNTlkFLus4od/HuqOWcTPcfo8VeY7L16AYH14zSHjd999/4aosh6PIF3hVjchECxl/X1IUklXCdozJWPq3ez3JrealzXUD3fXmxoID2ipKh+4D/gGp5vz4qCWosex1o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Li3mSSSg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Li3mSSSg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BE40C4CEE9; Wed, 19 Mar 2025 09:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376748; bh=WiX4WeKHacFFfrdeoVaai4OC93Gt3ejm2Wmh8P+mBrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Li3mSSSg93zlmywjPim+AqXUqCsihFTWjejPuLAayLQtHqAyC9moPeGVj0XO+kdxD uMBx6fcWwuIi/59IFG9M3SHtxlCkruIneMeAbB9zmbnJo+8w/4W9l9PRSX9KciiBZ3 jPLmn7hFkyQ2zWppBD+5N7fBvxqcnKmhN3/46dB8+XTMKu5IYnMvBqcReeNDdGJd45 /I+fQcB+swIv0i10qsN8ZwS0yeb3X12yOfNQO5N6H+dJPIBR0kHIr+JjHpRJq8TrS8 2TcJJrl2Rb/RV9bt8KOLKRJqqkE6iJz2xGFaVMHahO/Li3VcT72Nae6heCjHSUupwG PG17PKok1KD6Q== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Hans de Goede , Corentin Chary , "Luke D. Jones" , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , platform-driver-x86@vger.kernel.org Subject: [PATCH v2 31/57] irqdomain: platform/x86: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:24 +0100 Message-ID: <20250319092951.37667-32-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Hans de Goede Cc: Corentin Chary Cc: "Luke D. Jones" Cc: "Ilpo J=C3=A4rvinen" Cc: platform-driver-x86@vger.kernel.org --- drivers/platform/x86/asus-tf103c-dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86= /asus-tf103c-dock.c index ca4670d0dc67..f09a3fc6524a 100644 --- a/drivers/platform/x86/asus-tf103c-dock.c +++ b/drivers/platform/x86/asus-tf103c-dock.c @@ -856,7 +856,7 @@ static int tf103c_dock_probe(struct i2c_client *client) /* 5. Setup irqchip for touchpad IRQ pass-through */ dock->tp_irqchip.name =3D KBUILD_MODNAME; =20 - dock->tp_irq_domain =3D irq_domain_add_linear(NULL, 1, &irq_domain_simple= _ops, NULL); + dock->tp_irq_domain =3D irq_domain_create_linear(NULL, 1, &irq_domain_sim= ple_ops, NULL); if (!dock->tp_irq_domain) return -ENOMEM; =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CAF15255227 for ; Wed, 19 Mar 2025 09:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376752; cv=none; b=XZEUucuP62DA51vL7hdejdU9ZgQR73tz+2OKNtDDlXb0v8olGETNK5UOSfB46SKJXOIGEJ3ZHuAlqbJG1rlXgxaPpfPTq0fkor83PBNuTc/4RA1jXAtdYSTja0JEGlUU2QNvpT3uRgeFf3c+7rvi2KjoEdSzC+B9+nDRrQNyw9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376752; c=relaxed/simple; bh=K7NuaEoslCT+xOnJpz2GrUFAcs2CA1ZosMMX7h4U2qc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=og/iMh0CsTezyc5uWfECajnBhVbdEiMHp5JfxCLnW4ZyUA2EXsQyX2kJ2CLx5lBiSjWBZ4TJ/euWcFG3+yEHGZ5oOGWOITsCmagSRauvjssyH2MU/BqTjpczowZlYZFIftR+agDoBoiq8nu6+PlYB7zqvaLT4TFo3/VqMBFzjK4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NrrsW7XH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NrrsW7XH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5069C4CEEE; Wed, 19 Mar 2025 09:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376751; bh=K7NuaEoslCT+xOnJpz2GrUFAcs2CA1ZosMMX7h4U2qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NrrsW7XHKgr5I6lDrIyZQUl9Rtj9F68dKgpD8ZaCEpXPTtK5qrzubwTWrDou3ytNp IvDuhq45yWVFlN79y0fBWHgx+A2yyk1Y9H9E9iwqvyP4ASfXR6YAIVEth6R8qvjI1R bpo4Fr3oM//UsDlEXhBmJPSaFmIeKAbD/5fNbObPltRNaFi2d4bnl0OidjdVudkjod eDVIABtaZxE2EqINq3a5cPALDveC1Nkw3PyFb8D74QsVhFwnOWkv5W+KNfSC0RUY9p M35ZqGf/lnHksNPr1hkWYhdg9dqhjPkCu+8r2DHvo7NAaVH9y1tt4+bZ8nu/H53nWw 7VtxsfQPitAfg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Anatolij Gustschin , Scott Wood , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 32/57] irqdomain: ppc: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:25 +0100 Message-ID: <20250319092951.37667-33-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: Anatolij Gustschin Cc: Scott Wood Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Christophe Leroy # For 8xx --- arch/powerpc/platforms/44x/uic.c | 5 +++-- arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 3 ++- arch/powerpc/platforms/52xx/media5200.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 ++- arch/powerpc/platforms/8xx/pic.c | 3 ++- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 5 +++-- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++-- arch/powerpc/platforms/powermac/pic.c | 5 +++-- arch/powerpc/platforms/powernv/opal-irqchip.c | 3 ++- arch/powerpc/sysdev/cpm2_pic.c | 3 ++- arch/powerpc/sysdev/ehv_pic.c | 5 +++-- arch/powerpc/sysdev/fsl_msi.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 5 +++-- arch/powerpc/sysdev/i8259.c | 4 ++-- arch/powerpc/sysdev/ipic.c | 5 +++-- arch/powerpc/sysdev/mpic.c | 6 +++--- arch/powerpc/sysdev/tsi108_pci.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 21 files changed, 45 insertions(+), 33 deletions(-) diff --git a/arch/powerpc/platforms/44x/uic.c b/arch/powerpc/platforms/44x/= uic.c index 31f760c2ec5d..481ec25ce78f 100644 --- a/arch/powerpc/platforms/44x/uic.c +++ b/arch/powerpc/platforms/44x/uic.c @@ -254,8 +254,9 @@ static struct uic * __init uic_init_one(struct device_n= ode *node) } uic->dcrbase =3D *dcrreg; =20 - uic->irqhost =3D irq_domain_add_linear(node, NR_UIC_INTS, &uic_host_ops, - uic); + uic->irqhost =3D irq_domain_create_linear(of_fwnode_handle(node), + NR_UIC_INTS, &uic_host_ops, + uic); if (! uic->irqhost) return NULL; /* FIXME: panic? */ =20 diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/= platforms/512x/mpc5121_ads_cpld.c index e995eb30bf09..2cf3c6237337 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c @@ -188,7 +188,8 @@ mpc5121_ads_cpld_pic_init(void) =20 cpld_pic_node =3D of_node_get(np); =20 - cpld_pic_host =3D irq_domain_add_linear(np, 16, &cpld_pic_host_ops, NULL); + cpld_pic_host =3D irq_domain_create_linear(of_fwnode_handle(np), 16, + &cpld_pic_host_ops, NULL); if (!cpld_pic_host) { printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n"); goto end; diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platfor= ms/52xx/media5200.c index 19626cd42406..bc7f83cfec1d 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c @@ -168,7 +168,7 @@ static void __init media5200_init_irq(void) =20 spin_lock_init(&media5200_irq.lock); =20 - media5200_irq.irqhost =3D irq_domain_add_linear(fpga_np, + media5200_irq.irqhost =3D irq_domain_create_linear(of_fwnode_handle(fpga_= np), MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq); if (!media5200_irq.irqhost) goto out; diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platf= orms/52xx/mpc52xx_gpt.c index 1ea591ec6083..f042b21b2b73 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c @@ -247,9 +247,9 @@ mpc52xx_gpt_irq_setup(struct mpc52xx_gpt_priv *gpt, str= uct device_node *node) if (!cascade_virq) return; =20 - gpt->irqhost =3D irq_domain_add_linear(node, 1, &mpc52xx_gpt_irq_ops, gpt= ); + gpt->irqhost =3D irq_domain_create_linear(of_fwnode_handle(node), 1, &mpc= 52xx_gpt_irq_ops, gpt); if (!gpt->irqhost) { - dev_err(gpt->dev, "irq_domain_add_linear() failed\n"); + dev_err(gpt->dev, "irq_domain_create_linear() failed\n"); return; } =20 diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platf= orms/52xx/mpc52xx_pic.c index 43c881d31ca6..7ec56d3788a9 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c @@ -446,7 +446,7 @@ void __init mpc52xx_init_irq(void) * As last step, add an irq host to translate the real * hw irq information provided by the ofw to linux virq */ - mpc52xx_irqhost =3D irq_domain_add_linear(picnode, + mpc52xx_irqhost =3D irq_domain_create_linear(of_fwnode_handle(picnode), MPC52xx_IRQ_HIGHTESTHWIRQ, &mpc52xx_irqhost_ops, NULL); =20 diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc= /platforms/85xx/socrates_fpga_pic.c index 60e0b8947ce6..b4f6360830b1 100644 --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c @@ -278,7 +278,7 @@ void __init socrates_fpga_pic_init(struct device_node *= pic) int i; =20 /* Setup an irq_domain structure */ - socrates_fpga_pic_irq_host =3D irq_domain_add_linear(pic, + socrates_fpga_pic_irq_host =3D irq_domain_create_linear(of_fwnode_handle(= pic), SOCRATES_FPGA_NUM_IRQS, &socrates_fpga_pic_host_ops, NULL); if (socrates_fpga_pic_irq_host =3D=3D NULL) { pr_err("FPGA PIC: Unable to allocate host\n"); diff --git a/arch/powerpc/platforms/8xx/cpm1-ic.c b/arch/powerpc/platforms/= 8xx/cpm1-ic.c index a18fc7c99f83..1549f6cd29f4 100644 --- a/arch/powerpc/platforms/8xx/cpm1-ic.c +++ b/arch/powerpc/platforms/8xx/cpm1-ic.c @@ -110,7 +110,8 @@ static int cpm_pic_probe(struct platform_device *pdev) =20 out_be32(&data->reg->cpic_cimr, 0); =20 - data->host =3D irq_domain_add_linear(dev->of_node, 64, &cpm_pic_host_ops,= data); + data->host =3D irq_domain_create_linear(of_fwnode_handle(dev->of_node), + 64, &cpm_pic_host_ops, data); if (!data->host) return -ENODEV; =20 diff --git a/arch/powerpc/platforms/8xx/pic.c b/arch/powerpc/platforms/8xx/= pic.c index ea6b0e523c60..7639f28172be 100644 --- a/arch/powerpc/platforms/8xx/pic.c +++ b/arch/powerpc/platforms/8xx/pic.c @@ -146,7 +146,8 @@ void __init mpc8xx_pic_init(void) if (!siu_reg) goto out; =20 - mpc8xx_pic_host =3D irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, N= ULL); + mpc8xx_pic_host =3D irq_domain_create_linear(of_fwnode_handle(np), 64, + &mpc8xx_pic_host_ops, NULL); if (!mpc8xx_pic_host) printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); =20 diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerp= c/platforms/embedded6xx/flipper-pic.c index 013d66304c31..a41649bf0cb8 100644 --- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c +++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c @@ -149,8 +149,9 @@ static struct irq_domain * __init flipper_pic_init(stru= ct device_node *np) =20 __flipper_quiesce(io_base); =20 - irq_domain =3D irq_domain_add_linear(np, FLIPPER_NR_IRQS, - &flipper_irq_domain_ops, io_base); + irq_domain =3D irq_domain_create_linear(of_fwnode_handle(np), + FLIPPER_NR_IRQS, + &flipper_irq_domain_ops, io_base); if (!irq_domain) { pr_err("failed to allocate irq_domain\n"); return NULL; diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/p= latforms/embedded6xx/hlwd-pic.c index 4d2d92de30af..9abb3da36ba5 100644 --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c @@ -175,8 +175,9 @@ static struct irq_domain *__init hlwd_pic_init(struct d= evice_node *np) =20 __hlwd_quiesce(io_base); =20 - irq_domain =3D irq_domain_add_linear(np, HLWD_NR_IRQS, - &hlwd_irq_domain_ops, io_base); + irq_domain =3D irq_domain_create_linear(of_fwnode_handle(np), + HLWD_NR_IRQS, + &hlwd_irq_domain_ops, io_base); if (!irq_domain) { pr_err("failed to allocate irq_domain\n"); iounmap(io_base); diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms= /powermac/pic.c index 03a7c51f2645..2eddc8bff7ab 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -327,8 +327,9 @@ static void __init pmac_pic_probe_oldstyle(void) /* * Allocate an irq host */ - pmac_pic_host =3D irq_domain_add_linear(master, max_irqs, - &pmac_pic_host_ops, NULL); + pmac_pic_host =3D irq_domain_create_linear(of_fwnode_handle(master), + max_irqs, + &pmac_pic_host_ops, NULL); BUG_ON(pmac_pic_host =3D=3D NULL); irq_set_default_domain(pmac_pic_host); =20 diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c b/arch/powerpc/p= latforms/powernv/opal-irqchip.c index d92759c21fae..e180bd8e1400 100644 --- a/arch/powerpc/platforms/powernv/opal-irqchip.c +++ b/arch/powerpc/platforms/powernv/opal-irqchip.c @@ -191,7 +191,8 @@ int __init opal_event_init(void) * fall back to the legacy method (opal_event_request(...)) * anyway. */ dn =3D of_find_compatible_node(NULL, NULL, "ibm,opal-event"); - opal_event_irqchip.domain =3D irq_domain_add_linear(dn, MAX_NUM_EVENTS, + opal_event_irqchip.domain =3D irq_domain_create_linear(of_fwnode_handle(d= n), + MAX_NUM_EVENTS, &opal_event_domain_ops, &opal_event_irqchip); of_node_put(dn); if (!opal_event_irqchip.domain) { diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index e14493685fe8..c63d72f17a3e 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c @@ -259,7 +259,8 @@ void cpm2_pic_init(struct device_node *node) out_be32(&cpm2_intctl->ic_scprrl, 0x05309770); =20 /* create a legacy host */ - cpm2_pic_host =3D irq_domain_add_linear(node, 64, &cpm2_pic_host_ops, NUL= L); + cpm2_pic_host =3D irq_domain_create_linear(of_fwnode_handle(node), 64, + &cpm2_pic_host_ops, NULL); if (cpm2_pic_host =3D=3D NULL) { printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); return; diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c index fb502b72fca1..4ee8d36ca647 100644 --- a/arch/powerpc/sysdev/ehv_pic.c +++ b/arch/powerpc/sysdev/ehv_pic.c @@ -269,8 +269,9 @@ void __init ehv_pic_init(void) return; } =20 - ehv_pic->irqhost =3D irq_domain_add_linear(np, NR_EHV_PIC_INTS, - &ehv_pic_host_ops, ehv_pic); + ehv_pic->irqhost =3D irq_domain_create_linear(of_fwnode_handle(np), + NR_EHV_PIC_INTS, + &ehv_pic_host_ops, ehv_pic); if (!ehv_pic->irqhost) { of_node_put(np); kfree(ehv_pic); diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 7b9a5ea9cad9..4fe8a7b1b288 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c @@ -412,7 +412,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) } platform_set_drvdata(dev, msi); =20 - msi->irqhost =3D irq_domain_add_linear(dev->dev.of_node, + msi->irqhost =3D irq_domain_create_linear(of_fwnode_handle(dev->dev.of_no= de), NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi); =20 if (msi->irqhost =3D=3D NULL) { diff --git a/arch/powerpc/sysdev/ge/ge_pic.c b/arch/powerpc/sysdev/ge/ge_pi= c.c index a6c424680c37..5b1f8dc3c960 100644 --- a/arch/powerpc/sysdev/ge/ge_pic.c +++ b/arch/powerpc/sysdev/ge/ge_pic.c @@ -214,8 +214,9 @@ void __init gef_pic_init(struct device_node *np) } =20 /* Setup an irq_domain structure */ - gef_pic_irq_host =3D irq_domain_add_linear(np, GEF_PIC_NUM_IRQS, - &gef_pic_host_ops, NULL); + gef_pic_irq_host =3D irq_domain_create_linear(of_fwnode_handle(np), + GEF_PIC_NUM_IRQS, + &gef_pic_host_ops, NULL); if (gef_pic_irq_host =3D=3D NULL) return; =20 diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 06e391485da7..99bb2b916949 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c @@ -260,8 +260,8 @@ void i8259_init(struct device_node *node, unsigned long= intack_addr) raw_spin_unlock_irqrestore(&i8259_lock, flags); =20 /* create a legacy host */ - i8259_host =3D irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, - &i8259_host_ops, NULL); + i8259_host =3D irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS_L= EGACY, 0, 0, + &i8259_host_ops, NULL); if (i8259_host =3D=3D NULL) { printk(KERN_ERR "i8259: failed to allocate irq host !\n"); return; diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index a35be0232978..f7b415ebb71c 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -711,8 +711,9 @@ struct ipic * __init ipic_init(struct device_node *node= , unsigned int flags) if (ipic =3D=3D NULL) return NULL; =20 - ipic->irqhost =3D irq_domain_add_linear(node, NR_IPIC_INTS, - &ipic_host_ops, ipic); + ipic->irqhost =3D irq_domain_create_linear(of_fwnode_handle(node), + NR_IPIC_INTS, + &ipic_host_ops, ipic); if (ipic->irqhost =3D=3D NULL) { kfree(ipic); return NULL; diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 4afbab83a2e2..3de090159a1b 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1483,9 +1483,9 @@ struct mpic * __init mpic_alloc(struct device_node *n= ode, mpic->isu_shift =3D 1 + __ilog2(mpic->isu_size - 1); mpic->isu_mask =3D (1 << mpic->isu_shift) - 1; =20 - mpic->irqhost =3D irq_domain_add_linear(mpic->node, - intvec_top, - &mpic_host_ops, mpic); + mpic->irqhost =3D irq_domain_create_linear(of_fwnode_handle(mpic->node), + intvec_top, + &mpic_host_ops, mpic); =20 /* * FIXME: The code leaks the MPIC object and mappings here; this diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_= pci.c index 0e42f7bad7db..07d0f6a83879 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c @@ -404,8 +404,8 @@ void __init tsi108_pci_int_init(struct device_node *nod= e) { DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); =20 - pci_irq_host =3D irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, - &pci_irq_domain_ops, NULL); + pci_irq_host =3D irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS= _LEGACY, 0, 0, + &pci_irq_domain_ops, NULL); if (pci_irq_host =3D=3D NULL) { printk(KERN_ERR "pci_irq_host: failed to allocate irq domain!\n"); return; diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/c= ommon.c index dc2e61837396..f10592405024 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arch/powerpc/sysdev/xive/common.c @@ -1464,7 +1464,7 @@ static const struct irq_domain_ops xive_irq_domain_op= s =3D { =20 static void __init xive_init_host(struct device_node *np) { - xive_irq_domain =3D irq_domain_add_tree(np, &xive_irq_domain_ops, NULL); + xive_irq_domain =3D irq_domain_create_tree(of_fwnode_handle(np), &xive_ir= q_domain_ops, NULL); if (WARN_ON(xive_irq_domain =3D=3D NULL)) return; irq_set_default_domain(xive_irq_domain); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1582925522E; Wed, 19 Mar 2025 09:32:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376754; cv=none; b=ZgYJFpGkSKBnv6EvAhA0gW8nIBQsyKiCrk9SfIZ2/AU93MZoCmzhzE/OhHqr7vyM9kRiCSaeWU0pkTSdLyRvbNHCvxACNoBxcaD9ITysAds9knVE335iXa5o0ERrhohCnmvT5Te0MuZaSjanr0svdxMRM8Md+ccd65HzQYdzkCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376754; c=relaxed/simple; bh=5Xh7etPCdWQRnh+9lDIdRBiCYs56zAWYuiuU1OYrZMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lfVHa34zVQ6fuN5pHNzDIiksTa4jkYTUQQPpI/81ZLgt8gC3jiixRu72O4uxaKlJST1FY+H97VaWYqgo2Z8YcilasGJxJpY8Gk3JLAXPSnqkaudr99robr9BKvWqzgzwU4jOG46UYQ+ank6fy3JBRSjRBpHhqkbwCvLGeraDBcI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pM+oFrnm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pM+oFrnm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEFACC4CEEF; Wed, 19 Mar 2025 09:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376753; bh=5Xh7etPCdWQRnh+9lDIdRBiCYs56zAWYuiuU1OYrZMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pM+oFrnm5vNszGzXPRsvJh2e4sgCNGnB65JPuUy7oFSjOG737Ai9D4FMHLKbctgYY 6ZyuUQ9aNVBoyrlidHfMC7vysupoHj4l/7Hpg1LfXSAcfWTFdbDlMyIpjtBW0E+Dzm YIIGaoIXG9aSU9GgEhReeRSp99odWhFjNKkSLHm2yt81ySbMiTebYG1H/pMkOQ+BL1 lRBJ0YAatNOLSJ5VE9jv5DIobc37rTtuVdezEy4RHZJZ3hrEa8vHkfdqetU+w98A4V 5YAD5CnraWc2BLMH3SdjU6ofLB5+WIYTA+dGXWtjbuwpIlLBNT9KKrlBVXca11gwtM LiqclYJ5buosQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org Subject: [PATCH v2 33/57] irqdomain: sh: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:26 +0100 Message-ID: <20250319092951.37667-34-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org --- arch/sh/boards/mach-se/7343/irq.c | 5 +++-- arch/sh/boards/mach-se/7722/irq.c | 2 +- arch/sh/boards/mach-x3proto/gpio.c | 2 +- drivers/sh/intc/irqdomain.c | 5 ++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/734= 3/irq.c index f9f3b14f70d5..8241bdedcc82 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c @@ -47,8 +47,9 @@ static void __init se7343_domain_init(void) { int i; =20 - se7343_irq_domain =3D irq_domain_add_linear(NULL, SE7343_FPGA_IRQ_NR, - &irq_domain_simple_ops, NULL); + se7343_irq_domain =3D irq_domain_create_linear(NULL, SE7343_FPGA_IRQ_NR, + &irq_domain_simple_ops, + NULL); if (unlikely(!se7343_irq_domain)) { printk("Failed to get IRQ domain\n"); return; diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/772= 2/irq.c index efa96edd47dc..9a460a81907f 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c @@ -46,7 +46,7 @@ static void __init se7722_domain_init(void) { int i; =20 - se7722_irq_domain =3D irq_domain_add_linear(NULL, SE7722_FPGA_IRQ_NR, + se7722_irq_domain =3D irq_domain_create_linear(NULL, SE7722_FPGA_IRQ_NR, &irq_domain_simple_ops, NULL); if (unlikely(!se7722_irq_domain)) { printk("Failed to get IRQ domain\n"); diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3pro= to/gpio.c index f82d3a6a844a..c13d51b29702 100644 --- a/arch/sh/boards/mach-x3proto/gpio.c +++ b/arch/sh/boards/mach-x3proto/gpio.c @@ -108,7 +108,7 @@ int __init x3proto_gpio_setup(void) if (unlikely(ret)) goto err_gpio; =20 - x3proto_irq_domain =3D irq_domain_add_linear(NULL, NR_BASEBOARD_GPIOS, + x3proto_irq_domain =3D irq_domain_create_linear(NULL, NR_BASEBOARD_GPIOS, &x3proto_gpio_irq_ops, NULL); if (unlikely(!x3proto_irq_domain)) goto err_irq; diff --git a/drivers/sh/intc/irqdomain.c b/drivers/sh/intc/irqdomain.c index 3968f1c3c5c3..ed7a570ffdf2 100644 --- a/drivers/sh/intc/irqdomain.c +++ b/drivers/sh/intc/irqdomain.c @@ -59,10 +59,9 @@ void __init intc_irq_domain_init(struct intc_desc_int *d, * tree penalty for linear cases with non-zero hwirq bases. */ if (irq_base =3D=3D 0 && irq_end =3D=3D (irq_base + hw->nr_vectors - 1)) - d->domain =3D irq_domain_add_linear(NULL, hw->nr_vectors, - &intc_evt_ops, NULL); + d->domain =3D irq_domain_create_linear(NULL, hw->nr_vectors, &intc_evt_o= ps, NULL); else - d->domain =3D irq_domain_add_tree(NULL, &intc_evt_ops, NULL); + d->domain =3D irq_domain_create_tree(NULL, &intc_evt_ops, NULL); =20 BUG_ON(!d->domain); } --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D9EFE253B7B for ; Wed, 19 Mar 2025 09:32:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376756; cv=none; b=sRFEO76JfB69THPR4AgKr7BeVpbqPwI2TBmFcWrZElsk8tLz3/cO3jayzbBvY7+NTDiGr+Q6VHffu2MtORbr4TeCo+jI6V1M+aFV4zCWEcR69CCisxrv8ls0wSbH1PJ/P/2OqrmsFQ9We5xKNfzxq54aEApRPGWmBEob25HXBp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376756; c=relaxed/simple; bh=tZpnDeVQx9vLoEpc1EadaGV/CSqjQYXNqPacKZyWa1s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iDJ3yGbcDoDkOZUB+THPtbBeWJHrWGGgJb/7Y+3Yz+ze5AnhfH2oMRXyRLoXnMJQeb+HiATWTE/AKuTps8cYnmrGRJU6mNQh3SaoBiPkhkKqrRvqEI0IcGivvgNhiVtigfBuiprlvSqIMdqwDG7kPYHzCmcP+lcdhhiFngTIdrk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fhzi6EAK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fhzi6EAK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06A85C4CEEA; Wed, 19 Mar 2025 09:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376756; bh=tZpnDeVQx9vLoEpc1EadaGV/CSqjQYXNqPacKZyWa1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fhzi6EAKAbU+Illv0bvyNM6NX1pkl+9SKXofmBHz8idUGkReYwQpOqrbAKEPTF6+o Ek8eY/Ff8KqG050OFIQWfB5f4ynOn+xDNGhjCNqpgha1dIB4nXVXG58k6QIqLDL4Dg I7NeQDnX3TJyq4nxQ44AfVO1hGDZrplfToAzMZfoOnPWV5S6BIkQXTbTSK8megg/VC /M9aLJ9msOCxaTLBVpmrdb+fFzbjlc5G+Msan3e1wCfhb4+tTizcShUS95IkO/B8+5 jVovDiC55LUmoMH0DFHb+8LbblHPU4ocWsjzuLnfI0W0KdjNhd3V1AX6o6+HRt22L6 3NY+ZpFV3VYMg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Qiang Zhao , Christophe Leroy , Bjorn Andersson , Konrad Dybcio , Thierry Reding , Jonathan Hunter Subject: [PATCH v2 34/57] irqdomain: soc: Switch to irq_domain_create_*() Date: Wed, 19 Mar 2025 10:29:27 +0100 Message-ID: <20250319092951.37667-35-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: Qiang Zhao Cc: Christophe Leroy Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Christophe Leroy # For soc/fsl --- drivers/soc/dove/pmu.c | 4 ++-- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- drivers/soc/qcom/smp2p.c | 2 +- drivers/soc/qcom/smsm.c | 2 +- drivers/soc/tegra/pmc.c | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/soc/dove/pmu.c b/drivers/soc/dove/pmu.c index 6202dbcd20a8..cfc0efab27d7 100644 --- a/drivers/soc/dove/pmu.c +++ b/drivers/soc/dove/pmu.c @@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pm= u, int irq) writel(0, pmu->pmc_base + PMC_IRQ_MASK); writel(0, pmu->pmc_base + PMC_IRQ_CAUSE); =20 - domain =3D irq_domain_add_linear(pmu->of_node, NR_PMU_IRQS, - &irq_generic_chip_ops, NULL); + domain =3D irq_domain_create_linear(of_fwnode_handle(pmu->of_node), NR_PM= U_IRQS, + &irq_generic_chip_ops, NULL); if (!domain) { pr_err("%s: unable to add irq domain\n", name); return -ENOMEM; diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index bbae3d39c7be..e5831c298ad6 100644 --- a/drivers/soc/fsl/qe/qe_ic.c +++ b/drivers/soc/fsl/qe/qe_ic.c @@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev) high_handler =3D NULL; } =20 - qe_ic->irqhost =3D irq_domain_add_linear(node, NR_QE_IC_INTS, - &qe_ic_host_ops, qe_ic); + qe_ic->irqhost =3D irq_domain_create_linear(of_fwnode_handle(node), NR_QE= _IC_INTS, + &qe_ic_host_ops, qe_ic); if (qe_ic->irqhost =3D=3D NULL) { dev_err(dev, "failed to add irq domain\n"); return -ENODEV; diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c index a3e88ced328a..8c8878bc87f5 100644 --- a/drivers/soc/qcom/smp2p.c +++ b/drivers/soc/qcom/smp2p.c @@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *= smp2p, struct smp2p_entry *entry, struct device_node *node) { - entry->domain =3D irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); + entry->domain =3D irq_domain_create_linear(of_fwnode_handle(node), 32, &s= mp2p_irq_ops, entry); if (!entry->domain) { dev_err(smp2p->dev, "failed to add irq_domain\n"); return -ENOMEM; diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c index e803ea342c97..021e9d1f61dc 100644 --- a/drivers/soc/qcom/smsm.c +++ b/drivers/soc/qcom/smsm.c @@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm, return ret; } =20 - entry->domain =3D irq_domain_add_linear(node, 32, &smsm_irq_ops, entry); + entry->domain =3D irq_domain_create_linear(of_fwnode_handle(node), 32, &s= msm_irq_ops, entry); if (!entry->domain) { dev_err(smsm->dev, "failed to add irq_domain\n"); return -ENOMEM; diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 51b9d852bb6a..e0d67bfe955c 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc) pmc->irq.irq_set_type =3D pmc->soc->irq_set_type; pmc->irq.irq_set_wake =3D pmc->soc->irq_set_wake; =20 - pmc->domain =3D irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node, - &tegra_pmc_irq_domain_ops, pmc); + pmc->domain =3D irq_domain_create_hierarchy(parent, 0, 96, + of_fwnode_handle(pmc->dev->of_node), + &tegra_pmc_irq_domain_ops, pmc); if (!pmc->domain) { dev_err(pmc->dev, "failed to allocate domain\n"); return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C8C34255222; Wed, 19 Mar 2025 09:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376759; cv=none; b=oux8cJd9Zh7WHgR7ojoP1dm0rpUc0ElbMGb6XAoZSrb5Ozwn/kfeO/da57xOBpkhY/G7IXo9ceSAPU+PWsm78qGA9h4ynrZWjDIDH2bO/G145X2YlamI9fMNTLr2oYPKeDNgl2cPlX0xQ3o/3xRyTASkFd6ZOQi4OUV7XDbCcNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376759; c=relaxed/simple; bh=Vs/QmQTNg51FiGX+xS8ZOopYDNsegQ+nGM9Zf3T39vI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tLJJzl1ODeHkZAzQq06pg+VoiQpOR1CCSRkQk9n5Esj+ppExmEBFhqZG91D0nHkisbH4TJPQNZrjiQAZmx7KSHOxhNizVbIT6WJBAp5FXF7SpeJ9aEFqXrhmy0kXx6UimSdYYkqXXWDmJFVm+m+jEx99rBPKZCjSMKbXlY+7O+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lr3WF+EG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lr3WF+EG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DEECC4CEE9; Wed, 19 Mar 2025 09:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376759; bh=Vs/QmQTNg51FiGX+xS8ZOopYDNsegQ+nGM9Zf3T39vI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lr3WF+EG+jZmyODez+3Ag0Zf8+xFWxE0+o+jdNbXUypqJTMUzHcRQrpazBfjnhntl EJmkO5HWO+igXD99Xwj3IQdDko93kAReOPmUscoC2Kk68Jxp7ZFBYrvbGxf/MEtPjb s995jscfk+aqK3OwEOalHyI3P78jNSchfpEvUrI1Mn1Rq3MENrYBF/8O+0pRn8dVAO pA81d8pX8EuXSoyJd+ZknO4wlVT7xwc7yBlvUds+l1OWEiuFrWvg0oZSOiKTqWV9/4 Iet13GuIJHjsaqyqAOtlNFh6AKsKAatBE2hyYh1T85qZ0dwZigHF1kqt3ztaarKKLB T59w5kyQ5c1fw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Prasad Kumpatla , linux-sound@vger.kernel.org Subject: [PATCH v2 35/57] irqdomain: sound: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:28 +0100 Message-ID: <20250319092951.37667-36-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Prasad Kumpatla Cc: linux-sound@vger.kernel.org --- sound/soc/codecs/wcd937x.c | 2 +- sound/soc/codecs/wcd938x.c | 2 +- sound/soc/codecs/wcd939x.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd937x.c b/sound/soc/codecs/wcd937x.c index ff8bb01edf42..dd2045a5d26d 100644 --- a/sound/soc/codecs/wcd937x.c +++ b/sound/soc/codecs/wcd937x.c @@ -2480,7 +2480,7 @@ static const struct irq_domain_ops wcd_domain_ops =3D= { =20 static int wcd937x_irq_init(struct wcd937x_priv *wcd, struct device *dev) { - wcd->virq =3D irq_domain_add_linear(NULL, 1, &wcd_domain_ops, NULL); + wcd->virq =3D irq_domain_create_linear(NULL, 1, &wcd_domain_ops, NULL); if (!(wcd->virq)) { dev_err(dev, "%s: Failed to add IRQ domain\n", __func__); return -EINVAL; diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index b536e8bdc5a7..1ae498c32391 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3025,7 +3025,7 @@ static const struct irq_domain_ops wcd_domain_ops =3D= { static int wcd938x_irq_init(struct wcd938x_priv *wcd, struct device *dev) { =20 - wcd->virq =3D irq_domain_add_linear(NULL, 1, &wcd_domain_ops, NULL); + wcd->virq =3D irq_domain_create_linear(NULL, 1, &wcd_domain_ops, NULL); if (!(wcd->virq)) { dev_err(dev, "%s: Failed to add IRQ domain\n", __func__); return -EINVAL; diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c index 4a417a92514d..0a87a79772da 100644 --- a/sound/soc/codecs/wcd939x.c +++ b/sound/soc/codecs/wcd939x.c @@ -2975,7 +2975,7 @@ static const struct irq_domain_ops wcd_domain_ops =3D= { =20 static int wcd939x_irq_init(struct wcd939x_priv *wcd, struct device *dev) { - wcd->virq =3D irq_domain_add_linear(NULL, 1, &wcd_domain_ops, NULL); + wcd->virq =3D irq_domain_create_linear(NULL, 1, &wcd_domain_ops, NULL); if (!(wcd->virq)) { dev_err(dev, "%s: Failed to add IRQ domain\n", __func__); return -EINVAL; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 250F1253B7E for ; Wed, 19 Mar 2025 09:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376761; cv=none; b=Y6Sswn4SUc4xUwy84b50Pisa071jaFuqtKS7W17Xls4OT4cXKa7he8MFWkV31B0WE+1Di+gvRlKVSlJQYWDZqCPIlt5e03qnZJoE0Sbk5Qq5n+a0M8DH+aHRYu7YDbg1L5JM29JkNi5sDoSTNCTmTUo5OP988E5And1MST9DIHo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376761; c=relaxed/simple; bh=Z4yA1AHEAaUKQTQ9BXveXhf762g+/LA8fFsPbfITlKc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CN0r2/dZtRRLanvuC93bQdlJoPJrNrQviCgxcmlExGqpV39vVHTxZA7rdeRhm5u01+icFbe1xrtk1xqguPYvNpHq2QQ0QuUOOQxHTwJtvTSwgmwMs5hVRJ2sA3wUpquVYfpuYCgALgZUY1zvPCaHgbTav/B1vUGZ0uyhLZQjsK4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZrGAUEN5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZrGAUEN5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3642C4CEEA; Wed, 19 Mar 2025 09:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376761; bh=Z4yA1AHEAaUKQTQ9BXveXhf762g+/LA8fFsPbfITlKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZrGAUEN5HcUy65VXgldOPlWfqb6WG81/8lH0a2Yf9OqO4fnKf88SivWBkT/9ihpuq 8azJwwfTClHTpKfa90hChUNJPZWmsx5aq4V50wfdrTOjJYOPez+kk9bOiPC07AWGaP 1BWNNh+xj9RJfhUF8UfEtY5GfRHYXTNtbItwsaV/6y7w7JvlXHp/GTJQa2AYq4lsmI b3ja0kZ8PpS/mNc2Y+t31CeUjV0I0tdiLGTyMTKv8ROOENnDeqKWM3PZ2GpEqs0KqD iVOHaws8+ENGuvem2NYPVGP5+iHkDlzi9qrFLZz5eD8fXkfKtbL363PvpihgSYsFDv LRBMsm7OE8fxA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Stephen Boyd Subject: [PATCH v2 36/57] irqdomain: spmi: Switch to irq_domain_create_tree() Date: Wed, 19 Mar 2025 10:29:29 +0100 Message-ID: <20250319092951.37667-37-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Stephen Boyd --- drivers/spmi/spmi-pmic-arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index 5c058db21821..91581974ef84 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -1737,7 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_dev= ice *pdev, =20 dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index); =20 - bus->domain =3D irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus); + bus->domain =3D irq_domain_create_tree(of_fwnode_handle(node), &pmic_arb_= irq_domain_ops, bus); if (!bus->domain) { dev_err(&pdev->dev, "unable to create irq_domain\n"); return -ENOMEM; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 09FA425CC79; Wed, 19 Mar 2025 09:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376763; cv=none; b=Qhog3H4Y46bM109sRIjBP9Srf3DdwyQpW6EOaXL/AD1z8isc8nTazZvJ9xrcUDWcKVcX5Zt+nZLKWfaHMotnW/cYNmfwSW9LRDNuJXg82RCVqSef5Wt/bQkoJ29baK41YN6kcX2Y/gHEik9/PZXkyLrKv2AgQruSMp56Ks1nIRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376763; c=relaxed/simple; bh=3+LjMAEuzeNpxJR5cfAVgsh9YroO0Rsedf62LqvRaUg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ONNO6BMoe792LduNy0MUQ1ey9j5F2iAlYE1scJsWLwm1OQ8UV0qHW57higuAO+8uuxshlR5VOq8kMGMnrpgjPxYDmWODGe0fKFHJb6YMT4qtWjD+buXAFAGmr8poE/LFmL9tQjZ7J4jwzFgo45dKjdmPi/Hj5dJamJ54Z5rhJrc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GGPr3Qrz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GGPr3Qrz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78EE7C4CEE9; Wed, 19 Mar 2025 09:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376762; bh=3+LjMAEuzeNpxJR5cfAVgsh9YroO0Rsedf62LqvRaUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GGPr3QrzDCb9Fe5F15fDm5RZeShUvuU4ui4BHnHwAojHYMsGhwD2nPaX/Y71s489V BWoTsr17j7JlbeEduoU5BNyVFL48Crqyx+FRQM2hqNVEIZN8aXmareKjZut5DtpzEn pypCM37GsXrYJPNjMmhL5PVKIMEue+9yY3keQc9OVVT09XsdPPDG1oeYXLEJ/cMZIP Z4hIEG+CMMWIRKpPeruIcpyTOjsUiuJZZ33+mLhB8s0+XM2TzWH4d643e+wTtS6VOc boMtlRXsX9tgOiiPF9w+BXvGvgVOp2iOzIcli0HRlntz8lAMjEgJO74XV/WuOgnhDC BkI/YzFEQCYXA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Michael Buesch , linux-wireless@vger.kernel.org Subject: [PATCH v2 37/57] irqdomain: ssb: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:30 +0100 Message-ID: <20250319092951.37667-38-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Michael Buesch Cc: linux-wireless@vger.kernel.org --- drivers/ssb/driver_gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ssb/driver_gpio.c b/drivers/ssb/driver_gpio.c index 897cb8db5084..f9426a586653 100644 --- a/drivers/ssb/driver_gpio.c +++ b/drivers/ssb/driver_gpio.c @@ -148,8 +148,8 @@ static int ssb_gpio_irq_chipco_domain_init(struct ssb_b= us *bus) if (bus->bustype !=3D SSB_BUSTYPE_SSB) return 0; =20 - bus->irq_domain =3D irq_domain_add_linear(NULL, chip->ngpio, - &irq_domain_simple_ops, chipco); + bus->irq_domain =3D irq_domain_create_linear(NULL, chip->ngpio, &irq_doma= in_simple_ops, + chipco); if (!bus->irq_domain) { err =3D -ENODEV; goto err_irq_domain; @@ -347,8 +347,8 @@ static int ssb_gpio_irq_extif_domain_init(struct ssb_bu= s *bus) if (bus->bustype !=3D SSB_BUSTYPE_SSB) return 0; =20 - bus->irq_domain =3D irq_domain_add_linear(NULL, chip->ngpio, - &irq_domain_simple_ops, extif); + bus->irq_domain =3D irq_domain_create_linear(NULL, chip->ngpio, &irq_doma= in_simple_ops, + extif); if (!bus->irq_domain) { err =3D -ENODEV; goto err_irq_domain; --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5967325523F for ; Wed, 19 Mar 2025 09:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376767; cv=none; b=o6L0CZ5/NJgf2n1SnpLWhg4QTQhRO0QIlktBaCn6Hn961kLlfxHoQEnLzuccm/qXNRS/vZaGajX6eSydCbwzOFqbvycqqS7yU5V+jgqHCCWahXzEg/++ao6vdjV2shH+3/ISU+V8r+pddBnKoc3odyrThiHnxWq9ldezGJT2bR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376767; c=relaxed/simple; bh=gyEWu07dvJTaObjS4W75J1syxJG8BbEtWYsDPPpR630=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=syQDjLI5qP6njD3XIJpRjEL9O6OEI4j946dPnrtEeTbpHGSi7FDoDWu3G5Ksg1/5s5+gXbyrA+GwCGd+7aOr9IqJZP2iPSHw1z6Zw/yTRJZh/QFhobbBDTd9cZCXeBLZAcRiM53bQU45ioRA8325WTjSZTP1W0F55QhC689AJpo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QUx3Q2w1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QUx3Q2w1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A73CC4CEE9; Wed, 19 Mar 2025 09:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376765; bh=gyEWu07dvJTaObjS4W75J1syxJG8BbEtWYsDPPpR630=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QUx3Q2w1Awz+kZNKlePLdrewm550hrP1tQ8Qngc4cBHBZym1CPkJWHThbaWWO2Py4 GIBIKuNO0JoXv2hvvcrEQBPnlSZI29Ow8toDvq/znAmYXlrvII1ppds3GNWoazebIi IXNm3TbqXpebRS3hcDaJq0UvjXPGKz2h9aZ6rVfB0rocWv2tHvSyIqWZwpGN70T0oC 2Dti6NDZ7O+kRVkl2dKopVIm+7MUfpOCDnmpFdl1wGpMcGAL2z5c3EsUifo4Mqsob8 NhFX1YHgIltd0SFcVyhoIONhF0uS+mKjIpmKuP7SjktFmYbsdDbRfB2c3xGlM/N8Pa hUecIlpAIvBDw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Thierry Reding , Jonathan Hunter Subject: [PATCH v2 38/57] irqdomain: thermal: Switch to irq_domain_create_linear() Date: Wed, 19 Mar 2025 10:29:31 +0100 Message-ID: <20250319092951.37667-39-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_domain_add_linear() is going away as being obsolete now. Switch to the preferred irq_domain_create_linear(). That differs in the first parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). Signed-off-by: Jiri Slaby (SUSE) Cc: Amit Kucheria Cc: Thara Gopinath Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Zhang Rui Cc: Lukasz Luba Cc: Thierry Reding Cc: Jonathan Hunter --- drivers/thermal/qcom/lmh.c | 3 ++- drivers/thermal/tegra/soctherm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/lmh.c b/drivers/thermal/qcom/lmh.c index d2d49264cf83..991d1573983d 100644 --- a/drivers/thermal/qcom/lmh.c +++ b/drivers/thermal/qcom/lmh.c @@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev) } =20 lmh_data->irq =3D platform_get_irq(pdev, 0); - lmh_data->domain =3D irq_domain_add_linear(np, 1, &lmh_irq_ops, lmh_data); + lmh_data->domain =3D irq_domain_create_linear(of_fwnode_handle(np), 1, &l= mh_irq_ops, + lmh_data); if (!lmh_data->domain) { dev_err(dev, "Error adding irq_domain\n"); return -EINVAL; diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/socth= erm.c index 2c5ddf0db40c..926f1052e6de 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *n= p, int num_irqs) soc_irq_cdata.irq_chip.irq_set_type =3D soctherm_oc_irq_set_type; soc_irq_cdata.irq_chip.irq_set_wake =3D NULL; =20 - soc_irq_cdata.domain =3D irq_domain_add_linear(np, num_irqs, + soc_irq_cdata.domain =3D irq_domain_create_linear(of_fwnode_handle(np), n= um_irqs, &soctherm_oc_domain_ops, &soc_irq_cdata); =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AB13225D1EE; Wed, 19 Mar 2025 09:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376769; cv=none; b=Ryv/wddjAzQiDy+YxMXKzdKBI4WCcSo6bktPJEMA/kOhh6wmsCvb7JLj1Rw40X4Be1uozSU7LvgoMVd1M5raRrO07fYA1b6Xlj5CgfdIwwuye8BJX3ALz6dPMVTIg/JMYYaQkXt3A7ORumy8Ej1GPBiyjArfafBfkeQDmg1s4+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376769; c=relaxed/simple; bh=X8wudJPii2FdSLgylneYrvJlLDA9ojvTW0l/YVqFwHE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MqBBzDJmlw1ZxJpi/UuUpl9qDKZfwU2mkciXMgfDw5DtUDbnGt5bwwbqhpdPy7tspnxN0BXPjCdxqB55SoZejYIqaQsxb6HFolppwJKT17sboAD8dZMLAQTcTCTJXURotnDY4qnX+LgHprm+oSqQnRvrPomysfiWC+wA1mjOjr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WA23J/ew; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WA23J/ew" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54191C4CEEA; Wed, 19 Mar 2025 09:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376769; bh=X8wudJPii2FdSLgylneYrvJlLDA9ojvTW0l/YVqFwHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WA23J/ew5erlnbkD8lMQ/orw9PaZX4ufHQyXg/QR7SfKTRRWVBBeM4N12tcYBpvzS 98CjAsimJH+LuRMhGZWqQ6O01+GNGScujWglkOFG0DvhOqpq7RfR/ly5b7VL00IHil UXqMwW3/6YRiV5d0ETYoKj+C0VTg6EbVBUent8d2Ym4fdievKjLAz3cpycGaok+X7A 4bhYKwXMnNuOhbIkaZ4JiS1EbMej3FnFf0F0qPOBVJO1LNf35pmbFPm2CXKvGY1cMU 3fPKYgeZfpLa+vyspFvtbVmvKSJzZjEPyHihzaOj7S8M5AKwmwEgYzd1Ja4MBKfR1u 8vHS8lwsGx1wg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Alex Shi , Yanteng Si , Dongliang Mu , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Geoff Levand , linuxppc-dev@lists.ozlabs.org, Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH v2 39/57] irqdomain: ppc: Switch irq_domain_add_nomap() to use fwnode Date: Wed, 19 Mar 2025 10:29:32 +0100 Message-ID: <20250319092951.37667-40-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable All irq_domain_add_*() functions are going away. PowerPC is the only user of irq_domain_add_nomap() and there is no irq_domain_create_nomap() complement. Therefore, to align with the rest of kernel, rename irq_domain_add_nomap() to irq_domain_create_nomap() and accept fwnode_handle instead of device_node. Signed-off-by: Jiri Slaby (SUSE) Cc: Alex Shi Cc: Yanteng Si Cc: Dongliang Mu Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/core-api/irq/irq-domain.rst | 2 +- Documentation/translations/zh_CN/core-api/irq/irq-domain.rst | 2 +- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/ps3/interrupt.c | 2 +- include/linux/irqdomain.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index f88a6ee67a35..44f4ba5480df 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -141,7 +141,7 @@ No Map =20 :: =20 - irq_domain_add_nomap() + irq_domain_create_nomap() =20 The No Map mapping is to be used when the hwirq number is programmable in the hardware. In this case it is best to program the diff --git a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst b= /Documentation/translations/zh_CN/core-api/irq/irq-domain.rst index 9174fce12c1b..ecb23cfbc9fc 100644 --- a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +++ b/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst @@ -124,7 +124,7 @@ irq_domain_add_tree()=E5=92=8Cirq_domain_create_tree()= =E5=9C=A8=E5=8A=9F=E8=83=BD=E4=B8=8A=E6=98=AF=E7=AD=89=E4=BB=B7=E7=9A=84=EF= =BC=8C=E9=99=A4 =20 :: =20 - irq_domain_add_nomap() + irq_domain_create_nomap() =20 =E5=BD=93=E7=A1=AC=E4=BB=B6=E4=B8=AD=E7=9A=84hwirq=E5=8F=B7=E6=98=AF=E5=8F= =AF=E7=BC=96=E7=A8=8B=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=B0=B1=E5=8F=AF= =E4=BB=A5=E9=87=87=E7=94=A8=E6=97=A0=E6=98=A0=E5=B0=84=E7=B1=BB=E5=9E=8B=E3= =80=82 =E5=9C=A8=E8=BF=99=E7=A7=8D=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E6= =9C=80=E5=A5=BD=E5=B0=86 Linux IRQ=E5=8F=B7=E7=BC=96=E5=85=A5=E7=A1=AC=E4=BB=B6=E6=9C=AC=E8=BA=AB= =EF=BC=8C=E8=BF=99=E6=A0=B7=E5=B0=B1=E4=B8=8D=E9=9C=80=E8=A6=81=E6=98=A0=E5= =B0=84=E4=BA=86=E3=80=82 =E8=B0=83=E7=94=A8irq_create_direct_mapping() diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms= /powermac/smp.c index 09e7fe24fac1..88e92af8acf9 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -190,7 +190,7 @@ static int __init psurge_secondary_ipi_init(void) { int rc =3D -ENOMEM; =20 - psurge_host =3D irq_domain_add_nomap(NULL, ~0, &psurge_host_ops, NULL); + psurge_host =3D irq_domain_create_nomap(NULL, ~0, &psurge_host_ops, NULL); =20 if (psurge_host) psurge_secondary_virq =3D irq_create_direct_mapping(psurge_host); diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platform= s/ps3/interrupt.c index 95e96bd61a20..a4ad4b49eef7 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c @@ -743,7 +743,7 @@ void __init ps3_init_IRQ(void) unsigned cpu; struct irq_domain *host; =20 - host =3D irq_domain_add_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, NULL= ); + host =3D irq_domain_create_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, N= ULL); irq_set_default_domain(host); =20 for_each_possible_cpu(cpu) { diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 1480951a690b..984d0188f9ec 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -431,13 +431,13 @@ static inline struct irq_domain *irq_domain_add_linea= r(struct device_node *of_no } =20 #ifdef CONFIG_IRQ_DOMAIN_NOMAP -static inline struct irq_domain *irq_domain_add_nomap(struct device_node *= of_node, +static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_han= dle *fwnode, unsigned int max_irq, const struct irq_domain_ops *ops, void *host_data) { struct irq_domain_info info =3D { - .fwnode =3D of_fwnode_handle(of_node), + .fwnode =3D fwnode, .hwirq_max =3D max_irq, .direct_max =3D max_irq, .ops =3D ops, --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1F75125D207; Wed, 19 Mar 2025 09:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376772; cv=none; b=OIi2yiSxsXtwYd3E0+vuiYYOxDyI61kiR7FnPfQXw22/m+7WqoU1YYRv2V9CAleGWxTg9EVhliMnhBNoHMWUKP/RNoRDBf6SITTY5p8HlM6Jx4MkvTDUcgK7E/4Ij75ZfqUEY3tL2LB2RUQtrFciBJxXDCZp90qfUc1wVpH4Vn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376772; c=relaxed/simple; bh=K/R8g9zziIqCOE4/MMgWNVtoTA9qMBHKAn0Fn7NrtC8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rrzD9KtxFcOPyFiLmmR+XIoakXeWvCKRp5B0lugKKy+t1lf5baM/Lq6aeYPJbNipKFjZzQSeLtdv/KJYQ/YrDsuto61LwqiMExpH8C0fSw1d8nFBnZ3++SEPj+smA02nkmoUdCPbUGnWHRkUqB8WTmUUDzufI1vyfxyzDR3fxOA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A4apbBLG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A4apbBLG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AE62C4CEE9; Wed, 19 Mar 2025 09:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376772; bh=K/R8g9zziIqCOE4/MMgWNVtoTA9qMBHKAn0Fn7NrtC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4apbBLGGm5DKjd+jiJh4zvU0miW5I2qnUr6l3TNOFZLKGxpTvu5FB+VOSK191CW7 BrAK8ZC7t0L1qtfPNOExO9bVkDG9wOvgD1LlJHf5uHsiNU7OZb05mvusU8reXaOb01 iInuXXvVF0IfDso4YI78Sv5IiyaTW9dT3nE1jHwK1VLBXoxZNkodWv5l4lzVLzXpIo lAYvoKkkwbmPLl1Igrz6HgsFRPkCmi5cZoKVcaypTxDgBv7rjTuZvT6t/13R9D7eiG u608rY57uEhzTZOzBBB/ZCpB5hszN9q+B0RMB2+z/D9jHZ+EGxN0TUDzhUSwJ/t1ST KtYAQ9ovSzM2A== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Alex Shi , Yanteng Si , Dongliang Mu , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH v2 40/57] irqdomain: Drop irq_domain_add_*() functions Date: Wed, 19 Mar 2025 10:29:33 +0100 Message-ID: <20250319092951.37667-41-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_domain_add_*() functions are unused now, so drop them. Note: The Chinese docs are touched but unfinished. I cannot parse those. Signed-off-by: Jiri Slaby (SUSE) Cc: Alex Shi Cc: Yanteng Si Cc: Dongliang Mu Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/core-api/irq/irq-domain.rst | 34 ++-------- .../zh_CN/core-api/irq/irq-domain.rst | 4 -- include/linux/irqdomain.h | 68 ------------------- kernel/irq/irqdomain.c | 27 -------- 4 files changed, 7 insertions(+), 126 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index 44f4ba5480df..e26ed303819d 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -92,7 +92,6 @@ Linear =20 :: =20 - irq_domain_add_linear() irq_domain_create_linear() =20 The linear reverse map maintains a fixed size table indexed by the @@ -105,11 +104,6 @@ map are fixed time lookup for IRQ numbers, and irq_des= cs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. =20 -irq_domain_add_linear() and irq_domain_create_linear() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - The majority of drivers should use the linear map. =20 Tree @@ -117,7 +111,6 @@ Tree =20 :: =20 - irq_domain_add_tree() irq_domain_create_tree() =20 The irq_domain maintains a radix tree map from hwirq numbers to Linux @@ -129,11 +122,6 @@ since it doesn't need to allocate a table as large as = the largest hwirq number. The disadvantage is that hwirq to IRQ number lookup is dependent on how many entries are in the table. =20 -irq_domain_add_tree() and irq_domain_create_tree() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - Very few drivers should need this mapping. =20 No Map @@ -159,8 +147,6 @@ Legacy =20 :: =20 - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy() =20 @@ -189,13 +175,13 @@ supported. For example, ISA controllers would use th= e legacy map for mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ numbers. =20 -Most users of legacy mappings should use irq_domain_add_simple() or -irq_domain_create_simple() which will use a legacy domain only if an IRQ r= ange -is supplied by the system and will otherwise use a linear domain mapping. -The semantics of this call are such that if an IRQ range is specified then -descriptors will be allocated on-the-fly for it, and if no range is -specified it will fall through to irq_domain_add_linear() or -irq_domain_create_linear() which means *no* irq descriptors will be alloca= ted. +Most users of legacy mappings should use irq_domain_create_simple() +which will use a legacy domain only if an IRQ range is supplied by the +system and will otherwise use a linear domain mapping. The semantics of +this call are such that if an IRQ range is specified then descriptors +will be allocated on-the-fly for it, and if no range is specified it +will fall through to irq_domain_create_linear() which means *no* irq +descriptors will be allocated. =20 A typical use case for simple domains is where an irqchip provider is supporting both dynamic and static IRQ assignments. @@ -206,12 +192,6 @@ that the driver using the simple domain call irq_creat= e_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. =20 -irq_domain_add_simple() and irq_domain_create_simple() as well as -irq_domain_add_legacy() and irq_domain_create_legacy() are functionally -equivalent, except for the first argument is different - the former -accepts an Open Firmware specific 'struct device_node', while the latter -accepts a more general abstraction 'struct fwnode_handle'. - Hierarchy IRQ domain -------------------- =20 diff --git a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst b= /Documentation/translations/zh_CN/core-api/irq/irq-domain.rst index ecb23cfbc9fc..913c3eda3f74 100644 --- a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +++ b/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst @@ -83,7 +83,6 @@ irq_domain=E6=98=A0=E5=B0=84=E7=9A=84=E7=B1=BB=E5=9E=8B =20 :: =20 - irq_domain_add_linear() irq_domain_create_linear() =20 =E7=BA=BF=E6=80=A7=E5=8F=8D=E5=90=91=E6=98=A0=E5=B0=84=E7=BB=B4=E6=8A=A4= =E4=BA=86=E4=B8=80=E4=B8=AA=E5=9B=BA=E5=AE=9A=E5=A4=A7=E5=B0=8F=E7=9A=84=E8= =A1=A8=EF=BC=8C=E8=AF=A5=E8=A1=A8=E4=BB=A5hwirq=E5=8F=B7=E4=B8=BA=E7=B4=A2= =E5=BC=95=E3=80=82 =E5=BD=93=E4=B8=80=E4=B8=AAhwirq=E8=A2=AB=E6=98=A0=E5=B0= =84 @@ -104,7 +103,6 @@ irq_domain_add_linear()=E5=92=8Cirq_domain_create_linea= r()=E5=9C=A8=E5=8A=9F=E8=83=BD=E4=B8=8A=E6=98=AF=E7=AD=89=E4=BB=B7=E7=9A=84= =EF=BC=8C =20 :: =20 - irq_domain_add_tree() irq_domain_create_tree() =20 irq_domain=E7=BB=B4=E6=8A=A4=E7=9D=80=E4=BB=8Ehwirq=E5=8F=B7=E5=88=B0Linux= IRQ=E7=9A=84radix=E7=9A=84=E6=A0=91=E7=8A=B6=E6=98=A0=E5=B0=84=E3=80=82 = =E5=BD=93=E4=B8=80=E4=B8=AAhwirq=E8=A2=AB=E6=98=A0=E5=B0=84=E6=97=B6=EF=BC= =8C @@ -138,8 +136,6 @@ Linux IRQ=E5=8F=B7=E7=BC=96=E5=85=A5=E7=A1=AC=E4=BB=B6= =E6=9C=AC=E8=BA=AB=EF=BC=8C=E8=BF=99=E6=A0=B7=E5=B0=B1=E4=B8=8D=E9=9C=80=E8= =A6=81=E6=98=A0=E5=B0=84=E4=BA=86=E3=80=82 =E8=B0=83=E7=94=A8irq_create =20 :: =20 - irq_domain_add_simple() - irq_domain_add_legacy() irq_domain_create_simple() irq_domain_create_legacy() =20 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 984d0188f9ec..bd02550df6e6 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -338,12 +338,6 @@ struct irq_domain *irq_domain_create_simple(struct fwn= ode_handle *fwnode, unsigned int first_irq, const struct irq_domain_ops *ops, void *host_data); -struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, - unsigned int size, - unsigned int first_irq, - irq_hw_number_t first_hwirq, - const struct irq_domain_ops *ops, - void *host_data); struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, unsigned int size, unsigned int first_irq, @@ -396,40 +390,6 @@ static inline struct irq_domain *irq_find_host(struct = device_node *node) return d; } =20 -static inline struct irq_domain *irq_domain_add_simple(struct device_node = *of_node, - unsigned int size, - unsigned int first_irq, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_simple(of_fwnode_handle(of_node), size, first_ir= q, ops, host_data); -} - -/** - * irq_domain_add_linear() - Allocate and register a linear revmap irq_dom= ain. - * @of_node: pointer to interrupt controller's device tree node. - * @size: Number of interrupts in the domain. - * @ops: map/unmap domain callbacks - * @host_data: Controller private data pointer - */ -static inline struct irq_domain *irq_domain_add_linear(struct device_node = *of_node, - unsigned int size, - const struct irq_domain_ops *ops, - void *host_data) -{ - struct irq_domain_info info =3D { - .fwnode =3D of_fwnode_handle(of_node), - .size =3D size, - .hwirq_max =3D size, - .ops =3D ops, - .host_data =3D host_data, - }; - struct irq_domain *d; - - d =3D irq_domain_instantiate(&info); - return IS_ERR(d) ? NULL : d; -} - #ifdef CONFIG_IRQ_DOMAIN_NOMAP static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_han= dle *fwnode, unsigned int max_irq, @@ -452,22 +412,6 @@ static inline struct irq_domain *irq_domain_create_nom= ap(struct fwnode_handle *f unsigned int irq_create_direct_mapping(struct irq_domain *domain); #endif =20 -static inline struct irq_domain *irq_domain_add_tree(struct device_node *o= f_node, - const struct irq_domain_ops *ops, - void *host_data) -{ - struct irq_domain_info info =3D { - .fwnode =3D of_fwnode_handle(of_node), - .hwirq_max =3D ~0U, - .ops =3D ops, - .host_data =3D host_data, - }; - struct irq_domain *d; - - d =3D irq_domain_instantiate(&info); - return IS_ERR(d) ? NULL : d; -} - static inline struct irq_domain *irq_domain_create_linear(struct fwnode_ha= ndle *fwnode, unsigned int size, const struct irq_domain_ops *ops, @@ -631,18 +575,6 @@ static inline struct irq_domain *irq_domain_create_hie= rarchy(struct irq_domain * return IS_ERR(d) ? NULL : d; } =20 -static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domai= n *parent, - unsigned int flags, - unsigned int size, - struct device_node *node, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_hierarchy(parent, flags, size, - of_fwnode_handle(node), - ops, host_data); -} - int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, unsigned int nr_irqs, int node, void *arg, bool realloc, diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index b5e111776285..5bb3d2bbe229 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -480,33 +480,6 @@ struct irq_domain *irq_domain_create_simple(struct fwn= ode_handle *fwnode, } EXPORT_SYMBOL_GPL(irq_domain_create_simple); =20 -/** - * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_dom= ain. - * @of_node: pointer to interrupt controller's device tree node. - * @size: total number of irqs in legacy mapping - * @first_irq: first number of irq block assigned to the domain - * @first_hwirq: first hwirq number to use for the translation. Should nor= mally - * be '0', but a positive integer can be used if the effecti= ve - * hwirqs numbering does not begin at zero. - * @ops: map/unmap domain callbacks - * @host_data: Controller private data pointer - * - * Note: the map() callback will be called before this function returns - * for all legacy interrupts except 0 (which is always the invalid irq for - * a legacy controller). - */ -struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, - unsigned int size, - unsigned int first_irq, - irq_hw_number_t first_hwirq, - const struct irq_domain_ops *ops, - void *host_data) -{ - return irq_domain_create_legacy(of_fwnode_handle(of_node), size, - first_irq, first_hwirq, ops, host_data); -} -EXPORT_SYMBOL_GPL(irq_domain_add_legacy); - struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, unsigned int size, unsigned int first_irq, --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 81A8F25D524 for ; Wed, 19 Mar 2025 09:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376775; cv=none; b=DM75txdaZ7IXKMswKmLJ8mUO3s5h/NwMeadU/SjIL7eOi7Ayy+o0GiJtNNeiKCHIfPOIUkMbbSInFV9xJnMZ6JSr6gmmxIzjL1lKyFjBbMar1F7DZlO/ZWrpi+LAD6umKQPpYKGHFCUMVjAReGZB2oJFw1kzp8IcndKLz6zRUu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376775; c=relaxed/simple; bh=q0CtEVEnX5ghZOe+vZqS1MAlr1PiOyJRa5w1mbdMfKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CACLwjwzjasahB9Bm2x8FD6j1JqVuY4kogl23+n6e/YWkMNLXR5fZAZMDp9PffrcPxaUCbntPvSHeJkT5GDrOl97rYrl/U8mmaZlIcfeZpz4GSXNKjImG38VxnMmbORlF6SS45ePBbr9RrjGkHgENB0kGY0WCxY53irHNVHkLlU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uVbtZXqR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uVbtZXqR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73014C4CEEE; Wed, 19 Mar 2025 09:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376775; bh=q0CtEVEnX5ghZOe+vZqS1MAlr1PiOyJRa5w1mbdMfKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uVbtZXqRyrnesm2hO5Bim+Wzu4kAxHm4MAd3fJPLh2Jco3wxi+tYeaXFCB0pbVk1I X6D4u5K+Edq0JtVgFGpEiWS4/d6p6uzaApQCbJ+eYCJWhE0CqEL+UJ0ZSG+UYoJIkF nO9i5qId/q3rjokbArxSjwfLRrPdI8+2hTldnVvLJMOY2soWXTapBq7otWaEszABu4 Y3IUCaobJd7Ub660pj91wH5TjOYwErfFVfh/46DrEL2gryU4CiemD9OQvFwTTd++SN PL/M1/kzEMaSxfOMW/YHOIPa37S1be9CvlcOWGTb2ww25uU1iyBLH1yOGEhaj/7xzT clbC83Esbc8qQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Anatolij Gustschin , Scott Wood , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 41/57] irqdomain: ppc: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:34 +0100 Message-ID: <20250319092951.37667-42-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N Rao Cc: Anatolij Gustschin Cc: Scott Wood Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Christophe Leroy # for 8xx --- arch/powerpc/platforms/44x/uic.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 2 +- arch/powerpc/platforms/8xx/cpm1-ic.c | 2 +- arch/powerpc/platforms/8xx/pic.c | 2 +- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/powermac/pic.c | 2 +- arch/powerpc/sysdev/cpm2_pic.c | 2 +- arch/powerpc/sysdev/ehv_pic.c | 2 +- arch/powerpc/sysdev/ge/ge_pic.c | 2 +- arch/powerpc/sysdev/ipic.c | 2 +- arch/powerpc/sysdev/mpic.c | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/platforms/44x/uic.c b/arch/powerpc/platforms/44x/= uic.c index 481ec25ce78f..85daf841fd3f 100644 --- a/arch/powerpc/platforms/44x/uic.c +++ b/arch/powerpc/platforms/44x/uic.c @@ -328,5 +328,5 @@ unsigned int uic_get_irq(void) msr =3D mfdcr(primary_uic->dcrbase + UIC_MSR); src =3D 32 - ffs(msr); =20 - return irq_linear_revmap(primary_uic->irqhost, src); + return irq_find_mapping(primary_uic->irqhost, src); } diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platf= orms/52xx/mpc52xx_gpt.c index f042b21b2b73..3dbe5a5e5d1f 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c @@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq) mutex_lock(&mpc52xx_gpt_list_mutex); list_for_each(pos, &mpc52xx_gpt_list) { gpt =3D container_of(pos, struct mpc52xx_gpt_priv, list); - if (gpt->irqhost && irq =3D=3D irq_linear_revmap(gpt->irqhost, 0)) { + if (gpt->irqhost && irq =3D=3D irq_find_mapping(gpt->irqhost, 0)) { mutex_unlock(&mpc52xx_gpt_list_mutex); return gpt; } diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platf= orms/52xx/mpc52xx_pic.c index 7ec56d3788a9..eb6a4e745c08 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c @@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void) return 0; } =20 - return irq_linear_revmap(mpc52xx_irqhost, irq); + return irq_find_mapping(mpc52xx_irqhost, irq); } diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc= /platforms/85xx/socrates_fpga_pic.c index b4f6360830b1..4b69fb321a68 100644 --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c @@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsi= gned int irq) if (cause >> (i + 16)) break; } - return irq_linear_revmap(socrates_fpga_pic_irq_host, + return irq_find_mapping(socrates_fpga_pic_irq_host, (irq_hw_number_t)i); } =20 diff --git a/arch/powerpc/platforms/8xx/cpm1-ic.c b/arch/powerpc/platforms/= 8xx/cpm1-ic.c index 1549f6cd29f4..a49d4a9ab3bc 100644 --- a/arch/powerpc/platforms/8xx/cpm1-ic.c +++ b/arch/powerpc/platforms/8xx/cpm1-ic.c @@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc) cpm_vec =3D in_be16(&data->reg->cpic_civr); cpm_vec >>=3D 11; =20 - return irq_linear_revmap(data->host, cpm_vec); + return irq_find_mapping(data->host, cpm_vec); } =20 static void cpm_cascade(struct irq_desc *desc) diff --git a/arch/powerpc/platforms/8xx/pic.c b/arch/powerpc/platforms/8xx/= pic.c index 7639f28172be..933d6ab7f512 100644 --- a/arch/powerpc/platforms/8xx/pic.c +++ b/arch/powerpc/platforms/8xx/pic.c @@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void) if (irq =3D=3D PIC_VEC_SPURRIOUS) return 0; =20 - return irq_linear_revmap(mpc8xx_pic_host, irq); + return irq_find_mapping(mpc8xx_pic_host, irq); =20 } =20 diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerp= c/platforms/embedded6xx/flipper-pic.c index a41649bf0cb8..91a8f0a7086e 100644 --- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c +++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c @@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void) return 0; /* no more IRQs pending */ =20 irq =3D __ffs(irq_status); - return irq_linear_revmap(flipper_irq_host, irq); + return irq_find_mapping(flipper_irq_host, irq); } =20 /* diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/p= latforms/embedded6xx/hlwd-pic.c index 9abb3da36ba5..b57e87b0b3ce 100644 --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c @@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct d= evice_node *np) unsigned int hlwd_pic_get_irq(void) { unsigned int hwirq =3D __hlwd_pic_get_irq(hlwd_irq_host); - return hwirq ? irq_linear_revmap(hlwd_irq_host, hwirq) : 0; + return hwirq ? irq_find_mapping(hlwd_irq_host, hwirq) : 0; } =20 /* diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms= /powermac/pic.c index 2eddc8bff7ab..c37783a03d25 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void) raw_spin_unlock_irqrestore(&pmac_pic_lock, flags); if (unlikely(irq < 0)) return 0; - return irq_linear_revmap(pmac_pic_host, irq); + return irq_find_mapping(pmac_pic_host, irq); } =20 static int pmac_pic_host_match(struct irq_domain *h, struct device_node *n= ode, diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index c63d72f17a3e..4a59ed1d62ce 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c @@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void) =20 if (irq =3D=3D 0) return(-1); - return irq_linear_revmap(cpm2_pic_host, irq); + return irq_find_mapping(cpm2_pic_host, irq); } =20 static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq, diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c index 4ee8d36ca647..b6f9774038e1 100644 --- a/arch/powerpc/sysdev/ehv_pic.c +++ b/arch/powerpc/sysdev/ehv_pic.c @@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void) * this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap */ - return irq_linear_revmap(global_ehv_pic->irqhost, irq); + return irq_find_mapping(global_ehv_pic->irqhost, irq); } =20 static int ehv_pic_host_match(struct irq_domain *h, struct device_node *no= de, diff --git a/arch/powerpc/sysdev/ge/ge_pic.c b/arch/powerpc/sysdev/ge/ge_pi= c.c index 5b1f8dc3c960..0bc3f0b36528 100644 --- a/arch/powerpc/sysdev/ge/ge_pic.c +++ b/arch/powerpc/sysdev/ge/ge_pic.c @@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void) if (active & (0x1 << hwirq)) break; } - virq =3D irq_linear_revmap(gef_pic_irq_host, + virq =3D irq_find_mapping(gef_pic_irq_host, (irq_hw_number_t)hwirq); } =20 diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index f7b415ebb71c..70be2105865d 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void) if (irq =3D=3D 0) /* 0 --> no irq is pending */ return 0; =20 - return irq_linear_revmap(primary_ipic->irqhost, irq); + return irq_find_mapping(primary_ipic->irqhost, irq); } =20 #ifdef CONFIG_SUSPEND diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 3de090159a1b..787a88efdb35 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mp= ic, int reg) return 0; } =20 - return irq_linear_revmap(mpic->irqhost, src); + return irq_find_mapping(mpic->irqhost, src); } =20 unsigned int mpic_get_one_irq(struct mpic *mpic) @@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void) return 0; } =20 - return irq_linear_revmap(mpic->irqhost, src); + return irq_find_mapping(mpic->irqhost, src); #else return 0; #endif --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C7FAF253F0D; Wed, 19 Mar 2025 09:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376777; cv=none; b=B1Ays9wpy3c85T2wnXDqUpRfd/SiAqrmIA76OlhD5/IjKaDPLla72PSS+PphhSDBC2Qm7LoTZOIZIhwlC1Webb0SN1e3OH0OZPQc+xICiMBZ1XbyRFiIvtzHbB3zBmRtsbvtcQ1klOF79BSMETggqNqkETI9e77DcxhGDU+grBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376777; c=relaxed/simple; bh=gT6RvvOH9rE65zTzqqEWjqya5oBeXsEraVrUGC8winU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dJbFGuySBCerqYdV/jPjXm7/qC4fVZqY9TMzjEtYydGih/+5Z6QO7+/iLWzgDxH35q+O4TfQk+9oonqCXH3RZ+k8x5HoefdCDF4D4lvb/l+wlGQO59fKbmWnLcnAs0LAAYGnJNXSwK1whU53CoxfLb06KMc2FfcQ3YvMeunu+o4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=motJKL+7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="motJKL+7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D14DC4CEE9; Wed, 19 Mar 2025 09:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376777; bh=gT6RvvOH9rE65zTzqqEWjqya5oBeXsEraVrUGC8winU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=motJKL+7zOVGILPaWf+2KVIoWmMkzDTQR/ZLR1tVo+xmAhkqOxIP64q8ld3xayxK8 OAm4LsCiBs1TYIB72dm0TRr2xhMPAd2GTzhEOmGQD6W8AjLt3tJNEC6B18xRh3rgy/ 0jwOPhJYphYQ9D1NAXIoFtXwgwr+Sxc7Vh+SyGxImmdcHlk4Z8HENT9i/N+HvmBRAX rF6q2473FYGG4fOoTRfLrXvvgRKBdGJwvcmZl7jJCmxZeOwbJQKtyniu9TfHlZ2H7L uWUvGJ1VTKjcYjMSr3Vj52O/hFZ0lDPfQw0rk6RYYBfvx5FmNDQomAb73swnh9og65 eEKPSMjRMX5MQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org Subject: [PATCH v2 42/57] irqdomain: sh: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:35 +0100 Message-ID: <20250319092951.37667-43-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org --- arch/sh/boards/mach-se/7343/irq.c | 2 +- arch/sh/boards/mach-se/7722/irq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/734= 3/irq.c index 8241bdedcc82..730c01b225bd 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c @@ -71,7 +71,7 @@ static void __init se7343_gc_init(void) struct irq_chip_type *ct; unsigned int irq_base; =20 - irq_base =3D irq_linear_revmap(se7343_irq_domain, 0); + irq_base =3D irq_find_mapping(se7343_irq_domain, 0); =20 gc =3D irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7343_irq_regs, handle_level_irq); diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/772= 2/irq.c index 9a460a81907f..49aa3a2b1b8f 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c @@ -69,7 +69,7 @@ static void __init se7722_gc_init(void) struct irq_chip_type *ct; unsigned int irq_base; =20 - irq_base =3D irq_linear_revmap(se7722_irq_domain, 0); + irq_base =3D irq_find_mapping(se7722_irq_domain, 0); =20 gc =3D irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7722_irq_regs, handle_level_irq); --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BEBDE25D54E; Wed, 19 Mar 2025 09:32:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376779; cv=none; b=c7AP4JBkwDIRk7QiJ/UkoS9nzRLTwnHBgtxYfqT67MzyBdOdqA7aQyMqwn1cyMo8p0EFBzOoJpAWCf+6XscsM8d29/9HEWRVhG+kDsPLNcBsBbu7rJcUPsB0yabbYQ4QYuN5A5Jiv4hWodog/bPyv4KGQKwghFgYH5aJfKeI0q0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376779; c=relaxed/simple; bh=TrXfwAS/puZQlBtNf9tdD1M67plxl5ThngLriua6Pgo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DXA0kEAM0iOsUCs2Hviq0/7cCzTZL5rBomRPJ1lE2tWrn6RYxEiEU4J1A9sQUJD5wVfgnazHXu8dsY72YGmXUZgls4NTqxS/G5O9d4C8Uw1y3pg8fbNm0rliTQBF4SKTzdj79V449JAsDNowRsSfXKjtsOjymo0JDscd49y5bCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RZ2ce4Mw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RZ2ce4Mw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AADE5C4CEEE; Wed, 19 Mar 2025 09:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376779; bh=TrXfwAS/puZQlBtNf9tdD1M67plxl5ThngLriua6Pgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZ2ce4MwP4LCsJVfmV7Jq0puW2/ApfGYa+DOn8pnXXONJKPzxuxdDJDVgbxeDpQFo +GpDyYDXwIDoCE3LLLFutEkJ+XqXeGrZt26EWKglZ47IAs3KGibRFA0eIEwX9Cr66l oGidMTOtOk3ZOaS0UMUu61mVS43qfVjqhaIOLtpWpQoNO3SpKG0TnqTkx5zJ73dp0o OcTOy8XI/HOw4QXHYBDkj+/YgtvaZG3XemX2FSCvhOdkq6gw2v6xXmaLC0nwfuwYLo cxnHEykaUm3QvhUgQ+E5eeWCbe9EJkhfbdPck1x7KatXWcNxkYUis+ns/jrrqk9/M/ 9LNz3tRTX275g== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org Subject: [PATCH v2 43/57] irqdomain: gpio: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:36 +0100 Message-ID: <20250319092951.37667-44-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij --- drivers/gpio/gpio-idt3243x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-idt3243x.c b/drivers/gpio/gpio-idt3243x.c index 00f547d26254..535f25514455 100644 --- a/drivers/gpio/gpio-idt3243x.c +++ b/drivers/gpio/gpio-idt3243x.c @@ -37,7 +37,7 @@ static void idt_gpio_dispatch(struct irq_desc *desc) pending =3D readl(ctrl->pic + IDT_PIC_IRQ_PEND); pending &=3D ~ctrl->mask_cache; for_each_set_bit(bit, &pending, gc->ngpio) { - virq =3D irq_linear_revmap(gc->irq.domain, bit); + virq =3D irq_find_mapping(gc->irq.domain, bit); if (virq) generic_handle_irq(virq); } --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A891625D8EE for ; Wed, 19 Mar 2025 09:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376781; cv=none; b=mpI87DYXaVSWCjU0qJhmUZ6EwfjNLzXkcaD+mCeNhks8U+prDkT5bCYOdNCm6dVCuSUUkqfjqE8p60Imjzhg3/LDo2eNSG/fYYpO5zCf+90WtOi0H1IfGzlrenekKTZSh+tw/6a86DptTGUscM41JGoZU9CLYWxwXbxCuouHYk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376781; c=relaxed/simple; bh=U/ax1MvaRDrvIjffi7jRFwIYm3OR2o2Qw0xcUb1JN7Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N6RdkMLQfRdsxW6zzycvTaIXOsZ9NBvpJu4EQpkvDH88KfA5QccBMLD8ZL8knsbc3yL8dBedHAC1fc4QV+N1CBsKq5fpKU2vG0cCQYc9dYv93OaJZgMY1xcNQhxHcSJq+VIyjckWdTtA5STvROw50/K2qddmwGQByWp0NGHtcWc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RCaOSDBF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RCaOSDBF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA062C4CEEF; Wed, 19 Mar 2025 09:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376781; bh=U/ax1MvaRDrvIjffi7jRFwIYm3OR2o2Qw0xcUb1JN7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RCaOSDBFnq6cLHbacNuUh/0bFiQ/dRV7ZM+Me/nAzbybcxLOskrJfNB2+bWjlO/Tl /HMiUQ628KcNrhkTDncxfZzQAgqkZAnb7lBP8BMR7xD5q8OJ4y/Z1SISgiqoWtYPM/ dZTGhhioxZUVIDNhEbbO8/kPBNJj1GCNZkrxxhttHCfZ0bGmPKdZhNNlrzA3MNeKKG mJDaKg+zZ2WqoAsCCg0ZpuAjnIeU5imdXlHkuGP20JnvWyCC9JWzmRa/Ms1JQ+csi0 pxusGDxom4UT32t9iQ9WjmU4lMPlyntU8W2AhjhRE3DR5aGO7AITFvWtT4pqXjSJrB 9pU9pqmS2xeBQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Philipp Zabel , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org Subject: [PATCH v2 44/57] irqdomain: gpu: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:37 +0100 Message-ID: <20250319092951.37667-45-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Philipp Zabel Cc: David Airlie Cc: Simona Vetter Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/ipu-v3/ipu-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-commo= n.c index 223e6d563a6b..333f36e0a715 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1008,7 +1008,7 @@ int ipu_map_irq(struct ipu_soc *ipu, int irq) { int virq; =20 - virq =3D irq_linear_revmap(ipu->domain, irq); + virq =3D irq_find_mapping(ipu->domain, irq); if (!virq) virq =3D irq_create_mapping(ipu->domain, irq); =20 @@ -1219,7 +1219,7 @@ static void ipu_irq_exit(struct ipu_soc *ipu) /* TODO: remove irq_domain_generic_chips */ =20 for (i =3D 0; i < IPU_NUM_IRQS; i++) { - irq =3D irq_linear_revmap(ipu->domain, i); + irq =3D irq_find_mapping(ipu->domain, i); if (irq) irq_dispose_mapping(irq); } --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D6A8725D911; Wed, 19 Mar 2025 09:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376783; cv=none; b=ilS4z3wE+wUjIZLfo8A5uELTCCPpF4RF/di5IaNhQ84vWieqL/fPcsM0fl2/fIZlQ5Ur7g/sNINENb+DSpnbW6kJFJ+kTSdoVe3eybi2oTOU6nEWpWmmFE8dP6dDhDRVs+HMO/Stoy/XHDqUDb+68HPeC7iDTx1TPFt7BYsmGZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376783; c=relaxed/simple; bh=8BBppKUFGvXCJbYFUIL2Djj0WLKw8yCOrQ1Pbo0ctj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a8HgUnBgThZx50Z2h+qEEaPvJfjivfpmBbB0yobxZ7Lx4WdxlhJYIU1DX/9reYDquh+qFUi1QpkmbZq2q7jh3C4MNo3XgeEODMasYGfFqyIMzoSzvohS6wa+BQMQgf1U696q7Y9KkMKgKRAjTX0oWyW3DVeiJLZDaGVj/PAE2ys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VbFbMl1y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VbFbMl1y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02513C4CEEF; Wed, 19 Mar 2025 09:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376783; bh=8BBppKUFGvXCJbYFUIL2Djj0WLKw8yCOrQ1Pbo0ctj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VbFbMl1yuID3ix/716z//kaPkLmSd2/9LF4Gerrve3SgcFxP1irS4i7Ipt5XTuHHF RUPX2oj4MYfWYWhm1JeD2y+fPH0864QgdBL9hDXFGmyhcT/7up9S+FfQPDg25TiMMT s7fgq/WiBg2oo1klZwhTMVbOhnp8gw2ygu1F+zkffnpKBvqmy8CU1X4zvclcAuybO1 S0nN8ukJNfxsoAb5LEsbcVhVA0g61NUWDcYSRHTJ6zxj0xy7wBYJnQWCCqNqInJc1h 09KK1aVZSZOE9P3QfLYFAUOo5ylKeAQXjtMuyw3ukZu+OyDscOoXkvEsMuEzBJqoHw ZyYwPr33IlEsA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Peter Rosin , linux-i2c@vger.kernel.org Subject: [PATCH v2 45/57] irqdomain: i2c: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:38 +0100 Message-ID: <20250319092951.37667-46-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Peter Rosin Cc: linux-i2c@vger.kernel.org --- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mu= x-pca954x.c index f6430db6c115..5bb26af0f532 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -414,7 +414,7 @@ static irqreturn_t pca954x_irq_handler(int irq, void *d= ev_id) =20 pending =3D (ret >> PCA954X_IRQ_OFFSET) & (BIT(data->chip->nchans) - 1); for_each_set_bit(i, &pending, data->chip->nchans) - handle_nested_irq(irq_linear_revmap(data->irq, i)); + handle_nested_irq(irq_find_mapping(data->irq, i)); =20 return IRQ_RETVAL(pending); } --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2B5B4255E38 for ; Wed, 19 Mar 2025 09:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376786; cv=none; b=LpkIfEQpm5j67eVNWydUW7uD2TY36am9z8RN3ZM6kE/N/LqN5AdniCb7BLA52MR0ia55oAGKiJ4pyqlMcHDvkG/7aOYrWo5MPBnME+cNBZNcr/Y5nevacP6gvgaGn3g1D/+K30dVuJGgGAgfQTxbfHucgvuMnzDK/+yCMgdstXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376786; c=relaxed/simple; bh=lpe2nMjBH6bRGUp97awppdXuPJprE/OB2HYTkQFwj2g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RvXdCa4x9oaKUL+6ZUvOQSmQlEb49XauccCVT2lMGcBXtIfRFtt72cjANNGm3Xqa7QsR2T7V7eUEXK2c2kLlsegCGRUaxDxTk7kBUmM9I7/RYJJ2IqIta2yepFJ1vBbJThgThKBm+83XpB7bBnIQ4yKGIcc3i+YDTRE/DB4ggs4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CS9SLPm3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CS9SLPm3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8D22C4CEEA; Wed, 19 Mar 2025 09:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376785; bh=lpe2nMjBH6bRGUp97awppdXuPJprE/OB2HYTkQFwj2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CS9SLPm3ODFm7grX0xT8oSAGpraaWE481ovNpwZZOPIHEcQZ10Zoi8cmasGql60us KFGXkSaL6cFW/8eNM9cVDTiSexUCg2LLTxXthv976G0uuA41tNbOCrdEOQtPhIPkX9 DDRvHfvb03tE2DLHaga2iDgPDL9d8bHb5YTx9M5FA7gj8r2KDJU+avAvtmuzK67hqi x5BmMm3FLMpPcdToibK3SURlyUjyQhcQBehTSeiSP2N3wy2dl+hlI9Nt+jdQwHLoF6 bIOzVa3TdWXCoKbBmls/FijoMCsYtLcpY4QY5gyLbqxQt9n82I86TSke8j9jyS8T7z 3tzHfHsIMQzeg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 46/57] irqdomain: irqchip: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:39 +0100 Message-ID: <20250319092951.37667-47-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org --- drivers/irqchip/irq-armada-370-xp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-arma= da-370-xp.c index e51612992735..67b672a78862 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -546,7 +546,7 @@ static void mpic_reenable_percpu(struct mpic *mpic) { /* Re-enable per-CPU interrupts that were enabled before suspend */ for (irq_hw_number_t i =3D 0; i < MPIC_PER_CPU_IRQS_NR; i++) { - unsigned int virq =3D irq_linear_revmap(mpic->domain, i); + unsigned int virq =3D irq_find_mapping(mpic->domain, i); struct irq_data *d; =20 if (!virq || !irq_percpu_is_enabled(virq)) @@ -740,7 +740,7 @@ static void mpic_resume(void) =20 /* Re-enable interrupts */ for (irq_hw_number_t i =3D 0; i < mpic->domain->hwirq_max; i++) { - unsigned int virq =3D irq_linear_revmap(mpic->domain, i); + unsigned int virq =3D irq_find_mapping(mpic->domain, i); struct irq_data *d; =20 if (!virq) --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DD282255E47; Wed, 19 Mar 2025 09:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376788; cv=none; b=byxeIaDIy/yWe5REq4/Dl6i3fihO3IL/v5Tgsyby8MHyt9ls+uOKFDpQVEG+5w2kbYEF4r2ezsUWtLfa9k9R1ff+psMBvh+DkMKM/8wn/BtEugIzXGDjt8nsHvw9ENFQQs6f/v2ju7MbCvrdNfndaR1tqsxdPlRKoVMvsBdTrCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376788; c=relaxed/simple; bh=gODY0rz69D9LDXdTGisofUcys5c9uPuXFizxodp1vEg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qOAcHGxlAmDdDvDfQ7xB9AXd2YNA/1n3QkE2ej7BVPJM7VeIna+SwroUfK8JAPh4R9rSZMtxzBs/QeLHHP00hSQzNH4Gc3aSVSzrj1uZ46tXPQElQlu9MLLV/jmS0O/+tGKMGl8/jXFuewODp/N6KCWcxomJNErgJnZldcsnhhM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cVSLLuiK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cVSLLuiK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21330C4CEEF; Wed, 19 Mar 2025 09:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376787; bh=gODY0rz69D9LDXdTGisofUcys5c9uPuXFizxodp1vEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cVSLLuiKQoloz0lmDoQtsONjy7KFnqRHBahL4UpAvmug7YKYmen3NE+e53K0411Mi RX3ezVbq19KAAVFm2Zqd4BlCpyBnrUVHUquasBP5KgKMDFEaZFiPNZS5uFgr1DExEl yH1Q9aQLfUqt57sB2U8yXb5FZww/iO7fSp2SJ30POhRLvKrpOfoKz4JbxbUzFz3CMV GtgdcXK9mt3cbPjzIQD+OHqzvEbgO0beuSXBJ+f4dq7WAWpY5LvITHD0LJx4rw9ST/ +zmj4lDXwtjP/yZCtylIbFLbtPce6RSY5mWmzlqar15DhXYMUh4DuuUpCjarqGz4Fd WcHV0pJTbSmpw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Lakshmi Sowjanya D , Linus Walleij , linux-gpio@vger.kernel.org Subject: [PATCH v2 47/57] irqdomain: pinctrl: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:40 +0100 Message-ID: <20250319092951.37667-48-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Lakshmi Sowjanya D Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij --- drivers/pinctrl/pinctrl-keembay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-keembay.c b/drivers/pinctrl/pinctrl-ke= embay.c index b693f4787044..0d7cc8280ea2 100644 --- a/drivers/pinctrl/pinctrl-keembay.c +++ b/drivers/pinctrl/pinctrl-keembay.c @@ -1268,7 +1268,7 @@ static void keembay_gpio_irq_handler(struct irq_desc = *desc) for_each_set_clump8(bit, clump, ®, BITS_PER_TYPE(typeof(reg))) { pin =3D clump & ~KEEMBAY_GPIO_IRQ_ENABLE; val =3D keembay_read_pin(kpc->base0 + KEEMBAY_GPIO_DATA_IN, pin); - kmb_irq =3D irq_linear_revmap(gc->irq.domain, pin); + kmb_irq =3D irq_find_mapping(gc->irq.domain, pin); =20 /* Checks if the interrupt is enabled */ if (val && (clump & KEEMBAY_GPIO_IRQ_ENABLE)) --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1BDA025DB1E for ; Wed, 19 Mar 2025 09:33:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376790; cv=none; b=AvSqsVdnAUEnzp6rrjJNZanZmX2YhKYPoAdeDvGFBbcBU4xhpRaJC3wuW9syl2B8nOQCW2C4JFE5x2otPyF4KBJlc+Wkk7Z7OKZxyN/+zAdZPzUwnww9d3Yypc6o65xZDKUQKuHNJ9At4NMprZh3FMSR3zB7I1EUcKnNmKNvMI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376790; c=relaxed/simple; bh=lidN/QLL8lJclrXx9KsiwC+GwLwp1Sp0oSxXq93ZbfQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V+Q3bmv5hetmZmGyswLbNOONjzQVmb7OB6BW5DyCm4F8EwnIHjPt70nKcKhMZFTccUyViumch32QmrrdlBjmzOC9l8UwhOedskYBcT+VEE3XeBtgPlkxUJKiWlAY046upRpFFIeqskMd2qGhDEUrITCJdpxmgiq3b/5e0POoQn0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FJyKCYDs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FJyKCYDs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 324D0C4CEF0; Wed, 19 Mar 2025 09:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376790; bh=lidN/QLL8lJclrXx9KsiwC+GwLwp1Sp0oSxXq93ZbfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJyKCYDsJp7yl/+479P7DpVX76p15OAjRaI0jRC0YbCy/GtuHNPKx/jxOA5lNJOd/ I6dtTMeyPOxy4WjUrbFNtbDvf88RVHgUtb4XwevspfvXNEqwByb6eF5xZWh25Y5dVj LMtWq020UsOXFnZ3xlN3NWY2nf5EmuRwz7TwYY6KS86lJCGyB3zjLwt0EcqzhJS/cB 0sS+NpfcksXilvhcHWjpA4AouTdeawd5KcDM7eKzkyQ6il5tghRgZK6R0hlXWDZW24 KTee1eqqvzSA6OR2KHIPLALwZ6avJj8TOwOnAZ30PbvP/BIf7apK0f2tPyMLvUXINB 7+LK4W7r1G2XA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Qiang Zhao , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 48/57] irqdomain: soc: Switch to irq_find_mapping() Date: Wed, 19 Mar 2025 10:29:41 +0100 Message-ID: <20250319092951.37667-49-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irq_linear_revmap() is deprecated, so remove all its uses and supersede them by an identical call to irq_find_mapping(). Signed-off-by: Jiri Slaby (SUSE) Cc: Qiang Zhao Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org --- drivers/soc/fsl/qe/qe_ic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index e5831c298ad6..e4b6ff2cc76b 100644 --- a/drivers/soc/fsl/qe/qe_ic.c +++ b/drivers/soc/fsl/qe/qe_ic.c @@ -344,7 +344,7 @@ static unsigned int qe_ic_get_low_irq(struct qe_ic *qe_= ic) if (irq =3D=3D 0) return 0; =20 - return irq_linear_revmap(qe_ic->irqhost, irq); + return irq_find_mapping(qe_ic->irqhost, irq); } =20 /* Return an interrupt vector or 0 if no interrupt is pending. */ @@ -360,7 +360,7 @@ static unsigned int qe_ic_get_high_irq(struct qe_ic *qe= _ic) if (irq =3D=3D 0) return 0; =20 - return irq_linear_revmap(qe_ic->irqhost, irq); + return irq_find_mapping(qe_ic->irqhost, irq); } =20 static void qe_ic_cascade_low(struct irq_desc *desc) --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D6D9925DCFB; Wed, 19 Mar 2025 09:33:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376792; cv=none; b=iXBa5mxG1bbXNakWyG0AD3mpH9ItvcNOgklffeN8pyUsqDnzrxmAWvuyUkHLBUUPzwIyX1iiQQWUN+nLBD9bMdSz6RPU6MvoEoBeUqPZ0V6/Gl48tLq5CSFePZwr3n1PTj2JDKtdLDsB3aoGJ6/QaLZ6XgLUi5WeHCyeDlogo/g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376792; c=relaxed/simple; bh=eNseFhzSVipLNwxZ21Z4rZLqkjUU3kwov7Sl4p2zSuQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uyTr80gSwDrRXtFkLBw/SO00aXnINKUdtmPRixHgS/1L0zIHqiMY5opZ7lx3cDlr6l4iXtDihe8DeWwEtmZhqyrZfwuvEeKia/5Mn526caTlIIWLAUGVRcCvsqQGBZS0LPDNSrZ30TnxZEENmfVQubrpHjgpLNxzvVu4hd2UWSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PS7hYZmg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PS7hYZmg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CFF2C4CEEA; Wed, 19 Mar 2025 09:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376792; bh=eNseFhzSVipLNwxZ21Z4rZLqkjUU3kwov7Sl4p2zSuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PS7hYZmgW9/Pcfpu8MAoRyBArlwzkzGxBIGzzUzwPnrcaQDtEOYNDnkU1rhabkOcC UqTMB/tSvMCvY37A96RSxDqiLymb4mFg5ZGmk9yWIKGeEopLz/dpmRA4wC0SNBf06K KotaIajxoQUR4f2jLWKHd4FUXjMxm6EN3ybJ8XeBD8d3jAHSxivsRqVTrsu9HfBW3I oG7V64Gio28wTkm1uJGgCmzgu/9H7HnmvAQSqz0cxGCmWBO43aMj5dkRbwmefcimE3 xBC3AcHZfpSd3L7DJOZAmHo4i0R09DZ7cHXV6QEG/hb1RxpT86IMa4PFjb44fOokG5 ZakGQdT7lbyVw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Alex Shi , Yanteng Si , Dongliang Mu , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH v2 49/57] irqdomain: Drop irq_linear_revmap() Date: Wed, 19 Mar 2025 10:29:42 +0100 Message-ID: <20250319092951.37667-50-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable irq_linear_revmap() is deprecated and unused now. So remove it. Signed-off-by: Jiri Slaby (SUSE) Cc: Alex Shi Cc: Yanteng Si Cc: Dongliang Mu Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/core-api/irq/irq-domain.rst | 2 -- .../translations/zh_CN/core-api/irq/irq-domain.rst | 2 -- include/linux/irqdomain.h | 6 ------ 3 files changed, 10 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index e26ed303819d..775dd43b3340 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -63,8 +63,6 @@ variety of methods: mapping. - irq_find_mapping() returns a Linux IRQ number for a given domain and hwirq number, and 0 if there was no mapping -- irq_linear_revmap() is now identical to irq_find_mapping(), and is - deprecated - generic_handle_domain_irq() handles an interrupt described by a domain and a hwirq number =20 diff --git a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst b= /Documentation/translations/zh_CN/core-api/irq/irq-domain.rst index 913c3eda3f74..4a2d3b27aa4d 100644 --- a/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +++ b/Documentation/translations/zh_CN/core-api/irq/irq-domain.rst @@ -60,8 +60,6 @@ irq_domain=E5=92=8C=E4=B8=80=E4=B8=AAhwirq=E5=8F=B7=E4=BD= =9C=E4=B8=BA=E5=8F=82=E6=95=B0=E3=80=82 =E5=A6=82=E6=9E=9Chwirq=E7=9A=84=E6= =98=A0=E5=B0=84=E8=BF=98=E4=B8=8D=E5=AD=98=E5=9C=A8=EF=BC=8C =20 - irq_find_mapping()=E8=BF=94=E5=9B=9E=E7=BB=99=E5=AE=9A=E5=9F=9F=E5=92=8C= hwirq=E7=9A=84Linux IRQ=E5=8F=B7=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C= =89=E6=98=A0=E5=B0=84=E5=88=99=E8=BF=94=E5=9B=9E0=E3=80=82 =20 -- irq_linear_revmap()=E7=8E=B0=E4=B8=8Eirq_find_mapping()=E7=9B=B8=E5=90= =8C=EF=BC=8C=E5=B7=B2=E8=A2=AB=E5=BA=9F=E5=BC=83=E3=80=82 - - generic_handle_domain_irq()=E5=A4=84=E7=90=86=E4=B8=80=E4=B8=AA=E7=94=B1= =E5=9F=9F=E5=92=8Chwirq=E5=8F=B7=E6=8F=8F=E8=BF=B0=E7=9A=84=E4=B8=AD=E6=96= =AD=E3=80=82 =20 =E8=AF=B7=E6=B3=A8=E6=84=8F=EF=BC=8Cirq=E5=9F=9F=E7=9A=84=E6=9F=A5=E6=89= =BE=E5=BF=85=E9=A1=BB=E5=8F=91=E7=94=9F=E5=9C=A8=E4=B8=8ERCU=E8=AF=BB=E4=B8= =B4=E7=95=8C=E5=8C=BA=E5=85=BC=E5=AE=B9=E7=9A=84=E4=B8=8A=E4=B8=8B=E6=96=87= =E4=B8=AD=E3=80=82 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index bd02550df6e6..d5c9e32ff0a2 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -492,12 +492,6 @@ static inline unsigned int irq_find_mapping(struct irq= _domain *domain, return 0; } =20 -static inline unsigned int irq_linear_revmap(struct irq_domain *domain, - irq_hw_number_t hwirq) -{ - return irq_find_mapping(domain, hwirq); -} - extern const struct irq_domain_ops irq_domain_simple_ops; =20 /* stock xlate functions */ --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 099CA25DD0E for ; Wed, 19 Mar 2025 09:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376794; cv=none; b=P1PTDvy1LhqYbKAi+gzAMLgM7tX6YJsWFUe7nQLOP1FWreZ4NdAb8uaN9dbdGosn05/QazpKEM3XHTGfo+ayEXzS6qxPIxtpw3bUzLFDRHge6GlU56ygOZ15ULTKogoOcR4dzAPmin2rcFL9ptJFbA9JCCAYwcRNDtIVIhjANZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376794; c=relaxed/simple; bh=htDMV7TYLCAj/vnYViCX+n5jugajp6cyWOawasKX8k4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a/TX8NUWoiZi7VA6rvRMTkyvQAvC+iXkF0EYk8k/ilFDJym8uIWZpIkeMP1ZdScvFv4lINuWu/b+mccWCAblZl7SZHyWI/Wgxh4yoSFjvDD1qwqvmQO8HqDzkwscTQqZcv/pbCXUfUQ9p77cB6cHtLY3sdLEo5TzPLXdRJac/8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JW9gl02k; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JW9gl02k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D544CC4CEE9; Wed, 19 Mar 2025 09:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376793; bh=htDMV7TYLCAj/vnYViCX+n5jugajp6cyWOawasKX8k4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JW9gl02kOpKlSWcY+Yal6et59UGDSFQ4HY5+rNSCFiejY+WDFtkmJ0lLJb65BCRHj 4x5DkJU6fX1kTDxC4NMjQWX1CbQGCT1nvQZPfMei5zCjHYkfYXxYlA6SE2KcEyWiZZ rTyJeIfkFh7BWeH+/J+xhXAjXecKg1dH7Lxy2cwFeUziT97wmW5X8p8URDYdzxUsyi g7TA1w4W5jQZulUF+E40FMgu91DqtHq1x60/XF4sTTkR2azTO10aKS7rq4nE2GKFHE I6y76x0VaMxVuTwBoq0ih3UOpgp8QSo9lcCdq/waDOT6lx5CAaZhFn0/VXr+TIULfH yfCD+IVNwf0OQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 50/57] irqdomain: Use irq_domain_instantiate() retvals as initializers Date: Wed, 19 Mar 2025 10:29:43 +0100 Message-ID: <20250319092951.37667-51-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" I was thinking whether add a \n before the 'return' or this. And this looks both more compact and more readable. Note irq_domain_create_hierarchy()'s handling of size is now part of info's initializer (using the ternary operator). That makes more sense while reading it. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/irqdomain.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index d5c9e32ff0a2..bf52a08f3255 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -403,9 +403,8 @@ static inline struct irq_domain *irq_domain_create_noma= p(struct fwnode_handle *f .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -424,9 +423,8 @@ static inline struct irq_domain *irq_domain_create_line= ar(struct fwnode_handle * .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -440,9 +438,8 @@ static inline struct irq_domain *irq_domain_create_tree= (struct fwnode_handle *fw .ops =3D ops, .host_data =3D host_data, }; - struct irq_domain *d; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 @@ -554,18 +551,14 @@ static inline struct irq_domain *irq_domain_create_hi= erarchy(struct irq_domain * struct irq_domain_info info =3D { .fwnode =3D fwnode, .size =3D size, - .hwirq_max =3D size, + .hwirq_max =3D size ? : ~0U, .ops =3D ops, .host_data =3D host_data, .domain_flags =3D flags, .parent =3D parent, }; - struct irq_domain *d; - - if (!info.size) - info.hwirq_max =3D ~0U; + struct irq_domain *d =3D irq_domain_instantiate(&info); =20 - d =3D irq_domain_instantiate(&info); return IS_ERR(d) ? NULL : d; } =20 --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 86C8025E454 for ; Wed, 19 Mar 2025 09:33:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376795; cv=none; b=UbHLYWH0WNIbjCypWbaYb+YfjBDi1GUhSbW73JKf0ynEdEkdR5KVtgss0c8y6SV0ESlnHo70a7Es9qbv0pjrs2GBhupZsZa0ko3Qn7JuFU3TX5+RaADo0aTsO+xewDbxMt6lPVGdEojJvTtUZJh29i9FM63WqhcIA2ieWWe3d6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376795; c=relaxed/simple; bh=a9U0bdVcfma7Pzlz5vym4wIqvenndjLBfijdaF+4FNw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FoG0B1+o0gKuBOkpoblErkljWBfhE9DQ0CckV+4F8oX3krLnu6+JPL8GeUnKAB7Q/1nMlgVm+PO+r2vZdZ5riskWPEHk8Tq21c0rKmCdnXL0qTeV73WyA+xjJcXi8rKlM4bF4kcaO6RifhAj4fB8/uz35D8xzuFKa9y63kagTdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e93I7MOM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e93I7MOM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D8A8C4CEEA; Wed, 19 Mar 2025 09:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376795; bh=a9U0bdVcfma7Pzlz5vym4wIqvenndjLBfijdaF+4FNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e93I7MOMkTGxVi0J8nfx1bE9K6U4lsDLn6V5zoJSiwOYYJb264t/JZ9cwHMyB7LES 0R+ljjVKtsVWbu/C+dbL3HxZ2irk7LAeXA2NOdWtb/kqRZV1EXE3Gl7GmgY8TJD5Jr kzCbcZzZKZjWF/jJ3Nl2K/A12Rzjbq6I65bn1UbgjLs0VaEJSWMNDM6Sh7CKdmwqUr qchaJSIoGauLDT7hZBpDuOOMXVTfNlPyMR5bzTrM3AES8T3f20IAZJe/SkB3d6dOHe 5A5zRi4ds+q9WRbvySrFnC2nS64ts+5Ps0ybDOGw6iAkqpn6sVfmru7LHAcBpjiAiC XRncNwTx7T2mA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 51/57] irqdomain: Make struct irq_domain_info variables const Date: Wed, 19 Mar 2025 10:29:44 +0100 Message-ID: <20250319092951.37667-52-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is just expressing it explicitly as irq_domain_instantiate() takes const already. No functional change. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/irqdomain.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index bf52a08f3255..472f6bb91e9a 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -396,7 +396,7 @@ static inline struct irq_domain *irq_domain_create_noma= p(struct fwnode_handle *f const struct irq_domain_ops *ops, void *host_data) { - struct irq_domain_info info =3D { + const struct irq_domain_info info =3D { .fwnode =3D fwnode, .hwirq_max =3D max_irq, .direct_max =3D max_irq, @@ -416,7 +416,7 @@ static inline struct irq_domain *irq_domain_create_line= ar(struct fwnode_handle * const struct irq_domain_ops *ops, void *host_data) { - struct irq_domain_info info =3D { + const struct irq_domain_info info =3D { .fwnode =3D fwnode, .size =3D size, .hwirq_max =3D size, @@ -432,7 +432,7 @@ static inline struct irq_domain *irq_domain_create_tree= (struct fwnode_handle *fw const struct irq_domain_ops *ops, void *host_data) { - struct irq_domain_info info =3D { + const struct irq_domain_info info =3D { .fwnode =3D fwnode, .hwirq_max =3D ~0, .ops =3D ops, @@ -548,7 +548,7 @@ static inline struct irq_domain *irq_domain_create_hier= archy(struct irq_domain * const struct irq_domain_ops *ops, void *host_data) { - struct irq_domain_info info =3D { + const struct irq_domain_info info =3D { .fwnode =3D fwnode, .size =3D size, .hwirq_max =3D size ? : ~0U, --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0834A25E471; Wed, 19 Mar 2025 09:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376798; cv=none; b=AY30QuMbVlaxptLs6GKPGF4KYAEw3eWxgM4gfJvdGU/v0yHBoURt7lhHSiLDnaLCUwAL9GKTS70dqPa3oKBaUGlKVsmgduXxRA5A3v0wmOoHHhPCaxMZ+SjApCs3AcDa360XltC7ZqCa6IehOVIpl2oeO4119dfyp9ZB7/AZgEg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376798; c=relaxed/simple; bh=tY3E73/bPkQtD0w5fWJQJmN0LIORBH3zkcvPZlS7C7M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bGVEUrafN+JnoKC9mNVFiflhJlGwR2zGL/9InkR3bfz9sYmuBg/1Zs6fpc6FAp7//pb30vmekETr88yOD2Fmq9DLffoh09xVmBGNF3kQ9SL42ahmM/N6C5NhhGm0a58ycfiaGn54kGzyvhurnrwO0qXVidtlZp+eSVFUoBzgdCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u0N0w32J; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u0N0w32J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA060C4CEEA; Wed, 19 Mar 2025 09:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376797; bh=tY3E73/bPkQtD0w5fWJQJmN0LIORBH3zkcvPZlS7C7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u0N0w32JQiLhMY3LUt3I4++8wXWjh9nax/AvZ11mlkfxA+Z9bIpIFLigfWTFxvdyB JlsCZYrmhcVecMZ3oHDA1z11QT/QDm0IKDTp+5BVjGLosRoW4wPTYlUyn+iJw0QB6h j4XRYyxyTsWZJ8WJJJji7PicIzTi9VX88oiUWvkAKYC7kW+DcxB6AMwFqDRzTAPZAY tXmZWKDPHEgI00VM0FBxM4slTzB9x3iptS1CShcDe4G6kixJlhKN1bwInYWcKxvPKO 3ZUgpAw+ZVjmuB5zzRM69Xa2GhhiAd83yuAQWZqJu2RIqXZ2X+Kl5hQ7Gx1NHGdZ6J 0N4EDGCq/LOyg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 52/57] irqdomain.h: Improve kernel-docs of functions Date: Wed, 19 Mar 2025 10:29:45 +0100 Message-ID: <20250319092951.37667-53-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Many of irqdomain.h's functions are referenced in Documentation/ but are not properly documented. Therefore, document these. And use "Returns:" tag consistently, so that it is properly generated to the resulting docs. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- [v2] no () for functions names in the comments' headers --- include/linux/irqdomain.h | 42 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 472f6bb91e9a..3e7103645c63 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -411,6 +411,15 @@ static inline struct irq_domain *irq_domain_create_nom= ap(struct fwnode_handle *f unsigned int irq_create_direct_mapping(struct irq_domain *domain); #endif =20 +/** + * irq_domain_create_linear - Allocate and register a linear revmap irq_do= main. + * @fwnode: pointer to interrupt controller's FW node. + * @size: Number of interrupts in the domain. + * @ops: map/unmap domain callbacks + * @host_data: Controller private data pointer + * + * Returns: Newly created irq_domain + */ static inline struct irq_domain *irq_domain_create_linear(struct fwnode_ha= ndle *fwnode, unsigned int size, const struct irq_domain_ops *ops, @@ -457,6 +466,18 @@ unsigned int irq_create_mapping_affinity(struct irq_do= main *domain, unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); void irq_dispose_mapping(unsigned int virq); =20 +/** + * irq_create_mapping - Map a hardware interrupt into linux irq space + * @domain: domain owning this hardware interrupt or NULL for default doma= in + * @hwirq: hardware irq number in that domain space + * + * Only one mapping per hardware interrupt is permitted. + * + * If the sense/trigger is to be specified, set_irq_type() should be called + * on the number returned from that call. + * + * Returns: Linux irq number or 0 on error + */ static inline unsigned int irq_create_mapping(struct irq_domain *domain, irq_hw_number_t hwirq) { @@ -467,6 +488,13 @@ struct irq_desc *__irq_resolve_mapping(struct irq_doma= in *domain, irq_hw_number_t hwirq, unsigned int *irq); =20 +/** + * irq_resolve_mapping - Find a linux irq from a hw irq number. + * @domain: domain owning this hardware interrupt + * @hwirq: hardware irq number in that domain space + * + * Returns: Interrupt descriptor + */ static inline struct irq_desc *irq_resolve_mapping(struct irq_domain *doma= in, irq_hw_number_t hwirq) { @@ -477,6 +505,8 @@ static inline struct irq_desc *irq_resolve_mapping(stru= ct irq_domain *domain, * irq_find_mapping() - Find a linux irq from a hw irq number. * @domain: domain owning this hardware interrupt * @hwirq: hardware irq number in that domain space + * + * Returns: Linux irq number or 0 if not found */ static inline unsigned int irq_find_mapping(struct irq_domain *domain, irq_hw_number_t hwirq) @@ -539,7 +569,8 @@ void irq_domain_reset_irq_data(struct irq_data *irq_dat= a); * * If successful the parent is associated to the new domain and the * domain flags are set. - * Returns pointer to IRQ domain, or NULL on failure. + * + * Returns: A pointer to IRQ domain, or %NULL on failure. */ static inline struct irq_domain *irq_domain_create_hierarchy(struct irq_do= main *parent, unsigned int flags, @@ -570,6 +601,15 @@ void irq_domain_free_irqs(unsigned int virq, unsigned = int nr_irqs); int irq_domain_activate_irq(struct irq_data *irq_data, bool early); void irq_domain_deactivate_irq(struct irq_data *irq_data); =20 +/** + * irq_domain_alloc_irqs - Allocate IRQs from domain + * @domain: domain to allocate from + * @nr_irqs: number of IRQs to allocate + * @node: NUMA node id for memory allocation + * @arg: domain specific argument + * + * See __irq_domain_alloc_irqs()' documentation. + */ static inline int irq_domain_alloc_irqs(struct irq_domain *domain, unsigned int nr_irqs, int node, void *arg) { --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B57E325E820; Wed, 19 Mar 2025 09:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376799; cv=none; b=ne7i5AmwDKbX/AVWuMxs+nqHf4e23GPKwjrDe8pMIgU0ckimXBQDgsAvDVQiLSv3+jZu1ISUMhLoiLOawZtKVtmVx9HbQ+o9pWNa8+X3Lbl53ScPuGJ99XqNeGp1VjleqGPjLPJX8Q6scBJh8/fzqm5E8TGjRxa8NZ5J4x5ftUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376799; c=relaxed/simple; bh=d9EgjtX6NglS06OR7rjXgzo2p+SLKBGgjWU8YxisvHA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YSpyHCWLKtMfjdL+CoheYHWF/T+/rV1FuPVxVq+Y/fzQ7RJQOam+DTdi6vJhs5Wgsb21oNF1OxkWvajvGAgydBwS8gBt3IWB2TrjQdo+fRCjs5WIQisToFoG/tngx4wjv0jo/FH95JCzKkq9RhFj+YFUpEGM1jtLlwQgz601jBM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mrsmGZZR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mrsmGZZR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB7EBC4CEE9; Wed, 19 Mar 2025 09:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376799; bh=d9EgjtX6NglS06OR7rjXgzo2p+SLKBGgjWU8YxisvHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mrsmGZZRNcEWcTwHA7WIEknh3maSV8yZL3aTp6fFGphheMp2kc119iS/XEysAhk35 JFwhvzIRmVwRIPHeoNekhecfzwa3Kxcoh0KNvAdJMdonwQtiTymnOAeWh4KPx8valY MDt4C3Nfhz5TJBLw4AhudbIAlWQltKnFLRk5IhdP68TQ/ZPfb/eRmopIXGmgzpvEF2 XBWN9YN0r1IrnLAvFb0KZuVMERVdEM8lxfVlg2M0oOKszj71O6F4fQwHxgwl6uNA2a p+cYRkk4NojviRR2cCjRobMyCINrj34SSX38Qw7U2evDG/euqNo/jSPaqYiJjXAVzz /vWPA2S8xDpXg== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 53/57] docs: irq/concepts: Add commas and reflow Date: Wed, 19 Mar 2025 10:29:46 +0100 Message-ID: <20250319092951.37667-54-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For easier reading, it is always desired to add commas at some places in text. Like before adverbs or after fronted sentences. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- Documentation/core-api/irq/concepts.rst | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Documentation/core-api/irq/concepts.rst b/Documentation/core-a= pi/irq/concepts.rst index 4273806a606b..f166006a81f6 100644 --- a/Documentation/core-api/irq/concepts.rst +++ b/Documentation/core-api/irq/concepts.rst @@ -2,23 +2,22 @@ What is an IRQ? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -An IRQ is an interrupt request from a device. -Currently they can come in over a pin, or over a packet. -Several devices may be connected to the same pin thus -sharing an IRQ. +An IRQ is an interrupt request from a device. Currently, they can come +in over a pin, or over a packet. Several devices may be connected to +the same pin thus sharing an IRQ. =20 An IRQ number is a kernel identifier used to talk about a hardware -interrupt source. Typically this is an index into the global irq_desc -array, but except for what linux/interrupt.h implements the details +interrupt source. Typically, this is an index into the global irq_desc +array, but except for what linux/interrupt.h implements, the details are architecture specific. =20 An IRQ number is an enumeration of the possible interrupt sources on a -machine. Typically what is enumerated is the number of input pins on -all of the interrupt controller in the system. In the case of ISA +machine. Typically, what is enumerated is the number of input pins on +all of the interrupt controllers in the system. In the case of ISA, what is enumerated are the 16 input pins on the two i8259 interrupt controllers. =20 Architectures can assign additional meaning to the IRQ numbers, and -are encouraged to in the case where there is any manual configuration -of the hardware involved. The ISA IRQs are a classic example of +are encouraged to in the case where there is any manual configuration +of the hardware involved. The ISA IRQs are a classic example of assigning this kind of additional meaning. --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B96C325F789; Wed, 19 Mar 2025 09:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376801; cv=none; b=CERJwhQz0CBpoi/E/r1wG7Izh3s9V8KCn4eX70LlH+MZpcq+B96P4UhthWX0EEE1ZsEnqBoCN+ZSxmy0X/vPuDN32Rchfxt9LPzUZyz4cPvOxOQDcRo9Hi4E+RxIoUaLZBanqIEL+Wbd+mkMYDaw0kNDPrXMEhjwHDijawJYAPM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376801; c=relaxed/simple; bh=dsnO03vflDPM3U5wnWk1Hio9rfg5sKAr73z1/gt+U0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gWThqr7tjF43ppzkRKyKSAZWKKRRVFIQo9QI5QeAEUMCQaH+RtgDvXlMBVoDkxQe1/3bi1GevkO2JrdksQEvBK4dszX9bDGiLWZ2dIhNrYjB5DVmrMxK19M2eo9/jhhVBxxfGZTA6t/Il1Tlud+z8k2HVoOZyDVz2/WJMTz/s6Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ahZUF/SI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ahZUF/SI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05804C4CEEA; Wed, 19 Mar 2025 09:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376801; bh=dsnO03vflDPM3U5wnWk1Hio9rfg5sKAr73z1/gt+U0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ahZUF/SIZlYuqdQyeagjqTMby1Rl4vLvz5hrXUHoSYbPf2spMIpunYhFCKAuomKqg DroIRfo72rQXCsV6yT8yNTA/17wX7Wcu2HX8Tvvz4mH3cyfgFjOMtVB7dbZGSCsEMe ehmAdatG1tKFWkVTuCmil9RIw6UcClHktllzKo9+dNT05Gi01K6pptU1N4xKgk8KGu uTGbL6UvEjUWzZaxYdNmMDcKtGtDX3AeotBIbcqEHg8ijHcQeMpDptp1S0zSWJKnr/ wclllW8wA0S4aFCRnQ5Vbfqi2RvvN0WtvMdxWrmpcyosxnvA5u7OEbWuKfef8jWOUx AcUlMyO7reLZw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 54/57] docs: irq/concepts: Minor improvements Date: Wed, 19 Mar 2025 10:29:47 +0100 Message-ID: <20250319092951.37667-55-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Just note in the docs: 1) A PCI as an example for shared interrupts, 2) a sparse tree can be used for interrupts too, and 3) two i8259s have 8 pins. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- Documentation/core-api/irq/concepts.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Documentation/core-api/irq/concepts.rst b/Documentation/core-a= pi/irq/concepts.rst index f166006a81f6..7c4564f3cbdf 100644 --- a/Documentation/core-api/irq/concepts.rst +++ b/Documentation/core-api/irq/concepts.rst @@ -4,18 +4,20 @@ What is an IRQ? =20 An IRQ is an interrupt request from a device. Currently, they can come in over a pin, or over a packet. Several devices may be connected to -the same pin thus sharing an IRQ. +the same pin thus sharing an IRQ. Such as on legacy PCI bus: All devices +typically share 4 lanes/pins. Note that each device can request an +interrupt on each of the lanes. =20 An IRQ number is a kernel identifier used to talk about a hardware interrupt source. Typically, this is an index into the global irq_desc -array, but except for what linux/interrupt.h implements, the details -are architecture specific. +array or sparse_irqs tree. But except for what linux/interrupt.h +implements, the details are architecture specific. =20 An IRQ number is an enumeration of the possible interrupt sources on a machine. Typically, what is enumerated is the number of input pins on all of the interrupt controllers in the system. In the case of ISA, -what is enumerated are the 16 input pins on the two i8259 interrupt -controllers. +what is enumerated are the 8 input pins on each of the two i8259 +interrupt controllers. =20 Architectures can assign additional meaning to the IRQ numbers, and are encouraged to in the case where there is any manual configuration --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C567D25F963; Wed, 19 Mar 2025 09:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376803; cv=none; b=gg6hTajHcX66YU6TVBqNLbNnIIX2vBxACOJfOr2zdwlUrO5YZ9s/R9X0cxOAKfBRuQ/Hg6zG8Qp/LhBhreeIDsEIYZrKk7VpyTng5WeJKN5v8i2bp5vnMRk9YeECiNACpXjbcqFKz7+B6mJT0Feb4gijRn5XZ/S5Za46P9dZCc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376803; c=relaxed/simple; bh=UFLfqYAPRyP0zMZMJni7dgt7MkfzfaxNTSDWCN3V7Ag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fMDCSp2fysW/67RdKjhCt71aetmxaWSjSiqrWTZtQYP3b1dJGZSIveolsC8z1eWiwxUo04CpHzQpkX6HuWVwUOYazxGQmb+yJOI3Rwja0uSibF8/ud6ZNx91DrtXhJibuGTOrN0aZCw6ULRD9w0ZRcOEZdron9KDYCHpOedO5LI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JVQw6HEW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JVQw6HEW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16957C4CEEA; Wed, 19 Mar 2025 09:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376803; bh=UFLfqYAPRyP0zMZMJni7dgt7MkfzfaxNTSDWCN3V7Ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVQw6HEWw/rNx703pdxYurP52goB6uxBLpnpc5pizQMLD4cFfgGh4VTW3MwkHPaeE tRgDw+2X9d2y6C6XBO0pR0a8uRrT6nDSTeSXLhHNz1gVTy+J78/2T3xHyzVXiYF/nb 7F6LXUB1shDH1FdcBk13Df8wW1zvQ1RtGriE9KiMod2xEXC47L+gco+ht3Sqh0s4gS bR/tzuFzxzG+foF+eMGm3ptEtyd3Tjoeg45VNYR7nuFYKSZfZ8ToF/yUGz09j+tuVL 83C2LQT8hshQ2QM13QmfoWBrlffWCrbWSE5RZBYG9uBRdtbIX8ElC4jNZHJiXvhRnN a7H19bndOizHA== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 55/57] docs: irq-domain.rst: Simple improvements Date: Wed, 19 Mar 2025 10:29:48 +0100 Message-ID: <20250319092951.37667-56-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The improvements include: * Capitals in headlines. * Added commas: for easier reading, it is always desired to add commas at some places in text. Like before adverbs or after fronted sentences. * 3rd person -> add 's' to verbs. * End some sentences with period and start a new one. Avoid thus heavy sentences. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- Documentation/core-api/irq/irq-domain.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index 775dd43b3340..c2f2728b1a35 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -1,19 +1,19 @@ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -The irq_domain interrupt number mapping library +The irq_domain Interrupt Number Mapping Library =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The current design of the Linux kernel uses a single large number space where each separate IRQ source is assigned a different number. This is simple when there is only one interrupt controller, but in -systems with multiple interrupt controllers the kernel must ensure +systems with multiple interrupt controllers, the kernel must ensure that each one gets assigned non-overlapping allocations of Linux IRQ numbers. =20 The number of interrupt controllers registered as unique irqchips -show a rising tendency: for example subdrivers of different kinds +shows a rising tendency. For example, subdrivers of different kinds such as GPIO controllers avoid reimplementing identical callback mechanisms as the IRQ core system by modelling their interrupt -handlers as irqchips, i.e. in effect cascading interrupt controllers. +handlers as irqchips. I.e. in effect cascading interrupt controllers. =20 Here the interrupt number loose all kind of correspondence to hardware interrupt numbers: whereas in the past, IRQ numbers could @@ -21,15 +21,15 @@ be chosen so they matched the hardware IRQ line into th= e root interrupt controller (i.e. the component actually fireing the interrupt line to the CPU) nowadays this number is just a number. =20 -For this reason we need a mechanism to separate controller-local -interrupt numbers, called hardware irq's, from Linux IRQ numbers. +For this reason, we need a mechanism to separate controller-local +interrupt numbers, called hardware IRQs, from Linux IRQ numbers. =20 The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of irq numbers, but they don't provide any support for reverse mapping of the controller-local IRQ (hwirq) number into the Linux IRQ number space. =20 -The irq_domain library adds mapping between hwirq and IRQ numbers on +The irq_domain library adds a mapping between hwirq and IRQ numbers on top of the irq_alloc_desc*() API. An irq_domain to manage mapping is preferred over interrupt controller drivers open coding their own reverse mapping scheme. @@ -38,7 +38,7 @@ irq_domain also implements translation from an abstract i= rq_fwspec structure to hwirq numbers (Device Tree and ACPI GSI so far), and can be easily extended to support other IRQ topology data sources. =20 -irq_domain usage +irq_domain Usage =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 An interrupt controller driver creates and registers an irq_domain by @@ -77,7 +77,7 @@ If the driver has the Linux IRQ number or the irq_data po= inter, and needs to know the associated hwirq number (such as in the irq_chip callbacks) then it can be directly obtained from irq_data->hwirq. =20 -Types of irq_domain mappings +Types of irq_domain Mappings =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 There are several mechanisms available for reverse mapping from hwirq @@ -102,7 +102,7 @@ map are fixed time lookup for IRQ numbers, and irq_desc= s are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. =20 -The majority of drivers should use the linear map. +The majority of drivers should use the Linear map. =20 Tree ---- @@ -190,7 +190,7 @@ that the driver using the simple domain call irq_create= _mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. =20 -Hierarchy IRQ domain +Hierarchy IRQ Domain -------------------- =20 On some architectures, there may be multiple interrupt controllers --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D62E025FA29; Wed, 19 Mar 2025 09:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376805; cv=none; b=ofJEswi9ckp88WFXFiuv3fy6kXDPMAXlh+3UQryBoFFbZhegiCgXJSvar6NqXLssILM7yTkY70gCzxRo5Wuhv7NcdsLtVvhbkhfoc2N1MPZ0rHxrHtvvh8lbruA1SwnzPMJnH3by5S3OtiDEiNfqUembS2Xwv7rpDxrmYe1o6/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376805; c=relaxed/simple; bh=DmEkzV2v+M6KOzJs0lmtEuuY4Z9lzDwe2LwcKntFCqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fKiPv0YmEkLG6hxK5JgoRVxDJP3oy/7kjfaKiwgS9FaDz7yvGw/2uX7q/JPwofTan/x+ieqxBGtDTW6UMw3atmda4yVxR+5jAYXigxA+mI4+88YweB56tVsOxNpBPn3t+g/9v5M5f159Hqo3vN0tI6SjazzhqpVcDOuqGfy2+0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Al64meZo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Al64meZo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25820C4CEEE; Wed, 19 Mar 2025 09:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376805; bh=DmEkzV2v+M6KOzJs0lmtEuuY4Z9lzDwe2LwcKntFCqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Al64meZo8AGAnyPcrbPrh4VYVc6YfuWGHe2bgEOAV5OWCtBUC76N0cxbAhhjw1odT LzvSVvPV/YkXLHNQPcdJEgAbNtv8cBmp4OFqaC3UUJsAXOrNy6szFyYMpcn6iEl2nf DDOjFKhzwYBueyMg8HqXr5Rnvp6W/oZHA/LeAoygzlKEBttXuci+BgUXMpfh4AlHtK 15Oz/SBonOrjxIIS8kKQDjcQ2HDBYiw3iQ7ZnA+2EnP4jpGXI6wTPjTLlc9FEt0Bbw bu8rYVh5R0wuWk9xlCNyOMe/OinEM5Rmi3Oz/rUADiR4KPOyl8Qq2YqsnfzlOnqRDI WDoBX/N7RUtLw== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 56/57] docs: irqdomain: Update Date: Wed, 19 Mar 2025 10:29:49 +0100 Message-ID: <20250319092951.37667-57-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The irqdomain documentaion became obsolete over time. Update and extend it a bit with respect to the current code and HW. Most notably the doubled documentation of irq_domain (from .rst and .h) was unified and let only in .rst. A reference link was added to .h. Furthermore: * Some 'struct' keywords added, so that the respective structs are hyperlinked. * :c:member: used where appropriate to mark a member of a struct. * Some wording rephrased to improve readability/understanding. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- Documentation/core-api/irq/irq-domain.rst | 122 +++++++++++++--------- include/linux/irqdomain.h | 26 +---- 2 files changed, 76 insertions(+), 72 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index c2f2728b1a35..7a418b3135de 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -3,8 +3,8 @@ The irq_domain Interrupt Number Mapping Library =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The current design of the Linux kernel uses a single large number -space where each separate IRQ source is assigned a different number. -This is simple when there is only one interrupt controller, but in +space where each separate IRQ source is assigned a unique number. +This is simple when there is only one interrupt controller. But in systems with multiple interrupt controllers, the kernel must ensure that each one gets assigned non-overlapping allocations of Linux IRQ numbers. @@ -15,45 +15,64 @@ such as GPIO controllers avoid reimplementing identical= callback mechanisms as the IRQ core system by modelling their interrupt handlers as irqchips. I.e. in effect cascading interrupt controllers. =20 -Here the interrupt number loose all kind of correspondence to -hardware interrupt numbers: whereas in the past, IRQ numbers could -be chosen so they matched the hardware IRQ line into the root -interrupt controller (i.e. the component actually fireing the -interrupt line to the CPU) nowadays this number is just a number. +So in the past, IRQ numbers could be chosen so that they match the +hardware IRQ line into the root interrupt controller (i.e. the +component actually firing the interrupt line to the CPU). Nowadays, +this number is just a number and the number loose all kind of +correspondence to hardware interrupt numbers. =20 For this reason, we need a mechanism to separate controller-local interrupt numbers, called hardware IRQs, from Linux IRQ numbers. =20 The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of -irq numbers, but they don't provide any support for reverse mapping of +IRQ numbers, but they don't provide any support for reverse mapping of the controller-local IRQ (hwirq) number into the Linux IRQ number space. =20 The irq_domain library adds a mapping between hwirq and IRQ numbers on -top of the irq_alloc_desc*() API. An irq_domain to manage mapping is -preferred over interrupt controller drivers open coding their own +top of the irq_alloc_desc*() API. An irq_domain to manage the mapping +is preferred over interrupt controller drivers open coding their own reverse mapping scheme. =20 -irq_domain also implements translation from an abstract irq_fwspec -structure to hwirq numbers (Device Tree and ACPI GSI so far), and can -be easily extended to support other IRQ topology data sources. +irq_domain also implements a translation from an abstract struct +irq_fwspec to hwirq numbers (Device Tree, non-DT firmware node, ACPI +GSI, and software node so far), and can be easily extended to support +other IRQ topology data sources. The implementation is performed +without any extra platform support code. =20 irq_domain Usage =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -An interrupt controller driver creates and registers an irq_domain by -calling one of the irq_domain_add_*() or irq_domain_create_*() functions -(each mapping method has a different allocator function, more on that late= r). -The function will return a pointer to the irq_domain on success. The caller -must provide the allocator function with an irq_domain_ops structure. +struct irq_domain could be defined as an irq domain controller. That +is, it handles the mapping between hardware and virtual interrupt +numbers for a given interrupt domain. The domain structure is +generally created by the PIC code for a given PIC instance (though a +domain can cover more than one PIC if they have a flat number model). +It is the domain callbacks that are responsible for setting the +irq_chip on a given irq_desc after it has been mapped. + +The host code and data structures use a fwnode_handle pointer to +identify the domain. In some cases, and in order to preserve source +code compatibility, this fwnode pointer is "upgraded" to a DT +device_node. For those firmware infrastructures that do not provide a +unique identifier for an interrupt controller, the irq_domain code +offers a fwnode allocator. + +An interrupt controller driver creates and registers a struct irq_domain +by calling one of the irq_domain_create_*() functions (each mapping +method has a different allocator function, more on that later). The +function will return a pointer to the struct irq_domain on success. The +caller must provide the allocator function with a struct irq_domain_ops +pointer. =20 In most cases, the irq_domain will begin empty without any mappings between hwirq and IRQ numbers. Mappings are added to the irq_domain by calling irq_create_mapping() which accepts the irq_domain and a -hwirq number as arguments. If a mapping for the hwirq doesn't already -exist then it will allocate a new Linux irq_desc, associate it with -the hwirq, and call the .map() callback so the driver can perform any -required hardware setup. +hwirq number as arguments. If a mapping for the hwirq doesn't already +exist, irq_create_mapping() allocates a new Linux irq_desc, associates +it with the hwirq, and calls the :c:member:`irq_domain_ops.map()` +callback. In there, the driver can perform any required hardware +setup. =20 Once a mapping has been established, it can be retrieved or used via a variety of methods: @@ -75,7 +94,8 @@ be allocated. =20 If the driver has the Linux IRQ number or the irq_data pointer, and needs to know the associated hwirq number (such as in the irq_chip -callbacks) then it can be directly obtained from irq_data->hwirq. +callbacks) then it can be directly obtained from +:c:member:`irq_data.hwirq`. =20 Types of irq_domain Mappings =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D @@ -231,20 +251,40 @@ There are four major interfaces to use hierarchy irq_= domain: 4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware to stop delivering the interrupt. =20 -Following changes are needed to support hierarchy irq_domain: +The following is needed to support hierarchy irq_domain: =20 -1) a new field 'parent' is added to struct irq_domain; it's used to +1) The :c:member:`parent` field in struct irq_domain is used to maintain irq_domain hierarchy information. -2) a new field 'parent_data' is added to struct irq_data; it's used to - build hierarchy irq_data to match hierarchy irq_domains. The irq_data - is used to store irq_domain pointer and hardware irq number. -3) new callbacks are added to struct irq_domain_ops to support hierarchy - irq_domain operations. - -With support of hierarchy irq_domain and hierarchy irq_data ready, an -irq_domain structure is built for each interrupt controller, and an +2) The :c:member:`parent_data` field in struct irq_data is used to + build hierarchy irq_data to match hierarchy irq_domains. The + irq_data is used to store irq_domain pointer and hardware irq + number. +3) The :c:member:`alloc()`, :c:member:`free()`, and other callbacks in + struct irq_domain_ops to support hierarchy irq_domain operations. + +With the support of hierarchy irq_domain and hierarchy irq_data ready, +an irq_domain structure is built for each interrupt controller, and an irq_data structure is allocated for each irq_domain associated with an -IRQ. Now we could go one step further to support stacked(hierarchy) +IRQ. + +For an interrupt controller driver to support hierarchy irq_domain, it +needs to: + +1) Implement irq_domain_ops.alloc() and irq_domain_ops.free() +2) Optionally, implement irq_domain_ops.activate() and + irq_domain_ops.deactivate(). +3) Optionally, implement an irq_chip to manage the interrupt controller + hardware. +4) There is no need to implement irq_domain_ops.map() and + irq_domain_ops.unmap(). They are unused with hierarchy irq_domain. + +Note the hierarchy irq_domain is in no way x86-specific, and is +heavily used to support other architectures, such as ARM, ARM64 etc. + +Stacked irq_chip +~~~~~~~~~~~~~~~~ + +Now, we could go one step further to support stacked (hierarchy) irq_chip. That is, an irq_chip is associated with each irq_data along the hierarchy. A child irq_chip may implement a required action by itself or by cooperating with its parent irq_chip. @@ -254,20 +294,6 @@ with the hardware managed by itself and may ask for se= rvices from its parent irq_chip when needed. So we could achieve a much cleaner software architecture. =20 -For an interrupt controller driver to support hierarchy irq_domain, it -needs to: - -1) Implement irq_domain_ops.alloc and irq_domain_ops.free -2) Optionally implement irq_domain_ops.activate and - irq_domain_ops.deactivate. -3) Optionally implement an irq_chip to manage the interrupt controller - hardware. -4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap, - they are unused with hierarchy irq_domain. - -Hierarchy irq_domain is in no way x86 specific, and is heavily used to -support other architectures, such as ARM, ARM64 etc. - Debugging =3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 3e7103645c63..b8bb37cfcee2 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -1,30 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * irq_domain - IRQ translation domains + * irq_domain - IRQ Translation Domains * - * Translation infrastructure between hw and linux irq numbers. This is - * helpful for interrupt controllers to implement mapping between hardware - * irq numbers and the Linux irq number space. - * - * irq_domains also have hooks for translating device tree or other - * firmware interrupt representations into a hardware irq number that - * can be mapped back to a Linux irq number without any extra platform - * support code. - * - * Interrupt controller "domain" data structure. This could be defined as a - * irq domain controller. That is, it handles the mapping between hardware - * and virtual interrupt numbers for a given interrupt domain. The domain - * structure is generally created by the PIC code for a given PIC instance - * (though a domain can cover more than one PIC if they have a flat number - * model). It's the domain callbacks that are responsible for setting the - * irq_chip on a given irq_desc after it's been mapped. - * - * The host code and data structures use a fwnode_handle pointer to - * identify the domain. In some cases, and in order to preserve source - * code compatibility, this fwnode pointer is "upgraded" to a DT - * device_node. For those firmware infrastructures that do not provide - * a unique identifier for an interrupt controller, the irq_domain - * code offers a fwnode allocator. + * See Documentation/core-api/irq/irq-domain.rst for the details. */ =20 #ifndef _LINUX_IRQDOMAIN_H --=20 2.49.0 From nobody Wed Dec 17 07:08:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E7E0F26136A; Wed, 19 Mar 2025 09:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376808; cv=none; b=ECMctZi2UN0dqURZhSozsHjiec+P5DnlEvj/7jVirfqPZqDevEw/D+95Tg26cCLdTWEDhFELO/ctSY5GklTrfP/lPMLe42dwQKTJsUYVN1wQXuxzD0ZXkZJ6slVx1dor0FnCFUD+EIVuh6hC0FaMASF9yPsqBKhP8T2SOEsfP80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742376808; c=relaxed/simple; bh=1ZnDtwr26F+gadypjJWqlvEkauGfR8o1OEkvjNk+RzQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qvmtjfd/cH+xMdjSj7XqQ/swk7nvcnrqqxHhpMwKdTQ1aNMNaqAHjbXhA3PF64C3ngNOJlsznuSgr8dPvbbw32VR/htKL6/2wHf/OaZerP64RHSH0Ss/P02hzhc6YUMs8/5ybcci0CDJUd4FxJNAStZQIg8IQ9jkFVmFa8EXkgw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mtELG2Xf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mtELG2Xf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3632AC4CEE9; Wed, 19 Mar 2025 09:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742376807; bh=1ZnDtwr26F+gadypjJWqlvEkauGfR8o1OEkvjNk+RzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mtELG2XfRg/8Dwmk1xW4IS+e3e9tF9e3vgYax8DZEkyyHanh4+IN6MGWv/5A6OddR nhmJtuFCfZID8d5BU1NvTlgdf51bshK9RklQEav4eOE88xQOeU7P9D15wzhOqB1vip F7t3YX1fUsI8XmOFvqmp+YLb24Z8WHJXhgZtOlhWlm0ZCv+3wp3wtpED2sD0qVHrab rzsRObcCkpKJfISXbKR227Lfo5v/JcVHHPUPdeRn8/NiUW/9/jdAjaTSAGEzscfyts ILXzqKRz4lw/YXspB7FDEQ4f1sGcwieEH4EibOz+RxdHSK/u00u76z4sHAwgEIH57l WjQEjia3/p3PQ== From: "Jiri Slaby (SUSE)" To: tglx@linutronix.de Cc: maz@kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 57/57] irqdomain.c: Fix kernel-doc and add it to Documentation Date: Wed, 19 Mar 2025 10:29:50 +0100 Message-ID: <20250319092951.37667-58-jirislaby@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250319092951.37667-1-jirislaby@kernel.org> References: <20250319092951.37667-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" irqdomain.c's kernel-doc exists in that file, but is not plugged into Documentation/ yet. Before plugging it in, fix it first: irq_domain_get_irq_data() and irq_domain_set_info() were documented twice. Identically, by both definitions for CONFIG_IRQ_DOMAIN_HIERARCHY and !CONFIG_IRQ_DOMAIN_HIERARCHY. Therefore, switch the second kernel-doc into an ordinary comment -- change "/**" to simple "/*". This avoids sphinx's: WARNING: Duplicate C declaration Next, in commit b7b377332b96 ("irqdomain: Fix the kernel-doc and plug it into Documentation"), I added irqdomain.h's (header) kernel-doc into core-api/genericirq.rst. But given the amount of irqdomain functions and structures, move all these to core-api/irq/irq-domain.rst now. Finally, add these newly fixed irqdomain.c's (source) docs there as well. Signed-off-by: Jiri Slaby (SUSE) Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Randy Dunlap --- Documentation/core-api/genericirq.rst | 2 -- Documentation/core-api/irq/irq-domain.rst | 20 ++++++++++++++++++++ kernel/irq/irqdomain.c | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Documentation/core-api/genericirq.rst b/Documentation/core-api= /genericirq.rst index 25f94dfd66fa..582bde9bf5a9 100644 --- a/Documentation/core-api/genericirq.rst +++ b/Documentation/core-api/genericirq.rst @@ -410,8 +410,6 @@ which are used in the generic IRQ layer. .. kernel-doc:: include/linux/interrupt.h :internal: =20 -.. kernel-doc:: include/linux/irqdomain.h - Public Functions Provided =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =20 diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core= -api/irq/irq-domain.rst index 7a418b3135de..4226e0bac4f0 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -299,3 +299,23 @@ Debugging =20 Most of the internals of the IRQ subsystem are exposed in debugfs by turning CONFIG_GENERIC_IRQ_DEBUGFS on. + +Structures and Public Functions Provided +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This chapter contains the autogenerated documentation of the structures +and exported kernel API functions which are used for IRQ domains. + +.. kernel-doc:: include/linux/irqdomain.h + +.. kernel-doc:: kernel/irq/irqdomain.c + :export: + +Internal Functions Provided +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + +This chapter contains the autogenerated documentation of the internal +functions. + +.. kernel-doc:: kernel/irq/irqdomain.c + :internal: diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 5bb3d2bbe229..5b21b568155b 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1940,7 +1940,7 @@ static void irq_domain_check_hierarchy(struct irq_dom= ain *domain) domain->flags |=3D IRQ_DOMAIN_FLAG_HIERARCHY; } #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ -/** +/* * irq_domain_get_irq_data - Get irq_data associated with @virq and @domain * @domain: domain to match * @virq: IRQ number to get irq_data @@ -1954,7 +1954,7 @@ struct irq_data *irq_domain_get_irq_data(struct irq_d= omain *domain, } EXPORT_SYMBOL_GPL(irq_domain_get_irq_data); =20 -/** +/* * irq_domain_set_info - Set the complete data for a @virq in @domain * @domain: Interrupt domain to match * @virq: IRQ number --=20 2.49.0