diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-07-04 04:39:26 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-07-04 06:25:14 -0400 |
commit | 0972fa57f53525ffa6ced12d703750fc2791e3ce (patch) | |
tree | 3199a71c175f53ecb59271da64dcc769df8e6b9b | |
parent | 45ddcecbfa947f1dd8e8019bad9e90d6c9f2665c (diff) |
genirq/msi: Make use of affinity aware allocations
Allow the MSI code to provide affinity hints per MSI descriptor.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Cc: axboe@fb.com
Cc: agordeev@redhat.com
Link: http://lkml.kernel.org/r/1467621574-8277-6-git-send-email-hch@lst.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/msi.h | 2 | ||||
-rw-r--r-- | kernel/irq/msi.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index c33abfa0f5a7..4f0bfe5912b2 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -47,6 +47,7 @@ struct fsl_mc_msi_desc { | |||
47 | * @nvec_used: The number of vectors used | 47 | * @nvec_used: The number of vectors used |
48 | * @dev: Pointer to the device which uses this descriptor | 48 | * @dev: Pointer to the device which uses this descriptor |
49 | * @msg: The last set MSI message cached for reuse | 49 | * @msg: The last set MSI message cached for reuse |
50 | * @affinity: Optional pointer to a cpu affinity mask for this descriptor | ||
50 | * | 51 | * |
51 | * @masked: [PCI MSI/X] Mask bits | 52 | * @masked: [PCI MSI/X] Mask bits |
52 | * @is_msix: [PCI MSI/X] True if MSI-X | 53 | * @is_msix: [PCI MSI/X] True if MSI-X |
@@ -67,6 +68,7 @@ struct msi_desc { | |||
67 | unsigned int nvec_used; | 68 | unsigned int nvec_used; |
68 | struct device *dev; | 69 | struct device *dev; |
69 | struct msi_msg msg; | 70 | struct msi_msg msg; |
71 | const struct cpumask *affinity; | ||
70 | 72 | ||
71 | union { | 73 | union { |
72 | /* PCI MSI/X specific data */ | 74 | /* PCI MSI/X specific data */ |
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 58dbbacc6fbb..0e2a736b14a7 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c | |||
@@ -335,7 +335,7 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, | |||
335 | 335 | ||
336 | virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used, | 336 | virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used, |
337 | dev_to_node(dev), &arg, false, | 337 | dev_to_node(dev), &arg, false, |
338 | NULL); | 338 | desc->affinity); |
339 | if (virq < 0) { | 339 | if (virq < 0) { |
340 | ret = -ENOSPC; | 340 | ret = -ENOSPC; |
341 | if (ops->handle_error) | 341 | if (ops->handle_error) |