[Skiboot] [PATCH v2 1/5] xive, interrupts: Add a mask() source op

Oliver O'Halloran oohall at gmail.com
Thu Sep 5 17:52:22 AEST 2019


On Thu, Sep 5, 2019 at 4:52 PM Cédric Le Goater <clg at kaod.org> wrote:
>
> On 05/09/2019 05:08, Oliver O'Halloran wrote:
> > We want to be able to mask LSIs from inside of skiboot. For P9 most of
> > the actual interrupt wrangling is internal to the XIVE driver, so we
> > need to provide a way for XIVE based interrupt sources to mask
> > and interrupt. Do this by adding a mask() function to the interrupt
> > source ops structure.
> >
> > Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> > ---
> > v2: patch added in v2
> > ---
> >  hw/xive.c            | 18 ++++++++++++++++++
> >  include/interrupts.h |  1 +
> >  include/xive.h       |  1 +
> >  3 files changed, 20 insertions(+)
> >
> > diff --git a/hw/xive.c b/hw/xive.c
> > index 76b41a9ee95f..ea970de7898e 100644
> > --- a/hw/xive.c
> > +++ b/hw/xive.c
> > @@ -2705,6 +2705,23 @@ static void xive_source_eoi(struct irq_source *is, uint32_t isn)
> >               __xive_source_eoi(is, isn);
> >  }
> >
> > +void __xive_source_mask(struct irq_source *is, uint32_t isn)
> I would remove the '__' prefix.
>
> > +{
> > +     struct xive_src *s = container_of(is, struct xive_src, is);
> > +
> > +     xive_update_irq_mask(s, isn - s->esb_base, true);
> > +}
> > +
> > +static void xive_source_mask(struct irq_source *is, uint32_t isn)
>
> and get rid of the mask() handler.

Yeah that's cleaner. I'll drop the new op and fold the addition of
xive_source_mask() into the patch that uses it.


More information about the Skiboot mailing list