Re: [PATCH 4/4] soc: marvell: rvu-pf: Handle function level reset (FLR) IRQs for VFs

From: Alexander Sverdlin
Date: Wed Sep 25 2024 - 05:19:09 EST


Hi Anshumali!

On Wed, 2024-09-25 at 09:13 +0000, Anshumali Gaur wrote:
> > > +static irqreturn_t rvu_gen_pf_me_intr_handler(int irq, void *pf_irq)
> > > +{
> > > + struct gen_pf_dev *pfdev = (struct gen_pf_dev *)pf_irq;
> > > + int vf, reg, num_reg = 1;
> > > + u64 intr;
> > > +
> > > + if (pfdev->total_vfs > 64)
> > > + num_reg = 2;
> > > +
> > > + for (reg = 0; reg < num_reg; reg++) {
> > > + intr = readq(pfdev->reg_base + RVU_PF_VFME_INTX(reg));
> > > + if (!intr)
> > > + continue;
> > > + for (vf = 0; vf < 64; vf++) {
> > > + if (!(intr & BIT_ULL(vf)))
> > > + continue;
> > > + /* clear trpend bit */
> > > + writeq(BIT_ULL(vf), pfdev->reg_base +
> > RVU_PF_VFTRPENDX(reg));
> > > + /* clear interrupt */
> > > + writeq(BIT_ULL(vf), pfdev->reg_base +
> > RVU_PF_VFME_INTX(reg));
> > > + }
> > > + }
> >
> > Should anything else have been performed in the IRQ handler besides
> > acknowledging the IRQ request?
> >
> We are just acknowledging the IRQ request here. 

But what's the goal of requesting the IRQ in the first place then?

--
Alexander Sverdlin.