Skip to content

Commit

Permalink
psi: Switch to ESB mode later
Browse files Browse the repository at this point in the history
There's an errata, if we switch to ESB mode before setting up
the various ESB mode related registers, a pending interrupts
can go wrong.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Jun 26, 2017
1 parent b0db1d7 commit 616489b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/psi.c
Expand Up @@ -826,10 +826,6 @@ static void psi_init_p9_interrupts(struct psi *psi)
bool is_p9ndd1;
u64 val;

/* Reset irq handling and switch to ESB mode */
out_be64(psi->regs + PSIHB_INTERRUPT_CONTROL, PSIHB_IRQ_RESET);
out_be64(psi->regs + PSIHB_INTERRUPT_CONTROL, 0);

/* Grab chip */
chip = get_chip(psi->chip_id);
if (!chip)
Expand Down Expand Up @@ -874,6 +870,10 @@ static void psi_init_p9_interrupts(struct psi *psi)
12, psi->esb_mmio, XIVE_SRC_LSI,
psi, &psi_p9_irq_ops);
}

/* Reset irq handling and switch to ESB mode */
out_be64(psi->regs + PSIHB_INTERRUPT_CONTROL, PSIHB_IRQ_RESET);
out_be64(psi->regs + PSIHB_INTERRUPT_CONTROL, 0);
}

static void psi_init_interrupts(struct psi *psi)
Expand Down

0 comments on commit 616489b

Please sign in to comment.