aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/microblaze/pci/pci-common.c2
-rw-r--r--arch/mips/pci/fixup-lantiq.c2
-rw-r--r--arch/powerpc/kernel/pci-common.c2
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_pciex.c2
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_sio.c2
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c7
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c3
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c2
-rw-r--r--arch/powerpc/platforms/pseries/event_sources.c3
-rw-r--r--arch/x86/kernel/devicetree.c2
-rw-r--r--drivers/of/irq.c2
-rw-r--r--drivers/pci/host/pci-mvebu.c2
-rw-r--r--include/linux/of_irq.h4
-rw-r--r--kernel/irq/irqdomain.c13
14 files changed, 20 insertions, 28 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 355527c6b837..91f56691cfa1 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -246,7 +246,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
246 oirq.args_count, oirq.args[0], oirq.args[1], 246 oirq.args_count, oirq.args[0], oirq.args[1],
247 of_node_full_name(oirq.np)); 247 of_node_full_name(oirq.np));
248 248
249 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 249 virq = irq_create_of_mapping(&oirq);
250 } 250 }
251 if (!virq) { 251 if (!virq) {
252 pr_debug(" Failed to map !\n"); 252 pr_debug(" Failed to map !\n");
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c
index 81ff0b5e6efa..aef60e75003e 100644
--- a/arch/mips/pci/fixup-lantiq.c
+++ b/arch/mips/pci/fixup-lantiq.c
@@ -33,7 +33,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
33 slot, pin); 33 slot, pin);
34 return 0; 34 return 0;
35 } 35 }
36 irq = irq_create_of_mapping(dev_irq.np, dev_irq.args, dev_irq.args_count); 36 irq = irq_create_of_mapping(&dev_irq);
37 dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); 37 dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq);
38 return irq; 38 return irq;
39} 39}
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 03bca0d424af..2a404fe6975a 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -266,7 +266,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
266 oirq.args_count, oirq.args[0], oirq.args[1], 266 oirq.args_count, oirq.args[0], oirq.args[1],
267 of_node_full_name(oirq.np)); 267 of_node_full_name(oirq.np));
268 268
269 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 269 virq = irq_create_of_mapping(&oirq);
270 } 270 }
271 if(virq == NO_IRQ) { 271 if(virq == NO_IRQ) {
272 pr_debug(" Failed to map !\n"); 272 pr_debug(" Failed to map !\n");
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
index e8d34d1f640d..b3ea96db5b06 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
@@ -511,7 +511,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
511 pr_err("PCIEXC:Failed to map irq\n"); 511 pr_err("PCIEXC:Failed to map irq\n");
512 goto error; 512 goto error;
513 } 513 }
514 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 514 virq = irq_create_of_mapping(&oirq);
515 if (request_irq(virq, pciex_handle_internal_irq, 515 if (request_irq(virq, pciex_handle_internal_irq,
516 0, "pciex", (void *)phb)) { 516 0, "pciex", (void *)phb)) {
517 pr_err("PCIEXC:Failed to request irq\n"); 517 pr_err("PCIEXC:Failed to request irq\n");
diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c
index 06046d512130..c8eb57193826 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_sio.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c
@@ -66,7 +66,7 @@ static int __init txx9_serial_init(void)
66#ifdef CONFIG_SERIAL_TXX9_CONSOLE 66#ifdef CONFIG_SERIAL_TXX9_CONSOLE
67 req.membase = ioremap(req.mapbase, 0x24); 67 req.membase = ioremap(req.mapbase, 0x24);
68#endif 68#endif
69 req.irq = irq_create_of_mapping(irq.np, irq.args, irq.args_count); 69 req.irq = irq_create_of_mapping(&irq);
70 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART 70 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
71 /*HAVE_CTS_LINE*/; 71 /*HAVE_CTS_LINE*/;
72 req.uartclk = 83300000; 72 req.uartclk = 83300000;
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index 6e842fdbfcab..d20680446174 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -236,11 +236,8 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
236 * tree in case the device-tree is ever fixed 236 * tree in case the device-tree is ever fixed
237 */ 237 */
238 struct of_phandle_args oirq; 238 struct of_phandle_args oirq;
239 if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0) { 239 if (of_irq_parse_one(pic->host->of_node, 0, &oirq) == 0)
240 virq = irq_create_of_mapping(oirq.np, oirq.args, 240 return irq_create_of_mapping(&oirq);
241 oirq.args_count);
242 return virq;
243 }
244 241
245 /* Now do the horrible hacks */ 242 /* Now do the horrible hacks */
246 tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); 243 tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL);
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index e9eb4f83b1d5..c3327f3d8cf7 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -190,8 +190,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
190 ret = -EINVAL; 190 ret = -EINVAL;
191 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], 191 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0],
192 oirq.np->full_name); 192 oirq.np->full_name);
193 spu->irqs[i] = irq_create_of_mapping(oirq.np, 193 spu->irqs[i] = irq_create_of_mapping(&oirq);
194 oirq.args, oirq.args_count);
195 if (spu->irqs[i] == NO_IRQ) { 194 if (spu->irqs[i] == NO_IRQ) {
196 pr_debug("spu_new: failed to map it !\n"); 195 pr_debug("spu_new: failed to map it !\n");
197 goto err; 196 goto err;
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index 288226deffa3..8904046556ad 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -334,7 +334,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev)
334 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); 334 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
335 laddr[1] = laddr[2] = 0; 335 laddr[1] = laddr[2] = 0;
336 of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq); 336 of_irq_parse_raw(hosenode, &pin, 1, laddr, &oirq);
337 dev->irq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 337 dev->irq = irq_create_of_mapping(&oirq);
338} 338}
339 339
340DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); 340DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575);
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c
index 6dcf9cc38ffb..18380e8f6dfe 100644
--- a/arch/powerpc/platforms/pseries/event_sources.c
+++ b/arch/powerpc/platforms/pseries/event_sources.c
@@ -59,8 +59,7 @@ void request_event_sources_irqs(struct device_node *np,
59 index++) { 59 index++) {
60 if (count > 15) 60 if (count > 15)
61 break; 61 break;
62 virqs[count] = irq_create_of_mapping(oirq.np, oirq.args, 62 virqs[count] = irq_create_of_mapping(&oirq);
63 oirq.args_count);
64 if (virqs[count] == NO_IRQ) { 63 if (virqs[count] == NO_IRQ) {
65 pr_err("event-sources: Unable to allocate " 64 pr_err("event-sources: Unable to allocate "
66 "interrupt number for %s\n", 65 "interrupt number for %s\n",
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 125fd1e992ff..0171604becb5 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -121,7 +121,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev)
121 if (ret) 121 if (ret)
122 return ret; 122 return ret;
123 123
124 virq = irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 124 virq = irq_create_of_mapping(&oirq);
125 if (virq == 0) 125 if (virq == 0)
126 return -EINVAL; 126 return -EINVAL;
127 dev->irq = virq; 127 dev->irq = virq;
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6839bda3ce3c..231fd5560e0d 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -41,7 +41,7 @@ unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
41 if (of_irq_parse_one(dev, index, &oirq)) 41 if (of_irq_parse_one(dev, index, &oirq))
42 return 0; 42 return 0;
43 43
44 return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 44 return irq_create_of_mapping(&oirq);
45} 45}
46EXPORT_SYMBOL_GPL(irq_of_parse_and_map); 46EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
47 47
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 95ae2e6c0e9d..3636bda8db14 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -645,7 +645,7 @@ static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
645 if (ret) 645 if (ret)
646 return ret; 646 return ret;
647 647
648 return irq_create_of_mapping(oirq.np, oirq.args, oirq.args_count); 648 return irq_create_of_mapping(&oirq);
649} 649}
650 650
651static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys) 651static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index ed76e3d15dd9..b3626d360971 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -46,9 +46,7 @@ extern int of_irq_parse_raw(struct device_node *parent, const __be32 *intspec,
46 struct of_phandle_args *out_irq); 46 struct of_phandle_args *out_irq);
47extern int of_irq_parse_one(struct device_node *device, int index, 47extern int of_irq_parse_one(struct device_node *device, int index,
48 struct of_phandle_args *out_irq); 48 struct of_phandle_args *out_irq);
49extern unsigned int irq_create_of_mapping(struct device_node *controller, 49extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data);
50 const u32 *intspec,
51 unsigned int intsize);
52extern int of_irq_to_resource(struct device_node *dev, int index, 50extern int of_irq_to_resource(struct device_node *dev, int index,
53 struct resource *r); 51 struct resource *r);
54extern int of_irq_count(struct device_node *dev); 52extern int of_irq_count(struct device_node *dev);
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 54a4d5223238..16d5dfb0e336 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -655,15 +655,14 @@ int irq_create_strict_mappings(struct irq_domain *domain, unsigned int irq_base,
655} 655}
656EXPORT_SYMBOL_GPL(irq_create_strict_mappings); 656EXPORT_SYMBOL_GPL(irq_create_strict_mappings);
657 657
658unsigned int irq_create_of_mapping(struct device_node *controller, 658unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
659 const u32 *intspec, unsigned int intsize)
660{ 659{
661 struct irq_domain *domain; 660 struct irq_domain *domain;
662 irq_hw_number_t hwirq; 661 irq_hw_number_t hwirq;
663 unsigned int type = IRQ_TYPE_NONE; 662 unsigned int type = IRQ_TYPE_NONE;
664 unsigned int virq; 663 unsigned int virq;
665 664
666 domain = controller ? irq_find_host(controller) : irq_default_domain; 665 domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain;
667 if (!domain) { 666 if (!domain) {
668#ifdef CONFIG_MIPS 667#ifdef CONFIG_MIPS
669 /* 668 /*
@@ -678,16 +677,16 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
678 return intspec[0]; 677 return intspec[0];
679#endif 678#endif
680 pr_warning("no irq domain found for %s !\n", 679 pr_warning("no irq domain found for %s !\n",
681 of_node_full_name(controller)); 680 of_node_full_name(irq_data->np));
682 return 0; 681 return 0;
683 } 682 }
684 683
685 /* If domain has no translation, then we assume interrupt line */ 684 /* If domain has no translation, then we assume interrupt line */
686 if (domain->ops->xlate == NULL) 685 if (domain->ops->xlate == NULL)
687 hwirq = intspec[0]; 686 hwirq = irq_data->args[0];
688 else { 687 else {
689 if (domain->ops->xlate(domain, controller, intspec, intsize, 688 if (domain->ops->xlate(domain, irq_data->np, irq_data->args,
690 &hwirq, &type)) 689 irq_data->args_count, &hwirq, &type))
691 return 0; 690 return 0;
692 } 691 }
693 692