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

PCI: microchip: Add missing chained_irq_enter()/exit() calls

Two of the chained IRQ handlers miss their
chained_irq_enter()/chained_irq_exit() calls, so add them in to avoid
potentially lost interrupts.

Reported by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/linux-pci/87h76b8nxc.wl-maz@kernel.org
Link: https://lore.kernel.org/r/20220511095504.2273799-1-conor.dooley@microchip.com
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

authored by

Conor Dooley and committed by
Lorenzo Pieralisi
30097efa c049b4b3

+10
+10
drivers/pci/controller/pcie-microchip-host.c
··· 406 406 static void mc_handle_msi(struct irq_desc *desc) 407 407 { 408 408 struct mc_pcie *port = irq_desc_get_handler_data(desc); 409 + struct irq_chip *chip = irq_desc_get_chip(desc); 409 410 struct device *dev = port->dev; 410 411 struct mc_msi *msi = &port->msi; 411 412 void __iomem *bridge_base_addr = ··· 414 413 unsigned long status; 415 414 u32 bit; 416 415 int ret; 416 + 417 + chained_irq_enter(chip, desc); 417 418 418 419 status = readl_relaxed(bridge_base_addr + ISTATUS_LOCAL); 419 420 if (status & PM_MSI_INT_MSI_MASK) { ··· 427 424 bit); 428 425 } 429 426 } 427 + 428 + chained_irq_exit(chip, desc); 430 429 } 431 430 432 431 static void mc_msi_bottom_irq_ack(struct irq_data *data) ··· 568 563 static void mc_handle_intx(struct irq_desc *desc) 569 564 { 570 565 struct mc_pcie *port = irq_desc_get_handler_data(desc); 566 + struct irq_chip *chip = irq_desc_get_chip(desc); 571 567 struct device *dev = port->dev; 572 568 void __iomem *bridge_base_addr = 573 569 port->axi_base_addr + MC_PCIE_BRIDGE_ADDR; 574 570 unsigned long status; 575 571 u32 bit; 576 572 int ret; 573 + 574 + chained_irq_enter(chip, desc); 577 575 578 576 status = readl_relaxed(bridge_base_addr + ISTATUS_LOCAL); 579 577 if (status & PM_MSI_INT_INTX_MASK) { ··· 589 581 bit); 590 582 } 591 583 } 584 + 585 + chained_irq_exit(chip, desc); 592 586 } 593 587 594 588 static void mc_ack_intx_irq(struct irq_data *data)