Skip to content

Commit

Permalink
PCI: microchip: Add missing chained_irq_enter()/exit() calls
Browse files Browse the repository at this point in the history
[ Upstream commit 30097ef ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ConchuOD authored and gregkh committed Jun 9, 2022
1 parent 89f7e92 commit 3e7c3ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/pci/controller/pcie-microchip-host.c
Expand Up @@ -406,6 +406,7 @@ static void mc_pcie_enable_msi(struct mc_pcie *port, void __iomem *base)
static void mc_handle_msi(struct irq_desc *desc)
{
struct mc_pcie *port = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
struct device *dev = port->dev;
struct mc_msi *msi = &port->msi;
void __iomem *bridge_base_addr =
Expand All @@ -414,6 +415,8 @@ static void mc_handle_msi(struct irq_desc *desc)
u32 bit;
int ret;

chained_irq_enter(chip, desc);

status = readl_relaxed(bridge_base_addr + ISTATUS_LOCAL);
if (status & PM_MSI_INT_MSI_MASK) {
status = readl_relaxed(bridge_base_addr + ISTATUS_MSI);
Expand All @@ -424,6 +427,8 @@ static void mc_handle_msi(struct irq_desc *desc)
bit);
}
}

chained_irq_exit(chip, desc);
}

static void mc_msi_bottom_irq_ack(struct irq_data *data)
Expand Down Expand Up @@ -563,13 +568,16 @@ static int mc_allocate_msi_domains(struct mc_pcie *port)
static void mc_handle_intx(struct irq_desc *desc)
{
struct mc_pcie *port = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
struct device *dev = port->dev;
void __iomem *bridge_base_addr =
port->axi_base_addr + MC_PCIE_BRIDGE_ADDR;
unsigned long status;
u32 bit;
int ret;

chained_irq_enter(chip, desc);

status = readl_relaxed(bridge_base_addr + ISTATUS_LOCAL);
if (status & PM_MSI_INT_INTX_MASK) {
status &= PM_MSI_INT_INTX_MASK;
Expand All @@ -581,6 +589,8 @@ static void mc_handle_intx(struct irq_desc *desc)
bit);
}
}

chained_irq_exit(chip, desc);
}

static void mc_ack_intx_irq(struct irq_data *data)
Expand Down

0 comments on commit 3e7c3ae

Please sign in to comment.