Message ID | 20190912172218.23335-9-clg@kaod.org |
---|---|
State | Superseded |
Headers | show |
Series | xive: new interfaces, fixes and cleanups | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (470ffb5f29d741c3bed600f7bb7bf0cbb270e05a) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
On Thu, 2019-09-12 at 19:22 +0200, Cédric Le Goater wrote: > These were needed to workaround HW bugs in PHB4 LSIs of POWER9 DD1.0 > processors. > > Signed-off-by: Cédric Le Goater <clg@kaod.org> > --- > include/opal-api.h | 4 ++-- > hw/xive.c | 12 ------------ > 2 files changed, 2 insertions(+), 14 deletions(-) > > diff --git a/include/opal-api.h b/include/opal-api.h > index ad913bfa382d..e7156f36a756 100644 > --- a/include/opal-api.h > +++ b/include/opal-api.h > @@ -1149,8 +1149,8 @@ enum { > OPAL_XIVE_IRQ_STORE_EOI = 0x00000002, > OPAL_XIVE_IRQ_LSI = 0x00000004, > OPAL_XIVE_IRQ_SHIFT_BUG = 0x00000008, > - OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, > - OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, > + OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, /* DD1.0 workaround */ > + OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, /* DD1.0 workaround */ This should probably specify that it's a P9 DD1.0 workaround. Does the kernel still respect these flags? If so we might want to keep them supported in case we need them as a workaround for future bugs. > }; > > /* Flags for OPAL_XIVE_GET/SET_QUEUE_INFO */ > diff --git a/hw/xive.c b/hw/xive.c > index 2f184dcee5d2..6f7d36ad4ca0 100644 > --- a/hw/xive.c > +++ b/hw/xive.c > @@ -3630,18 +3630,6 @@ static int64_t opal_xive_get_irq_info(uint32_t girq, > if (out_flags) > *out_flags = xive_convert_irq_flags(s->flags); > > - /* > - * If the orig source has a set_xive callback, then set > - * OPAL_XIVE_IRQ_MASK_VIA_FW as masking/unmasking requires > - * source specific workarounds. Same with EOI. > - */ > - if (out_flags && s->orig_ops) { > - if (s->orig_ops->set_xive) > - *out_flags |= OPAL_XIVE_IRQ_MASK_VIA_FW; > - if (s->orig_ops->eoi) > - *out_flags |= OPAL_XIVE_IRQ_EOI_VIA_FW; > - } > - > idx = girq - s->esb_base; > > if (out_esb_shift)
On 24/09/2019 07:43, Oliver O'Halloran wrote: > On Thu, 2019-09-12 at 19:22 +0200, Cédric Le Goater wrote: >> These were needed to workaround HW bugs in PHB4 LSIs of POWER9 DD1.0 >> processors. >> >> Signed-off-by: Cédric Le Goater <clg@kaod.org> >> --- >> include/opal-api.h | 4 ++-- >> hw/xive.c | 12 ------------ >> 2 files changed, 2 insertions(+), 14 deletions(-) >> >> diff --git a/include/opal-api.h b/include/opal-api.h >> index ad913bfa382d..e7156f36a756 100644 >> --- a/include/opal-api.h >> +++ b/include/opal-api.h >> @@ -1149,8 +1149,8 @@ enum { >> OPAL_XIVE_IRQ_STORE_EOI = 0x00000002, >> OPAL_XIVE_IRQ_LSI = 0x00000004, >> OPAL_XIVE_IRQ_SHIFT_BUG = 0x00000008, >> - OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, >> - OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, >> + OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, /* DD1.0 workaround */ >> + OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, /* DD1.0 workaround */ > > This should probably specify that it's a P9 DD1.0 workaround. > > Does the kernel still respect these flags? The Linux code still handles this DD1.0 case. Which adds quite a lot of noise and does not help understanding. > If so we might want to keep > them supported in case we need them as a workaround for future bugs. Yes. I hope not. We can keep the flags but there is no reason to keep the code in the OPAL XIVE P9 driver. C. >> }; >> >> /* Flags for OPAL_XIVE_GET/SET_QUEUE_INFO */ >> diff --git a/hw/xive.c b/hw/xive.c >> index 2f184dcee5d2..6f7d36ad4ca0 100644 >> --- a/hw/xive.c >> +++ b/hw/xive.c >> @@ -3630,18 +3630,6 @@ static int64_t opal_xive_get_irq_info(uint32_t girq, >> if (out_flags) >> *out_flags = xive_convert_irq_flags(s->flags); >> >> - /* >> - * If the orig source has a set_xive callback, then set >> - * OPAL_XIVE_IRQ_MASK_VIA_FW as masking/unmasking requires >> - * source specific workarounds. Same with EOI. >> - */ >> - if (out_flags && s->orig_ops) { >> - if (s->orig_ops->set_xive) >> - *out_flags |= OPAL_XIVE_IRQ_MASK_VIA_FW; >> - if (s->orig_ops->eoi) >> - *out_flags |= OPAL_XIVE_IRQ_EOI_VIA_FW; >> - } >> - >> idx = girq - s->esb_base; >> >> if (out_esb_shift) >
diff --git a/include/opal-api.h b/include/opal-api.h index ad913bfa382d..e7156f36a756 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -1149,8 +1149,8 @@ enum { OPAL_XIVE_IRQ_STORE_EOI = 0x00000002, OPAL_XIVE_IRQ_LSI = 0x00000004, OPAL_XIVE_IRQ_SHIFT_BUG = 0x00000008, - OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, - OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, + OPAL_XIVE_IRQ_MASK_VIA_FW = 0x00000010, /* DD1.0 workaround */ + OPAL_XIVE_IRQ_EOI_VIA_FW = 0x00000020, /* DD1.0 workaround */ }; /* Flags for OPAL_XIVE_GET/SET_QUEUE_INFO */ diff --git a/hw/xive.c b/hw/xive.c index 2f184dcee5d2..6f7d36ad4ca0 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -3630,18 +3630,6 @@ static int64_t opal_xive_get_irq_info(uint32_t girq, if (out_flags) *out_flags = xive_convert_irq_flags(s->flags); - /* - * If the orig source has a set_xive callback, then set - * OPAL_XIVE_IRQ_MASK_VIA_FW as masking/unmasking requires - * source specific workarounds. Same with EOI. - */ - if (out_flags && s->orig_ops) { - if (s->orig_ops->set_xive) - *out_flags |= OPAL_XIVE_IRQ_MASK_VIA_FW; - if (s->orig_ops->eoi) - *out_flags |= OPAL_XIVE_IRQ_EOI_VIA_FW; - } - idx = girq - s->esb_base; if (out_esb_shift)
These were needed to workaround HW bugs in PHB4 LSIs of POWER9 DD1.0 processors. Signed-off-by: Cédric Le Goater <clg@kaod.org> --- include/opal-api.h | 4 ++-- hw/xive.c | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-)