irqchip: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Lee Jones <lee@kernel.org> Cc: Stefan Wahren <stefan.wahren@i2se.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: bcm-kernel-feedback-list@broadcom.com Cc: Sylvain Lemieux <slemieux.tyco@gmail.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com> Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-tegra@vger.kernel.org Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Acked-by: Alexandre Torgue <alexandre.torgue@st.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
Родитель
5ed34d3a43
Коммит
e81f54c668
|
@ -147,13 +147,12 @@ static int __init armctrl_of_init(struct device_node *node,
|
|||
|
||||
base = of_iomap(node, 0);
|
||||
if (!base)
|
||||
panic("%s: unable to map IC registers\n",
|
||||
node->full_name);
|
||||
panic("%pOF: unable to map IC registers\n", node);
|
||||
|
||||
intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
|
||||
&armctrl_ops, NULL);
|
||||
if (!intc.domain)
|
||||
panic("%s: unable to create IRQ domain\n", node->full_name);
|
||||
panic("%pOF: unable to create IRQ domain\n", node);
|
||||
|
||||
for (b = 0; b < NR_BANKS; b++) {
|
||||
intc.pending[b] = base + reg_pending[b];
|
||||
|
@ -173,8 +172,8 @@ static int __init armctrl_of_init(struct device_node *node,
|
|||
int parent_irq = irq_of_parse_and_map(node, 0);
|
||||
|
||||
if (!parent_irq) {
|
||||
panic("%s: unable to get parent interrupt.\n",
|
||||
node->full_name);
|
||||
panic("%pOF: unable to get parent interrupt.\n",
|
||||
node);
|
||||
}
|
||||
irq_set_chained_handler(parent_irq, bcm2836_chained_handle_irq);
|
||||
} else {
|
||||
|
|
|
@ -282,8 +282,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
|
|||
{
|
||||
intc.base = of_iomap(node, 0);
|
||||
if (!intc.base) {
|
||||
panic("%s: unable to map local interrupt registers\n",
|
||||
node->full_name);
|
||||
panic("%pOF: unable to map local interrupt registers\n", node);
|
||||
}
|
||||
|
||||
bcm2835_init_local_timer_frequency();
|
||||
|
@ -292,7 +291,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
|
|||
&bcm2836_arm_irqchip_intc_ops,
|
||||
NULL);
|
||||
if (!intc.domain)
|
||||
panic("%s: unable to create IRQ domain\n", node->full_name);
|
||||
panic("%pOF: unable to create IRQ domain\n", node);
|
||||
|
||||
bcm2836_arm_irqchip_register_irq(LOCAL_IRQ_CNTPSIRQ,
|
||||
&bcm2836_arm_irqchip_timer);
|
||||
|
|
|
@ -341,13 +341,13 @@ static int __init irqcrossbar_init(struct device_node *node,
|
|||
int err;
|
||||
|
||||
if (!parent) {
|
||||
pr_err("%s: no parent, giving up\n", node->full_name);
|
||||
pr_err("%pOF: no parent, giving up\n", node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
parent_domain = irq_find_host(parent);
|
||||
if (!parent_domain) {
|
||||
pr_err("%s: unable to obtain parent domain\n", node->full_name);
|
||||
pr_err("%pOF: unable to obtain parent domain\n", node);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ static int __init irqcrossbar_init(struct device_node *node,
|
|||
node, &crossbar_domain_ops,
|
||||
NULL);
|
||||
if (!domain) {
|
||||
pr_err("%s: failed to allocated domain\n", node->full_name);
|
||||
pr_err("%pOF: failed to allocated domain\n", node);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ static int __init digicolor_of_init(struct device_node *node,
|
|||
|
||||
reg_base = of_iomap(node, 0);
|
||||
if (!reg_base) {
|
||||
pr_err("%s: unable to map IC registers\n", node->full_name);
|
||||
pr_err("%pOF: unable to map IC registers\n", node);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ static int __init digicolor_of_init(struct device_node *node,
|
|||
|
||||
ucregs = syscon_regmap_lookup_by_phandle(node, "syscon");
|
||||
if (IS_ERR(ucregs)) {
|
||||
pr_err("%s: unable to map UC registers\n", node->full_name);
|
||||
pr_err("%pOF: unable to map UC registers\n", node);
|
||||
return PTR_ERR(ucregs);
|
||||
}
|
||||
/* channel 1, regular IRQs */
|
||||
|
@ -97,7 +97,7 @@ static int __init digicolor_of_init(struct device_node *node,
|
|||
digicolor_irq_domain =
|
||||
irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL);
|
||||
if (!digicolor_irq_domain) {
|
||||
pr_err("%s: unable to create IRQ domain\n", node->full_name);
|
||||
pr_err("%pOF: unable to create IRQ domain\n", node);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ static int __init digicolor_of_init(struct device_node *node,
|
|||
"digicolor_irq", handle_level_irq,
|
||||
clr, 0, 0);
|
||||
if (ret) {
|
||||
pr_err("%s: unable to allocate IRQ gc\n", node->full_name);
|
||||
pr_err("%pOF: unable to allocate IRQ gc\n", node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,24 +79,24 @@ static int __init dw_apb_ictl_init(struct device_node *np,
|
|||
/* Map the parent interrupt for the chained handler */
|
||||
irq = irq_of_parse_and_map(np, 0);
|
||||
if (irq <= 0) {
|
||||
pr_err("%s: unable to parse irq\n", np->full_name);
|
||||
pr_err("%pOF: unable to parse irq\n", np);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = of_address_to_resource(np, 0, &r);
|
||||
if (ret) {
|
||||
pr_err("%s: unable to get resource\n", np->full_name);
|
||||
pr_err("%pOF: unable to get resource\n", np);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!request_mem_region(r.start, resource_size(&r), np->full_name)) {
|
||||
pr_err("%s: unable to request mem region\n", np->full_name);
|
||||
pr_err("%pOF: unable to request mem region\n", np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
iobase = ioremap(r.start, resource_size(&r));
|
||||
if (!iobase) {
|
||||
pr_err("%s: unable to map resource\n", np->full_name);
|
||||
pr_err("%pOF: unable to map resource\n", np);
|
||||
ret = -ENOMEM;
|
||||
goto err_release;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
|
|||
domain = irq_domain_add_linear(np, nrirqs,
|
||||
&irq_generic_chip_ops, NULL);
|
||||
if (!domain) {
|
||||
pr_err("%s: unable to add irq domain\n", np->full_name);
|
||||
pr_err("%pOF: unable to add irq domain\n", np);
|
||||
ret = -ENOMEM;
|
||||
goto err_unmap;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
|
|||
handle_level_irq, clr, 0,
|
||||
IRQ_GC_INIT_MASK_CACHE);
|
||||
if (ret) {
|
||||
pr_err("%s: unable to alloc irq domain gc\n", np->full_name);
|
||||
pr_err("%pOF: unable to alloc irq domain gc\n", np);
|
||||
goto err_unmap;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ static int __init its_pci_of_msi_init(void)
|
|||
if (its_pci_msi_init_one(of_node_to_fwnode(np), np->full_name))
|
||||
continue;
|
||||
|
||||
pr_info("PCI/MSI: %s domain created\n", np->full_name);
|
||||
pr_info("PCI/MSI: %pOF domain created\n", np);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1822,13 +1822,13 @@ static int __init its_of_probe(struct device_node *node)
|
|||
for (np = of_find_matching_node(node, its_device_id); np;
|
||||
np = of_find_matching_node(np, its_device_id)) {
|
||||
if (!of_property_read_bool(np, "msi-controller")) {
|
||||
pr_warn("%s: no msi-controller property, ITS ignored\n",
|
||||
np->full_name);
|
||||
pr_warn("%pOF: no msi-controller property, ITS ignored\n",
|
||||
np);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (of_address_to_resource(np, 0, &res)) {
|
||||
pr_warn("%s: no regs?\n", np->full_name);
|
||||
pr_warn("%pOF: no regs?\n", np);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1057,7 +1057,7 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node)
|
|||
if (WARN_ON(cpu == -1))
|
||||
continue;
|
||||
|
||||
pr_cont("%s[%d] ", cpu_node->full_name, cpu);
|
||||
pr_cont("%pOF[%d] ", cpu_node, cpu);
|
||||
|
||||
cpumask_set_cpu(cpu, &part->mask);
|
||||
}
|
||||
|
@ -1125,15 +1125,13 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
|
|||
|
||||
dist_base = of_iomap(node, 0);
|
||||
if (!dist_base) {
|
||||
pr_err("%s: unable to map gic dist registers\n",
|
||||
node->full_name);
|
||||
pr_err("%pOF: unable to map gic dist registers\n", node);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
err = gic_validate_dist_version(dist_base);
|
||||
if (err) {
|
||||
pr_err("%s: no distributor detected, giving up\n",
|
||||
node->full_name);
|
||||
pr_err("%pOF: no distributor detected, giving up\n", node);
|
||||
goto out_unmap_dist;
|
||||
}
|
||||
|
||||
|
@ -1153,8 +1151,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
|
|||
ret = of_address_to_resource(node, 1 + i, &res);
|
||||
rdist_regs[i].redist_base = of_iomap(node, 1 + i);
|
||||
if (ret || !rdist_regs[i].redist_base) {
|
||||
pr_err("%s: couldn't map region %d\n",
|
||||
node->full_name, i);
|
||||
pr_err("%pOF: couldn't map region %d\n", node, i);
|
||||
err = -ENODEV;
|
||||
goto out_unmap_rdist;
|
||||
}
|
||||
|
|
|
@ -214,13 +214,13 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
|
|||
int i;
|
||||
|
||||
if (!parent) {
|
||||
pr_err("%s: no parent, giving up\n", node->full_name);
|
||||
pr_err("%pOF: no parent, giving up\n", node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
parent_domain = irq_find_host(parent);
|
||||
if (!parent_domain) {
|
||||
pr_err("%s: unable to get parent domain\n", node->full_name);
|
||||
pr_err("%pOF: unable to get parent domain\n", node);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ static int __init lpc32xx_of_ic_init(struct device_node *node,
|
|||
|
||||
irqc->base = of_iomap(node, 0);
|
||||
if (!irqc->base) {
|
||||
pr_err("%s: unable to map registers\n", node->full_name);
|
||||
pr_err("%pOF: unable to map registers\n", node);
|
||||
kfree(irqc);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -178,8 +178,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
|
|||
chip_data->intpol_words[i] = size / 4;
|
||||
chip_data->intpol_bases[i] = of_iomap(node, i);
|
||||
if (ret || !chip_data->intpol_bases[i]) {
|
||||
pr_err("%s: couldn't map region %d\n",
|
||||
node->full_name, i);
|
||||
pr_err("%pOF: couldn't map region %d\n", node, i);
|
||||
ret = -ENODEV;
|
||||
goto out_free_intpol;
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ static void __init icoll_add_domain(struct device_node *np,
|
|||
&icoll_irq_domain_ops, NULL);
|
||||
|
||||
if (!icoll_domain)
|
||||
panic("%s: unable to create irq domain", np->full_name);
|
||||
panic("%pOF: unable to create irq domain", np);
|
||||
}
|
||||
|
||||
static void __iomem * __init icoll_init_iobase(struct device_node *np)
|
||||
|
@ -188,7 +188,7 @@ static void __iomem * __init icoll_init_iobase(struct device_node *np)
|
|||
|
||||
icoll_base = of_io_request_and_map(np, 0, np->name);
|
||||
if (IS_ERR(icoll_base))
|
||||
panic("%s: unable to map resource", np->full_name);
|
||||
panic("%pOF: unable to map resource", np);
|
||||
return icoll_base;
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ static int __init stm32_exti_init(struct device_node *node,
|
|||
|
||||
base = of_iomap(node, 0);
|
||||
if (!base) {
|
||||
pr_err("%s: Unable to map registers\n", node->full_name);
|
||||
pr_err("%pOF: Unable to map registers\n", node);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ static int __init stm32_exti_init(struct device_node *node,
|
|||
nr_exti = fls(readl_relaxed(base + EXTI_RTSR));
|
||||
writel_relaxed(0, base + EXTI_RTSR);
|
||||
|
||||
pr_info("%s: %d External IRQs detected\n", node->full_name, nr_exti);
|
||||
pr_info("%pOF: %d External IRQs detected\n", node, nr_exti);
|
||||
|
||||
domain = irq_domain_add_linear(node, nr_exti,
|
||||
&irq_exti_domain_ops, NULL);
|
||||
|
@ -163,8 +163,8 @@ static int __init stm32_exti_init(struct device_node *node,
|
|||
ret = irq_alloc_domain_generic_chips(domain, nr_exti, 1, "exti",
|
||||
handle_edge_irq, clr, 0, 0);
|
||||
if (ret) {
|
||||
pr_err("%s: Could not allocate generic interrupt chip.\n",
|
||||
node->full_name);
|
||||
pr_err("%pOF: Could not allocate generic interrupt chip.\n",
|
||||
node);
|
||||
goto out_free_domain;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,8 +97,8 @@ static int __init sun4i_of_init(struct device_node *node,
|
|||
{
|
||||
sun4i_irq_base = of_iomap(node, 0);
|
||||
if (!sun4i_irq_base)
|
||||
panic("%s: unable to map IC registers\n",
|
||||
node->full_name);
|
||||
panic("%pOF: unable to map IC registers\n",
|
||||
node);
|
||||
|
||||
/* Disable all interrupts */
|
||||
writel(0, sun4i_irq_base + SUN4I_IRQ_ENABLE_REG(0));
|
||||
|
@ -124,7 +124,7 @@ static int __init sun4i_of_init(struct device_node *node,
|
|||
sun4i_irq_domain = irq_domain_add_linear(node, 3 * 32,
|
||||
&sun4i_irq_ops, NULL);
|
||||
if (!sun4i_irq_domain)
|
||||
panic("%s: unable to create IRQ domain\n", node->full_name);
|
||||
panic("%pOF: unable to create IRQ domain\n", node);
|
||||
|
||||
set_handle_irq(sun4i_handle_irq);
|
||||
|
||||
|
|
|
@ -291,13 +291,13 @@ static int __init tegra_ictlr_init(struct device_node *node,
|
|||
int err;
|
||||
|
||||
if (!parent) {
|
||||
pr_err("%s: no parent, giving up\n", node->full_name);
|
||||
pr_err("%pOF: no parent, giving up\n", node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
parent_domain = irq_find_host(parent);
|
||||
if (!parent_domain) {
|
||||
pr_err("%s: unable to obtain parent domain\n", node->full_name);
|
||||
pr_err("%pOF: unable to obtain parent domain\n", node);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
@ -329,29 +329,29 @@ static int __init tegra_ictlr_init(struct device_node *node,
|
|||
}
|
||||
|
||||
if (!num_ictlrs) {
|
||||
pr_err("%s: no valid regions, giving up\n", node->full_name);
|
||||
pr_err("%pOF: no valid regions, giving up\n", node);
|
||||
err = -ENOMEM;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
WARN(num_ictlrs != soc->num_ictlrs,
|
||||
"%s: Found %u interrupt controllers in DT; expected %u.\n",
|
||||
node->full_name, num_ictlrs, soc->num_ictlrs);
|
||||
"%pOF: Found %u interrupt controllers in DT; expected %u.\n",
|
||||
node, num_ictlrs, soc->num_ictlrs);
|
||||
|
||||
|
||||
domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32,
|
||||
node, &tegra_ictlr_domain_ops,
|
||||
lic);
|
||||
if (!domain) {
|
||||
pr_err("%s: failed to allocated domain\n", node->full_name);
|
||||
pr_err("%pOF: failed to allocated domain\n", node);
|
||||
err = -ENOMEM;
|
||||
goto out_unmap;
|
||||
}
|
||||
|
||||
tegra_ictlr_syscore_init();
|
||||
|
||||
pr_info("%s: %d interrupts forwarded to %s\n",
|
||||
node->full_name, num_ictlrs * 32, parent->full_name);
|
||||
pr_info("%pOF: %d interrupts forwarded to %pOF\n",
|
||||
node, num_ictlrs * 32, parent);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -186,8 +186,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
|
|||
if (irqc->intr_mask >> nr_irq)
|
||||
pr_warn("irq-xilinx: mismatch in kind-of-intr param\n");
|
||||
|
||||
pr_info("irq-xilinx: %s: num_irq=%d, edge=0x%x\n",
|
||||
intc->full_name, nr_irq, irqc->intr_mask);
|
||||
pr_info("irq-xilinx: %pOF: num_irq=%d, edge=0x%x\n",
|
||||
intc, nr_irq, irqc->intr_mask);
|
||||
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче