genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Only calculate the affinity for the main I/O vectors, and skip the pre or post vectors specified by struct irq_affinity. Also remove the irq_affinity cpumask argument that has never been used. If we ever need it in the future we can pass it through struct irq_affinity. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/1478654107-7384-4-git-send-email-hch@lst.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Thomas Gleixner

parent
212bd84622
commit
67c93c218d
@@ -553,12 +553,13 @@ error_attrs:
|
||||
static struct msi_desc *
|
||||
msi_setup_entry(struct pci_dev *dev, int nvec, bool affinity)
|
||||
{
|
||||
static const struct irq_affinity default_affd;
|
||||
struct cpumask *masks = NULL;
|
||||
struct msi_desc *entry;
|
||||
u16 control;
|
||||
|
||||
if (affinity) {
|
||||
masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
|
||||
masks = irq_create_affinity_masks(nvec, &default_affd);
|
||||
if (!masks)
|
||||
pr_err("Unable to allocate affinity masks, ignoring\n");
|
||||
}
|
||||
@@ -692,12 +693,13 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
|
||||
struct msix_entry *entries, int nvec,
|
||||
bool affinity)
|
||||
{
|
||||
static const struct irq_affinity default_affd;
|
||||
struct cpumask *curmsk, *masks = NULL;
|
||||
struct msi_desc *entry;
|
||||
int ret, i;
|
||||
|
||||
if (affinity) {
|
||||
masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
|
||||
masks = irq_create_affinity_masks(nvec, &default_affd);
|
||||
if (!masks)
|
||||
pr_err("Unable to allocate affinity masks, ignoring\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user