Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Switch to irq_domain_create_*()

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) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-26-jirislaby@kernel.org



authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
0810f121 a36aa0f7

+25 -23
+2 -2
arch/mips/ath25/ar2315.c
··· 149 149 150 150 ath25_irq_dispatch = ar2315_irq_dispatch; 151 151 152 - domain = irq_domain_add_linear(NULL, AR2315_MISC_IRQ_COUNT, 153 - &ar2315_misc_irq_domain_ops, NULL); 152 + domain = irq_domain_create_linear(NULL, AR2315_MISC_IRQ_COUNT, 153 + &ar2315_misc_irq_domain_ops, NULL); 154 154 if (!domain) 155 155 panic("Failed to add IRQ domain"); 156 156
+2 -2
arch/mips/ath25/ar5312.c
··· 143 143 144 144 ath25_irq_dispatch = ar5312_irq_dispatch; 145 145 146 - domain = irq_domain_add_linear(NULL, AR5312_MISC_IRQ_COUNT, 147 - &ar5312_misc_irq_domain_ops, NULL); 146 + domain = irq_domain_create_linear(NULL, AR5312_MISC_IRQ_COUNT, 147 + &ar5312_misc_irq_domain_ops, NULL); 148 148 if (!domain) 149 149 panic("Failed to add IRQ domain"); 150 150
+13 -12
arch/mips/cavium-octeon/octeon-irq.c
··· 1503 1503 /* Mips internal */ 1504 1504 octeon_irq_init_core(); 1505 1505 1506 - ciu_domain = irq_domain_add_tree( 1507 - ciu_node, &octeon_irq_domain_ciu_ops, dd); 1506 + ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu_ops, 1507 + dd); 1508 1508 irq_set_default_domain(ciu_domain); 1509 1509 1510 1510 /* CIU_0 */ ··· 1637 1637 if (gpiod) { 1638 1638 /* gpio domain host_data is the base hwirq number. */ 1639 1639 gpiod->base_hwirq = base_hwirq; 1640 - irq_domain_add_linear( 1641 - gpio_node, 16, &octeon_irq_domain_gpio_ops, gpiod); 1640 + irq_domain_create_linear(of_fwnode_handle(gpio_node), 16, 1641 + &octeon_irq_domain_gpio_ops, gpiod); 1642 1642 } else { 1643 1643 pr_warn("Cannot allocate memory for GPIO irq_domain.\n"); 1644 1644 return -ENOMEM; ··· 2074 2074 /* Mips internal */ 2075 2075 octeon_irq_init_core(); 2076 2076 2077 - ciu_domain = irq_domain_add_tree( 2078 - ciu_node, &octeon_irq_domain_ciu2_ops, NULL); 2077 + ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu2_ops, 2078 + NULL); 2079 2079 irq_set_default_domain(ciu_domain); 2080 2080 2081 2081 /* CUI2 */ ··· 2331 2331 } 2332 2332 host_data->max_bits = val; 2333 2333 2334 - cib_domain = irq_domain_add_linear(ciu_node, host_data->max_bits, 2335 - &octeon_irq_domain_cib_ops, 2336 - host_data); 2334 + cib_domain = irq_domain_create_linear(of_fwnode_handle(ciu_node), 2335 + host_data->max_bits, 2336 + &octeon_irq_domain_cib_ops, 2337 + host_data); 2337 2338 if (!cib_domain) { 2338 - pr_err("ERROR: Couldn't irq_domain_add_linear()\n"); 2339 + pr_err("ERROR: Couldn't irq_domain_create_linear()\n"); 2339 2340 return -ENOMEM; 2340 2341 } 2341 2342 ··· 2919 2918 * Initialize all domains to use the default domain. Specific major 2920 2919 * blocks will overwrite the default domain as needed. 2921 2920 */ 2922 - domain = irq_domain_add_tree(ciu_node, &octeon_dflt_domain_ciu3_ops, 2923 - ciu3_info); 2921 + domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_dflt_domain_ciu3_ops, 2922 + ciu3_info); 2924 2923 for (i = 0; i < MAX_CIU3_DOMAINS; i++) 2925 2924 ciu3_info->domain[i] = domain; 2926 2925
+1 -1
arch/mips/lantiq/irq.c
··· 377 377 for (i = 0; i < MAX_IM; i++) 378 378 irq_set_chained_handler(i + 2, ltq_hw_irq_handler); 379 379 380 - ltq_domain = irq_domain_add_linear(node, 380 + ltq_domain = irq_domain_create_linear(of_fwnode_handle(node), 381 381 (MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE, 382 382 &irq_domain_ops, 0); 383 383
+2 -2
arch/mips/pci/pci-ar2315.c
··· 469 469 if (err) 470 470 return err; 471 471 472 - apc->domain = irq_domain_add_linear(NULL, AR2315_PCI_IRQ_COUNT, 473 - &ar2315_pci_irq_domain_ops, apc); 472 + apc->domain = irq_domain_create_linear(NULL, AR2315_PCI_IRQ_COUNT, 473 + &ar2315_pci_irq_domain_ops, apc); 474 474 if (!apc->domain) { 475 475 dev_err(dev, "failed to add IRQ domain\n"); 476 476 return -ENOMEM;
+4 -3
arch/mips/pci/pci-rt3883.c
··· 208 208 rt3883_pci_w32(rpc, 0, RT3883_PCI_REG_PCIENA); 209 209 210 210 rpc->irq_domain = 211 - irq_domain_add_linear(rpc->intc_of_node, RT3883_PCI_IRQ_COUNT, 212 - &rt3883_pci_irq_domain_ops, 213 - rpc); 211 + irq_domain_create_linear(of_fwnode_handle(rpc->intc_of_node), 212 + RT3883_PCI_IRQ_COUNT, 213 + &rt3883_pci_irq_domain_ops, 214 + rpc); 214 215 if (!rpc->irq_domain) { 215 216 dev_err(dev, "unable to add IRQ domain\n"); 216 217 return -ENODEV;
+1 -1
arch/mips/ralink/irq.c
··· 176 176 /* route all INTC interrupts to MIPS HW0 interrupt */ 177 177 rt_intc_w32(0, INTC_REG_TYPE); 178 178 179 - domain = irq_domain_add_legacy(node, RALINK_INTC_IRQ_COUNT, 179 + domain = irq_domain_create_legacy(of_fwnode_handle(node), RALINK_INTC_IRQ_COUNT, 180 180 RALINK_INTC_IRQ_BASE, 0, &irq_domain_ops, NULL); 181 181 if (!domain) 182 182 panic("Failed to add irqdomain");