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

Configure Feed

Select the types of activity you want to include in your feed.

powerpc: 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).

[ tglx: Fix up subject prefix ]

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> # For 8xx
Link: https://lore.kernel.org/all/20250319092951.37667-33-jirislaby@kernel.org



authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
bf9935e4 219182fe

+45 -33
+3 -2
arch/powerpc/platforms/44x/uic.c
··· 254 254 } 255 255 uic->dcrbase = *dcrreg; 256 256 257 - uic->irqhost = irq_domain_add_linear(node, NR_UIC_INTS, &uic_host_ops, 258 - uic); 257 + uic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 258 + NR_UIC_INTS, &uic_host_ops, 259 + uic); 259 260 if (! uic->irqhost) 260 261 return NULL; /* FIXME: panic? */ 261 262
+2 -1
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
··· 188 188 189 189 cpld_pic_node = of_node_get(np); 190 190 191 - cpld_pic_host = irq_domain_add_linear(np, 16, &cpld_pic_host_ops, NULL); 191 + cpld_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 16, 192 + &cpld_pic_host_ops, NULL); 192 193 if (!cpld_pic_host) { 193 194 printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n"); 194 195 goto end;
+1 -1
arch/powerpc/platforms/52xx/media5200.c
··· 168 168 169 169 spin_lock_init(&media5200_irq.lock); 170 170 171 - media5200_irq.irqhost = irq_domain_add_linear(fpga_np, 171 + media5200_irq.irqhost = irq_domain_create_linear(of_fwnode_handle(fpga_np), 172 172 MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq); 173 173 if (!media5200_irq.irqhost) 174 174 goto out;
+2 -2
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
··· 247 247 if (!cascade_virq) 248 248 return; 249 249 250 - gpt->irqhost = irq_domain_add_linear(node, 1, &mpc52xx_gpt_irq_ops, gpt); 250 + gpt->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 1, &mpc52xx_gpt_irq_ops, gpt); 251 251 if (!gpt->irqhost) { 252 - dev_err(gpt->dev, "irq_domain_add_linear() failed\n"); 252 + dev_err(gpt->dev, "irq_domain_create_linear() failed\n"); 253 253 return; 254 254 } 255 255
+1 -1
arch/powerpc/platforms/52xx/mpc52xx_pic.c
··· 446 446 * As last step, add an irq host to translate the real 447 447 * hw irq information provided by the ofw to linux virq 448 448 */ 449 - mpc52xx_irqhost = irq_domain_add_linear(picnode, 449 + mpc52xx_irqhost = irq_domain_create_linear(of_fwnode_handle(picnode), 450 450 MPC52xx_IRQ_HIGHTESTHWIRQ, 451 451 &mpc52xx_irqhost_ops, NULL); 452 452
+1 -1
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
··· 278 278 int i; 279 279 280 280 /* Setup an irq_domain structure */ 281 - socrates_fpga_pic_irq_host = irq_domain_add_linear(pic, 281 + socrates_fpga_pic_irq_host = irq_domain_create_linear(of_fwnode_handle(pic), 282 282 SOCRATES_FPGA_NUM_IRQS, &socrates_fpga_pic_host_ops, NULL); 283 283 if (socrates_fpga_pic_irq_host == NULL) { 284 284 pr_err("FPGA PIC: Unable to allocate host\n");
+2 -1
arch/powerpc/platforms/8xx/cpm1-ic.c
··· 110 110 111 111 out_be32(&data->reg->cpic_cimr, 0); 112 112 113 - data->host = irq_domain_add_linear(dev->of_node, 64, &cpm_pic_host_ops, data); 113 + data->host = irq_domain_create_linear(of_fwnode_handle(dev->of_node), 114 + 64, &cpm_pic_host_ops, data); 114 115 if (!data->host) 115 116 return -ENODEV; 116 117
+2 -1
arch/powerpc/platforms/8xx/pic.c
··· 146 146 if (!siu_reg) 147 147 goto out; 148 148 149 - mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL); 149 + mpc8xx_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 64, 150 + &mpc8xx_pic_host_ops, NULL); 150 151 if (!mpc8xx_pic_host) 151 152 printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); 152 153
+3 -2
arch/powerpc/platforms/embedded6xx/flipper-pic.c
··· 149 149 150 150 __flipper_quiesce(io_base); 151 151 152 - irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, 153 - &flipper_irq_domain_ops, io_base); 152 + irq_domain = irq_domain_create_linear(of_fwnode_handle(np), 153 + FLIPPER_NR_IRQS, 154 + &flipper_irq_domain_ops, io_base); 154 155 if (!irq_domain) { 155 156 pr_err("failed to allocate irq_domain\n"); 156 157 return NULL;
+3 -2
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
··· 175 175 176 176 __hlwd_quiesce(io_base); 177 177 178 - irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS, 179 - &hlwd_irq_domain_ops, io_base); 178 + irq_domain = irq_domain_create_linear(of_fwnode_handle(np), 179 + HLWD_NR_IRQS, 180 + &hlwd_irq_domain_ops, io_base); 180 181 if (!irq_domain) { 181 182 pr_err("failed to allocate irq_domain\n"); 182 183 iounmap(io_base);
+3 -2
arch/powerpc/platforms/powermac/pic.c
··· 327 327 /* 328 328 * Allocate an irq host 329 329 */ 330 - pmac_pic_host = irq_domain_add_linear(master, max_irqs, 331 - &pmac_pic_host_ops, NULL); 330 + pmac_pic_host = irq_domain_create_linear(of_fwnode_handle(master), 331 + max_irqs, 332 + &pmac_pic_host_ops, NULL); 332 333 BUG_ON(pmac_pic_host == NULL); 333 334 irq_set_default_domain(pmac_pic_host); 334 335
+2 -1
arch/powerpc/platforms/powernv/opal-irqchip.c
··· 191 191 * fall back to the legacy method (opal_event_request(...)) 192 192 * anyway. */ 193 193 dn = of_find_compatible_node(NULL, NULL, "ibm,opal-event"); 194 - opal_event_irqchip.domain = irq_domain_add_linear(dn, MAX_NUM_EVENTS, 194 + opal_event_irqchip.domain = irq_domain_create_linear(of_fwnode_handle(dn), 195 + MAX_NUM_EVENTS, 195 196 &opal_event_domain_ops, &opal_event_irqchip); 196 197 of_node_put(dn); 197 198 if (!opal_event_irqchip.domain) {
+2 -1
arch/powerpc/sysdev/cpm2_pic.c
··· 259 259 out_be32(&cpm2_intctl->ic_scprrl, 0x05309770); 260 260 261 261 /* create a legacy host */ 262 - cpm2_pic_host = irq_domain_add_linear(node, 64, &cpm2_pic_host_ops, NULL); 262 + cpm2_pic_host = irq_domain_create_linear(of_fwnode_handle(node), 64, 263 + &cpm2_pic_host_ops, NULL); 263 264 if (cpm2_pic_host == NULL) { 264 265 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); 265 266 return;
+3 -2
arch/powerpc/sysdev/ehv_pic.c
··· 269 269 return; 270 270 } 271 271 272 - ehv_pic->irqhost = irq_domain_add_linear(np, NR_EHV_PIC_INTS, 273 - &ehv_pic_host_ops, ehv_pic); 272 + ehv_pic->irqhost = irq_domain_create_linear(of_fwnode_handle(np), 273 + NR_EHV_PIC_INTS, 274 + &ehv_pic_host_ops, ehv_pic); 274 275 if (!ehv_pic->irqhost) { 275 276 of_node_put(np); 276 277 kfree(ehv_pic);
+1 -1
arch/powerpc/sysdev/fsl_msi.c
··· 412 412 } 413 413 platform_set_drvdata(dev, msi); 414 414 415 - msi->irqhost = irq_domain_add_linear(dev->dev.of_node, 415 + msi->irqhost = irq_domain_create_linear(of_fwnode_handle(dev->dev.of_node), 416 416 NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi); 417 417 418 418 if (msi->irqhost == NULL) {
+3 -2
arch/powerpc/sysdev/ge/ge_pic.c
··· 214 214 } 215 215 216 216 /* Setup an irq_domain structure */ 217 - gef_pic_irq_host = irq_domain_add_linear(np, GEF_PIC_NUM_IRQS, 218 - &gef_pic_host_ops, NULL); 217 + gef_pic_irq_host = irq_domain_create_linear(of_fwnode_handle(np), 218 + GEF_PIC_NUM_IRQS, 219 + &gef_pic_host_ops, NULL); 219 220 if (gef_pic_irq_host == NULL) 220 221 return; 221 222
+2 -2
arch/powerpc/sysdev/i8259.c
··· 260 260 raw_spin_unlock_irqrestore(&i8259_lock, flags); 261 261 262 262 /* create a legacy host */ 263 - i8259_host = irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, 264 - &i8259_host_ops, NULL); 263 + i8259_host = irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS_LEGACY, 0, 0, 264 + &i8259_host_ops, NULL); 265 265 if (i8259_host == NULL) { 266 266 printk(KERN_ERR "i8259: failed to allocate irq host !\n"); 267 267 return;
+3 -2
arch/powerpc/sysdev/ipic.c
··· 711 711 if (ipic == NULL) 712 712 return NULL; 713 713 714 - ipic->irqhost = irq_domain_add_linear(node, NR_IPIC_INTS, 715 - &ipic_host_ops, ipic); 714 + ipic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 715 + NR_IPIC_INTS, 716 + &ipic_host_ops, ipic); 716 717 if (ipic->irqhost == NULL) { 717 718 kfree(ipic); 718 719 return NULL;
+3 -3
arch/powerpc/sysdev/mpic.c
··· 1483 1483 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); 1484 1484 mpic->isu_mask = (1 << mpic->isu_shift) - 1; 1485 1485 1486 - mpic->irqhost = irq_domain_add_linear(mpic->node, 1487 - intvec_top, 1488 - &mpic_host_ops, mpic); 1486 + mpic->irqhost = irq_domain_create_linear(of_fwnode_handle(mpic->node), 1487 + intvec_top, 1488 + &mpic_host_ops, mpic); 1489 1489 1490 1490 /* 1491 1491 * FIXME: The code leaks the MPIC object and mappings here; this
+2 -2
arch/powerpc/sysdev/tsi108_pci.c
··· 404 404 { 405 405 DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); 406 406 407 - pci_irq_host = irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, 408 - &pci_irq_domain_ops, NULL); 407 + pci_irq_host = irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS_LEGACY, 0, 0, 408 + &pci_irq_domain_ops, NULL); 409 409 if (pci_irq_host == NULL) { 410 410 printk(KERN_ERR "pci_irq_host: failed to allocate irq domain!\n"); 411 411 return;
+1 -1
arch/powerpc/sysdev/xive/common.c
··· 1464 1464 1465 1465 static void __init xive_init_host(struct device_node *np) 1466 1466 { 1467 - xive_irq_domain = irq_domain_add_tree(np, &xive_irq_domain_ops, NULL); 1467 + xive_irq_domain = irq_domain_create_tree(of_fwnode_handle(np), &xive_irq_domain_ops, NULL); 1468 1468 if (WARN_ON(xive_irq_domain == NULL)) 1469 1469 return; 1470 1470 irq_set_default_domain(xive_irq_domain);