summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-02-01 09:53:15 -0800
committerJens Axboe <axboe@fb.com>2017-03-02 08:56:04 -0700
commit27ddb689909cd0bab30524a5f720ae3a3e55acac (patch)
tree97e6276308d60b3e5087f8de902ba77970dba48c /include/linux
parent59f082e464ae0533813d5a1c3149b22563da93d7 (diff)
downloadlinux-27ddb689909cd0bab30524a5f720ae3a3e55acac.tar.gz
linux-27ddb689909cd0bab30524a5f720ae3a3e55acac.tar.bz2
linux-27ddb689909cd0bab30524a5f720ae3a3e55acac.zip
PCI: add an API to get node from vector
Next patch will use the API to get the node from vector for nvme device Signed-off-by: Shaohua Li <shli@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 282ed32244ce..eb3da1a04e6c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1323,6 +1323,7 @@ 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; }
@@ -1370,6 +1371,11 @@ 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
static inline int