diff options
| -rw-r--r-- | arch/x86/pci/vmd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c index f576dcba2175..61a97ff36514 100644 --- a/arch/x86/pci/vmd.c +++ b/arch/x86/pci/vmd.c | |||
| @@ -56,15 +56,12 @@ struct vmd_irq { | |||
| 56 | /** | 56 | /** |
| 57 | * struct vmd_irq_list - list of driver requested IRQs mapping to a VMD vector | 57 | * struct vmd_irq_list - list of driver requested IRQs mapping to a VMD vector |
| 58 | * @irq_list: the list of irq's the VMD one demuxes to. | 58 | * @irq_list: the list of irq's the VMD one demuxes to. |
| 59 | * @vmd_vector: the h/w IRQ assigned to the VMD. | ||
| 60 | * @index: index into the VMD MSI-X table; used for message routing. | 59 | * @index: index into the VMD MSI-X table; used for message routing. |
| 61 | * @count: number of child IRQs assigned to this vector; used to track | 60 | * @count: number of child IRQs assigned to this vector; used to track |
| 62 | * sharing. | 61 | * sharing. |
| 63 | */ | 62 | */ |
| 64 | struct vmd_irq_list { | 63 | struct vmd_irq_list { |
| 65 | struct list_head irq_list; | 64 | struct list_head irq_list; |
| 66 | struct vmd_dev *vmd; | ||
| 67 | unsigned int vmd_vector; | ||
| 68 | unsigned int index; | 65 | unsigned int index; |
| 69 | unsigned int count; | 66 | unsigned int count; |
| 70 | }; | 67 | }; |
| @@ -201,8 +198,10 @@ static int vmd_msi_init(struct irq_domain *domain, struct msi_domain_info *info, | |||
| 201 | vmdirq->irq = vmd_next_irq(vmd, desc); | 198 | vmdirq->irq = vmd_next_irq(vmd, desc); |
| 202 | vmdirq->virq = virq; | 199 | vmdirq->virq = virq; |
| 203 | 200 | ||
| 204 | irq_domain_set_info(domain, virq, vmdirq->irq->vmd_vector, info->chip, | 201 | irq_domain_set_info(domain, virq, |
| 205 | vmdirq, handle_untracked_irq, vmd, NULL); | 202 | pci_irq_vector(vmd->dev, vmdirq->irq->index), |
| 203 | info->chip, vmdirq, | ||
| 204 | handle_untracked_irq, vmd, NULL); | ||
| 206 | return 0; | 205 | return 0; |
| 207 | } | 206 | } |
| 208 | 207 | ||
| @@ -682,10 +681,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 682 | 681 | ||
| 683 | for (i = 0; i < vmd->msix_count; i++) { | 682 | for (i = 0; i < vmd->msix_count; i++) { |
| 684 | INIT_LIST_HEAD(&vmd->irqs[i].irq_list); | 683 | INIT_LIST_HEAD(&vmd->irqs[i].irq_list); |
| 685 | vmd->irqs[i].vmd_vector = pci_irq_vector(dev, i); | ||
| 686 | vmd->irqs[i].index = i; | 684 | vmd->irqs[i].index = i; |
| 687 | 685 | err = devm_request_irq(&dev->dev, pci_irq_vector(dev, i), | |
| 688 | err = devm_request_irq(&dev->dev, vmd->irqs[i].vmd_vector, | ||
| 689 | vmd_irq, 0, "vmd", &vmd->irqs[i]); | 686 | vmd_irq, 0, "vmd", &vmd->irqs[i]); |
| 690 | if (err) | 687 | if (err) |
| 691 | return err; | 688 | return err; |
