Message ID | 20180815051039.7019-1-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
Series | [1/5] phb4: Workaround PHB errata with CFG write UR/CA errors | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
On Wed, Aug 15, 2018 at 3:10 PM, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > 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 and it seems to fix the bonus freeze bug. I had some problems with EEH while testing this, but I think those are due to the Linux race during boot rather than this. Stewart, can you put this in stable too? Tested-By: Oliver O'Halloran <oohall@gmail.com> > --- > hw/phb4.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/hw/phb4.c b/hw/phb4.c > index 5e07e2bc..c329e5a2 100644 > --- a/hw/phb4.c > +++ b/hw/phb4.c > @@ -4686,7 +4686,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); > -- > 2.17.1 > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot
Oliver <oohall@gmail.com> writes: > On Wed, Aug 15, 2018 at 3:10 PM, Benjamin Herrenschmidt > <benh@kernel.crashing.org> wrote: >> 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 and it seems to fix the bonus freeze bug. I had some problems > with EEH while testing this, but I think those are due to the Linux > race during boot rather than this. > > Stewart, can you put this in stable too? Done. Merged to master as of 9a83ab711ea3c76919f311cb1c78e051ae59c808 and to 6.0.x as of 9e03e6fe7ba7862310ee15899237c6819a6fb92a
diff --git a/hw/phb4.c b/hw/phb4.c index 5e07e2bc..c329e5a2 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -4686,7 +4686,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);
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> --- hw/phb4.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)