[PATCH v3 2/2] PCI/MSI: Implement irq_mask_noflush() for MSI-X
Keith Busch
kbusch at kernel.org
Sat Nov 7 12:00:50 PST 2026
On Fri, Nov 06, 2026 at 09:53:06PM +0100, Thomas Gleixner wrote:
> On Fri, Nov 06 2026 at 09:34, Keith Busch wrote:
> > -static inline void pci_msix_mask(struct msi_desc *desc)
> > +/* Posted write only: the device may still send an interrupt after return */
> > +static inline void pci_msix_mask_noflush(struct msi_desc *desc)
> > {
> > desc->pci.msix_ctrl |= PCI_MSIX_ENTRY_CTRL_MASKBIT;
> > + pci_msix_write_vector_ctrl(desc, desc->pci.msix_ctrl);
> > +}
> > +
> > +static inline void pci_msix_mask(struct msi_desc *desc)
> > +{
> > + pci_msix_mask_noflush(desc);
>
> That's before the offline check now, which looks more than wrong.
This is done on purpose: pci_msix_write_vector_ctrl() already has the
same offline check, so nothing actually gets written, same as before.
And regardless of whether it's offline or not, we have to set the
PCI_MSIX_ENTRY_CTRL_MASKBIT in the cached msxi_ctrl. That's common to
both paths, so it lives in the noflush helper to avoid duplicating it.
More information about the Linux-nvme
mailing list