Skip to content

Commit

Permalink
phb4: Workaround PHB errata with CFG write UR/CA errors
Browse files Browse the repository at this point in the history
[ Upstream commit 9a83ab7 ]

If the PHB encounters a UR or CA status on a CFG write, it will
incorrectly freeze the wrong PE. Instead of using the PE# specified
in the CONFIG_ADDRESS register, it will use the PE# of whatever
MMIO occurred last.

Work around this disabling freeze on such errors

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-By: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Sep 13, 2018
1 parent a20833d commit 9e03e6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -4572,7 +4572,11 @@ static void phb4_init_errors(struct phb4 *p)
out_be64(p->regs + 0x0d00, 0xffffffffffffffffull);
out_be64(p->regs + 0x0d08, 0x0000000000000000ull);
out_be64(p->regs + 0x0d18, 0xffffff0fffffffffull);
out_be64(p->regs + 0x0d28, 0x0000400a00000000ull);

/* Errata: Clear bit 17, otherwise a CFG write UR/CA will incorrectly
* freeze a "random" PE (whatever last PE did an MMIO)
*/
out_be64(p->regs + 0x0d28, 0x0000000a00000000ull);
out_be64(p->regs + 0x0d30, 0xdff7bd05f7ddfff0ull); /* XXX CAPI has diff. value */
out_be64(p->regs + 0x0d40, 0x0000000000000000ull);
out_be64(p->regs + 0x0d48, 0x0000000000000000ull);
Expand Down

0 comments on commit 9e03e6f

Please sign in to comment.