mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
Merge branch 'pci/msi'
- Remove unused pci_irq_get_node() Greg Kroah-Hartman) - Move power state check out of pci_msi_supported() (Bjorn Helgaas) - Fix incorrect MSI-X masking on resume and revert related nvme quirk for Kingston NVME SSD running FW E8FK11.T (Jian-Hong Pan) - Make asm/msi.h mandatory and simplify PCI_MSI_IRQ_DOMAIN Kconfig (Palmer Dabbelt, Michal Simek) * pci/msi: PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist asm-generic: Make msi.h a mandatory include/asm header Revert "nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T" PCI/MSI: Fix incorrect MSI-X masking on resume PCI/MSI: Move power state check out of pci_msi_supported() PCI/MSI: Remove unused pci_irq_get_node()
This commit is contained in:
commit
c59f0da578
@ -17,7 +17,6 @@ generic-y += local64.h
|
||||
generic-y += mcs_spinlock.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += mmiowb.h
|
||||
generic-y += msi.h
|
||||
generic-y += parport.h
|
||||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
|
@ -12,7 +12,6 @@ generic-y += local.h
|
||||
generic-y += local64.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += mmiowb.h
|
||||
generic-y += msi.h
|
||||
generic-y += parport.h
|
||||
generic-y += preempt.h
|
||||
generic-y += seccomp.h
|
||||
|
@ -16,7 +16,6 @@ generic-y += local64.h
|
||||
generic-y += mcs_spinlock.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += mmiowb.h
|
||||
generic-y += msi.h
|
||||
generic-y += qrwlock.h
|
||||
generic-y += qspinlock.h
|
||||
generic-y += serial.h
|
||||
|
@ -13,7 +13,6 @@ generic-y += irq_work.h
|
||||
generic-y += local64.h
|
||||
generic-y += mcs_spinlock.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += msi.h
|
||||
generic-y += parport.h
|
||||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
|
@ -10,4 +10,3 @@ generic-y += local64.h
|
||||
generic-y += mcs_spinlock.h
|
||||
generic-y += preempt.h
|
||||
generic-y += vtime.h
|
||||
generic-y += msi.h
|
||||
|
@ -22,7 +22,6 @@ generic-y += kvm_para.h
|
||||
generic-y += local.h
|
||||
generic-y += local64.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += msi.h
|
||||
generic-y += percpu.h
|
||||
generic-y += preempt.h
|
||||
generic-y += sections.h
|
||||
|
@ -18,7 +18,6 @@ generic-y += mcs_spinlock.h
|
||||
generic-y += mm-arch-hooks.h
|
||||
generic-y += mmiowb.h
|
||||
generic-y += module.h
|
||||
generic-y += msi.h
|
||||
generic-y += preempt.h
|
||||
generic-y += serial.h
|
||||
generic-y += trace_clock.h
|
||||
|
@ -2404,16 +2404,6 @@ static const struct nvme_core_quirk_entry core_quirks[] = {
|
||||
.vid = 0x14a4,
|
||||
.fr = "22301111",
|
||||
.quirks = NVME_QUIRK_SIMPLE_SUSPEND,
|
||||
},
|
||||
{
|
||||
/*
|
||||
* This Kingston E8FK11.T firmware version has no interrupt
|
||||
* after resume with actions related to suspend to idle
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=204887
|
||||
*/
|
||||
.vid = 0x2646,
|
||||
.fr = "E8FK11.T",
|
||||
.quirks = NVME_QUIRK_SIMPLE_SUSPEND,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ config PCI_MSI
|
||||
If you don't know what to do here, say Y.
|
||||
|
||||
config PCI_MSI_IRQ_DOMAIN
|
||||
def_bool ARC || ARM || ARM64 || X86 || RISCV
|
||||
def_bool y
|
||||
depends on PCI_MSI
|
||||
select GENERIC_MSI_IRQ_DOMAIN
|
||||
|
||||
|
@ -213,12 +213,13 @@ u32 __pci_msix_desc_mask_irq(struct msi_desc *desc, u32 flag)
|
||||
|
||||
if (pci_msi_ignore_mask)
|
||||
return 0;
|
||||
|
||||
desc_addr = pci_msix_desc_addr(desc);
|
||||
if (!desc_addr)
|
||||
return 0;
|
||||
|
||||
mask_bits &= ~PCI_MSIX_ENTRY_CTRL_MASKBIT;
|
||||
if (flag)
|
||||
if (flag & PCI_MSIX_ENTRY_CTRL_MASKBIT)
|
||||
mask_bits |= PCI_MSIX_ENTRY_CTRL_MASKBIT;
|
||||
|
||||
writel(mask_bits, desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
|
||||
@ -861,7 +862,7 @@ static int pci_msi_supported(struct pci_dev *dev, int nvec)
|
||||
if (!pci_msi_enable)
|
||||
return 0;
|
||||
|
||||
if (!dev || dev->no_msi || dev->current_state != PCI_D0)
|
||||
if (!dev || dev->no_msi)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
@ -972,7 +973,7 @@ static int __pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries,
|
||||
int nr_entries;
|
||||
int i, j;
|
||||
|
||||
if (!pci_msi_supported(dev, nvec))
|
||||
if (!pci_msi_supported(dev, nvec) || dev->current_state != PCI_D0)
|
||||
return -EINVAL;
|
||||
|
||||
nr_entries = pci_msix_vec_count(dev);
|
||||
@ -1058,7 +1059,7 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
|
||||
int nvec;
|
||||
int rc;
|
||||
|
||||
if (!pci_msi_supported(dev, minvec))
|
||||
if (!pci_msi_supported(dev, minvec) || dev->current_state != PCI_D0)
|
||||
return -EINVAL;
|
||||
|
||||
/* Check whether driver already requested MSI-X IRQs */
|
||||
@ -1315,22 +1316,6 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr)
|
||||
}
|
||||
EXPORT_SYMBOL(pci_irq_get_affinity);
|
||||
|
||||
/**
|
||||
* pci_irq_get_node - return the NUMA node of a particular MSI vector
|
||||
* @pdev: PCI device to operate on
|
||||
* @vec: device-relative interrupt vector index (0-based).
|
||||
*/
|
||||
int pci_irq_get_node(struct pci_dev *pdev, int vec)
|
||||
{
|
||||
const struct cpumask *mask;
|
||||
|
||||
mask = pci_irq_get_affinity(pdev, vec);
|
||||
if (mask)
|
||||
return local_memory_node(cpu_to_node(cpumask_first(mask)));
|
||||
return dev_to_node(&pdev->dev);
|
||||
}
|
||||
EXPORT_SYMBOL(pci_irq_get_node);
|
||||
|
||||
struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc)
|
||||
{
|
||||
return to_pci_dev(desc->dev);
|
||||
|
@ -4,4 +4,5 @@
|
||||
# (This file is not included when SRCARCH=um since UML borrows several
|
||||
# asm headers from the host architecutre.)
|
||||
|
||||
mandatory-y += msi.h
|
||||
mandatory-y += simd.h
|
||||
|
@ -1454,7 +1454,6 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
|
||||
void pci_free_irq_vectors(struct pci_dev *dev);
|
||||
int pci_irq_vector(struct pci_dev *dev, unsigned int nr);
|
||||
const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, int vec);
|
||||
int pci_irq_get_node(struct pci_dev *pdev, int vec);
|
||||
|
||||
#else
|
||||
static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; }
|
||||
@ -1497,11 +1496,6 @@ static inline const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev,
|
||||
{
|
||||
return cpu_possible_mask;
|
||||
}
|
||||
|
||||
static inline int pci_irq_get_node(struct pci_dev *pdev, int vec)
|
||||
{
|
||||
return first_online_node;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user