search for: default_restore_msi_irq

Displaying 12 results from an estimated 12 matches for "default_restore_msi_irq".

2013 Aug 29
6
[PATCH 2/3 v3] Refactor MSI restore call-chain to drop unnecessary argument
..._restore_msi_irqs-> PHYSDEVOP_restore_msi hypercall (first mask restore) msix_mask_irq(entry, entry->masked) (second mask restore) So msix_mask_irq call in initial domain call graph needs to be removed. Based on this we can move the restore of the mask in default_restore_msi_irqs which would avoid restoring the invalid mask under Xen. Furthermore this simplifies the API by making everything related to restoring an MSI be in the platform specific APIs instead of just parts of it. After patch, restore call graph under initial domain: pci_reset_function-> pci_restore_...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...@ -110,22 +112,22 @@ void default_teardown_msi_irqs(struct pci_dev *dev) } } -void __weak arch_teardown_msi_irqs(struct pci_dev *dev) +void __weak arch_teardown_msi_irqs(struct msi_irqs *msi) { - return default_teardown_msi_irqs(dev); + return default_teardown_msi_irqs(msi); } -static void default_restore_msi_irq(struct pci_dev *dev, int irq) +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) { struct msi_desc *entry; entry = NULL; - if (dev->msix_enabled) { - list_for_each_entry(entry, &dev->msi_list, list) { + if (msi->msix_enabled) { + list_for_each_entry(entry, &am...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...truct pci_dev *dev) > } > } > > -void __weak arch_teardown_msi_irqs(struct pci_dev *dev) > +void __weak arch_teardown_msi_irqs(struct msi_irqs *msi) > { > - return default_teardown_msi_irqs(dev); > + return default_teardown_msi_irqs(msi); > } > > -static void default_restore_msi_irq(struct pci_dev *dev, int irq) > +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) > { > struct msi_desc *entry; > > entry = NULL; > - if (dev->msix_enabled) { > - list_for_each_entry(entry, &dev->msi_list, list) { > + if (msi->msix_enabl...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...truct pci_dev *dev) > } > } > > -void __weak arch_teardown_msi_irqs(struct pci_dev *dev) > +void __weak arch_teardown_msi_irqs(struct msi_irqs *msi) > { > - return default_teardown_msi_irqs(dev); > + return default_teardown_msi_irqs(msi); > } > > -static void default_restore_msi_irq(struct pci_dev *dev, int irq) > +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) > { > struct msi_desc *entry; > > entry = NULL; > - if (dev->msix_enabled) { > - list_for_each_entry(entry, &dev->msi_list, list) { > + if (msi->msix_enabl...
2014 Jul 26
0
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...gt;msi_list, list) { + int i, nvec; + if (entry->irq == 0) + continue; + if (entry->nvec_used) + nvec = entry->nvec_used; + else + nvec = 1 << entry->msi_attrib.multiple; + for (i = 0; i < nvec; i++) + arch_teardown_msi_irq(entry->irq + i); + } +} + +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) +{ + struct msi_desc *entry; + + entry = NULL; + if (msi->msix_enabled) { + list_for_each_entry(entry, &msi->msi_list, list) { + if (irq == entry->irq) + break; + } + } else if (msi->msi_enabled) { + entry = irq_get_msi_desc(irq); + } + + if (...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...rq == 0) > + continue; > + if (entry->nvec_used) > + nvec = entry->nvec_used; > + else > + nvec = 1 << entry->msi_attrib.multiple; > + for (i = 0; i < nvec; i++) > + arch_teardown_msi_irq(entry->irq + i); > + } > +} > + > +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) > +{ > + struct msi_desc *entry; > + > + entry = NULL; > + if (msi->msix_enabled) { > + list_for_each_entry(entry, &msi->msi_list, list) { > + if (irq == entry->irq) > + break; > + } > + } else if (msi->msi_enabled)...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...rq == 0) > + continue; > + if (entry->nvec_used) > + nvec = entry->nvec_used; > + else > + nvec = 1 << entry->msi_attrib.multiple; > + for (i = 0; i < nvec; i++) > + arch_teardown_msi_irq(entry->irq + i); > + } > +} > + > +static void default_restore_msi_irq(struct msi_irqs *msi, int irq) > +{ > + struct msi_desc *entry; > + > + entry = NULL; > + if (msi->msix_enabled) { > + list_for_each_entry(entry, &msi->msi_list, list) { > + if (irq == entry->irq) > + break; > + } > + } else if (msi->msi_enabled)...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...i_note_irq_problem(pdev, "MSIX routing failure"); > ret = PCI_LOST_IRQ_DISABLE_MSIX; > } else { > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e416dc0..d5c8e56 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -125,7 +125,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int > irq) > if (irq == entry->irq) > break; > } > - } else if (dev->msi_enabled) { > + } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) { > entry = irq_get_msi_desc(irq); > } > > @@ -439,7 +439,7 @@ static void __pci_restor...
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...i_note_irq_problem(pdev, "MSIX routing failure"); > ret = PCI_LOST_IRQ_DISABLE_MSIX; > } else { > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e416dc0..d5c8e56 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -125,7 +125,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int > irq) > if (irq == entry->irq) > break; > } > - } else if (dev->msi_enabled) { > + } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) { > entry = irq_get_msi_desc(irq); > } > > @@ -439,7 +439,7 @@ static void __pci_restor...
2014 Jul 26
0
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...led(pdev, MSIX_TYPE)) { pci_note_irq_problem(pdev, "MSIX routing failure"); ret = PCI_LOST_IRQ_DISABLE_MSIX; } else { diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e416dc0..d5c8e56 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -125,7 +125,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int irq) if (irq == entry->irq) break; } - } else if (dev->msi_enabled) { + } else if (pci_dev_msi_enabled(dev, MSI_TYPE)) { entry = irq_get_msi_desc(irq); } @@ -439,7 +439,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev) u16 control;...