提交 53db86ad 编写于 作者: J Jon Derrick 提交者: Bjorn Helgaas

x86/PCI: VMD: Eliminate vmd_vector member from list type

Eliminate unused vmd and vector members from vmd_irq_list and discover the
vector using pci_irq_vector().
Signed-off-by: NJon Derrick <jonathan.derrick@intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NKeith Busch <keith.busch@intel.com>
上级 75de9b4c
...@@ -56,15 +56,12 @@ struct vmd_irq { ...@@ -56,15 +56,12 @@ struct vmd_irq {
/** /**
* struct vmd_irq_list - list of driver requested IRQs mapping to a VMD vector * struct vmd_irq_list - list of driver requested IRQs mapping to a VMD vector
* @irq_list: the list of irq's the VMD one demuxes to. * @irq_list: the list of irq's the VMD one demuxes to.
* @vmd_vector: the h/w IRQ assigned to the VMD.
* @index: index into the VMD MSI-X table; used for message routing. * @index: index into the VMD MSI-X table; used for message routing.
* @count: number of child IRQs assigned to this vector; used to track * @count: number of child IRQs assigned to this vector; used to track
* sharing. * sharing.
*/ */
struct vmd_irq_list { struct vmd_irq_list {
struct list_head irq_list; struct list_head irq_list;
struct vmd_dev *vmd;
unsigned int vmd_vector;
unsigned int index; unsigned int index;
unsigned int count; unsigned int count;
}; };
...@@ -201,8 +198,10 @@ static int vmd_msi_init(struct irq_domain *domain, struct msi_domain_info *info, ...@@ -201,8 +198,10 @@ static int vmd_msi_init(struct irq_domain *domain, struct msi_domain_info *info,
vmdirq->irq = vmd_next_irq(vmd, desc); vmdirq->irq = vmd_next_irq(vmd, desc);
vmdirq->virq = virq; vmdirq->virq = virq;
irq_domain_set_info(domain, virq, vmdirq->irq->vmd_vector, info->chip, irq_domain_set_info(domain, virq,
vmdirq, handle_untracked_irq, vmd, NULL); pci_irq_vector(vmd->dev, vmdirq->irq->index),
info->chip, vmdirq,
handle_untracked_irq, vmd, NULL);
return 0; return 0;
} }
...@@ -682,10 +681,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -682,10 +681,8 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
for (i = 0; i < vmd->msix_count; i++) { for (i = 0; i < vmd->msix_count; i++) {
INIT_LIST_HEAD(&vmd->irqs[i].irq_list); INIT_LIST_HEAD(&vmd->irqs[i].irq_list);
vmd->irqs[i].vmd_vector = pci_irq_vector(dev, i);
vmd->irqs[i].index = i; vmd->irqs[i].index = i;
err = devm_request_irq(&dev->dev, pci_irq_vector(dev, i),
err = devm_request_irq(&dev->dev, vmd->irqs[i].vmd_vector,
vmd_irq, 0, "vmd", &vmd->irqs[i]); vmd_irq, 0, "vmd", &vmd->irqs[i]);
if (err) if (err)
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册