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.

Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
"A few minor fixlets in ARM SoC irq drivers and a fix for a memory leak
which I introduced in the last round of cleanups :("

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Fix memory leak when calling irq_free_hwirqs()
irqchip: spear_shirq: Fix interrupt offset
irqchip: brcmstb-l2: Level-2 interrupts are edge sensitive
irqchip: armada-370-xp: Mask all interrupts during initialization.

+19 -6
+15 -2
drivers/irqchip/irq-armada-370-xp.c
··· 334 334 335 335 static void armada_xp_mpic_smp_cpu_init(void) 336 336 { 337 + u32 control; 338 + int nr_irqs, i; 339 + 340 + control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL); 341 + nr_irqs = (control >> 2) & 0x3ff; 342 + 343 + for (i = 0; i < nr_irqs; i++) 344 + writel(i, per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS); 345 + 337 346 /* Clear pending IPIs */ 338 347 writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); 339 348 ··· 483 474 struct device_node *parent) 484 475 { 485 476 struct resource main_int_res, per_cpu_int_res; 486 - int parent_irq; 477 + int parent_irq, nr_irqs, i; 487 478 u32 control; 488 479 489 480 BUG_ON(of_address_to_resource(node, 0, &main_int_res)); ··· 505 496 BUG_ON(!per_cpu_int_base); 506 497 507 498 control = readl(main_int_base + ARMADA_370_XP_INT_CONTROL); 499 + nr_irqs = (control >> 2) & 0x3ff; 500 + 501 + for (i = 0; i < nr_irqs; i++) 502 + writel(i, main_int_base + ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS); 508 503 509 504 armada_370_xp_mpic_domain = 510 - irq_domain_add_linear(node, (control >> 2) & 0x3ff, 505 + irq_domain_add_linear(node, nr_irqs, 511 506 &armada_370_xp_mpic_irq_ops, NULL); 512 507 513 508 BUG_ON(!armada_370_xp_mpic_domain);
+1 -1
drivers/irqchip/irq-brcmstb-l2.c
··· 150 150 151 151 /* Allocate a single Generic IRQ chip for this node */ 152 152 ret = irq_alloc_domain_generic_chips(data->domain, 32, 1, 153 - np->full_name, handle_level_irq, clr, 0, 0); 153 + np->full_name, handle_edge_irq, clr, 0, 0); 154 154 if (ret) { 155 155 pr_err("failed to allocate generic irq chip\n"); 156 156 goto out_free_domain;
+1 -1
drivers/irqchip/spear-shirq.c
··· 125 125 }; 126 126 127 127 static struct spear_shirq spear320_shirq_ras3 = { 128 - .irq_nr = 3, 128 + .irq_nr = 7, 129 129 .irq_bit_off = 0, 130 130 .invalid_irq = 1, 131 131 .regs = {
+2 -2
kernel/irq/irqdesc.c
··· 455 455 */ 456 456 void irq_free_hwirqs(unsigned int from, int cnt) 457 457 { 458 - int i; 458 + int i, j; 459 459 460 - for (i = from; cnt > 0; i++, cnt--) { 460 + for (i = from, j = cnt; j > 0; i++, j--) { 461 461 irq_set_status_flags(i, _IRQ_NOREQUEST | _IRQ_NOPROBE); 462 462 arch_teardown_hwirq(i); 463 463 }