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:
"Two fixlets for the armada SoC interrupt controller"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip: armada-370-xp: Fix MPIC interrupt handling
irqchip: armada-370-xp: Fix MSI interrupt handling

+17 -6
+17 -6
drivers/irqchip/irq-armada-370-xp.c
··· 43 43 #define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) 44 44 #define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4) 45 45 #define ARMADA_370_XP_INT_SOURCE_CPU_MASK 0xF 46 + #define ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid) ((BIT(0) | BIT(8)) << cpuid) 46 47 47 48 #define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) 48 49 #define ARMADA_375_PPI_CAUSE (0x10) ··· 407 406 struct irq_desc *desc) 408 407 { 409 408 struct irq_chip *chip = irq_get_chip(irq); 410 - unsigned long irqmap, irqn; 409 + unsigned long irqmap, irqn, irqsrc, cpuid; 411 410 unsigned int cascade_irq; 412 411 413 412 chained_irq_enter(chip, desc); 414 413 415 414 irqmap = readl_relaxed(per_cpu_int_base + ARMADA_375_PPI_CAUSE); 416 - 417 - if (irqmap & BIT(0)) { 418 - armada_370_xp_handle_msi_irq(NULL, true); 419 - irqmap &= ~BIT(0); 420 - } 415 + cpuid = cpu_logical_map(smp_processor_id()); 421 416 422 417 for_each_set_bit(irqn, &irqmap, BITS_PER_LONG) { 418 + irqsrc = readl_relaxed(main_int_base + 419 + ARMADA_370_XP_INT_SOURCE_CTL(irqn)); 420 + 421 + /* Check if the interrupt is not masked on current CPU. 422 + * Test IRQ (0-1) and FIQ (8-9) mask bits. 423 + */ 424 + if (!(irqsrc & ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid))) 425 + continue; 426 + 427 + if (irqn == 1) { 428 + armada_370_xp_handle_msi_irq(NULL, true); 429 + continue; 430 + } 431 + 423 432 cascade_irq = irq_find_mapping(armada_370_xp_mpic_domain, irqn); 424 433 generic_handle_irq(cascade_irq); 425 434 }