aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/pci/xen.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-10 23:18:46 +0100
committerThomas Gleixner <tglx@linutronix.de>2021-12-16 22:16:37 +0100
commit0bcfade920804d597888e4181bc315a3c500280d (patch)
tree99cea45e8751de883c3a04cb8fdf37b477033b4d /arch/x86/pci/xen.c
parentPCI/MSI: Set pci_dev::msi[x]_enabled early (diff)
downloadwireguard-linux-0bcfade920804d597888e4181bc315a3c500280d.tar.xz
wireguard-linux-0bcfade920804d597888e4181bc315a3c500280d.zip
x86/pci/XEN: Use PCI device property
instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20211210221813.311410967@linutronix.de
Diffstat (limited to 'arch/x86/pci/xen.c')
-rw-r--r--arch/x86/pci/xen.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index a63d30a52879..bfd87b46bc51 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -399,9 +399,7 @@ static void xen_teardown_msi_irqs(struct pci_dev *dev)
static void xen_pv_teardown_msi_irqs(struct pci_dev *dev)
{
- struct msi_desc *msidesc = first_pci_msi_entry(dev);
-
- if (msidesc->pci.msi_attrib.is_msix)
+ if (dev->msix_enabled)
xen_pci_frontend_disable_msix(dev);
else
xen_pci_frontend_disable_msi(dev);
@@ -417,10 +415,7 @@ static int xen_msi_domain_alloc_irqs(struct irq_domain *domain,
if (WARN_ON_ONCE(!dev_is_pci(dev)))
return -EINVAL;
- if (first_msi_entry(dev)->pci.msi_attrib.is_msix)
- type = PCI_CAP_ID_MSIX;
- else
- type = PCI_CAP_ID_MSI;
+ type = to_pci_dev(dev)->msix_enabled ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
return xen_msi_ops.setup_msi_irqs(to_pci_dev(dev), nvec, type);
}