[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 09/11] vpci/msi: add MSI handlers



On Tue, Oct 10, 2017 at 11:35:26AM +0000, Roger Pau Monné wrote:
> On Wed, Oct 04, 2017 at 08:34:13AM +0000, Jan Beulich wrote:
> > >>> On 19.09.17 at 17:29, <roger.pau@xxxxxxxxxx> wrote:
> > > +static void vpci_msi_enable(const struct pci_dev *pdev, struct vpci_msi 
> > > *msi,
> > > +                            unsigned int vectors)
> > > +{
> > > +    int ret;
> > > +
> > > +    ASSERT(!msi->enabled);
> > > +    ret = vpci_msi_arch_enable(msi, pdev, vectors);
> > > +    if ( ret )
> > > +        return;
> > > +
> > > +    /* Apply the mask bits. */
> > > +    if ( msi->masking )
> > > +    {
> > > +        unsigned int i;
> > > +        uint32_t mask = msi->mask;
> > > +
> > > +        for ( i = ffs(mask) - 1; mask && i < vectors; i = ffs(mask) - 1 )
> > > +        {
> > > +            vpci_msi_arch_mask(msi, pdev, i, true);
> > > +            __clear_bit(i, &mask);
> > > +        }
> > > +    }
> > > +
> > > +    __msi_set_enable(pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn),
> > > +                     PCI_FUNC(pdev->devfn), msi->pos, 1);
> > 
> > This is very unlikely to be a function that arch-independent code is
> > permitted to call.
> 
> Right, I could remove the '__' prefix, or introduce a
> vpci_msi_arch_dev_enable helper that calls this function.

So would using msi_set_enable instead be acceptable?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.