aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-18 11:43:32 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 14:44:40 -0500
commitbf480d952bcf25e8ff7e95d2a23964107513ac51 (patch)
treeb2d1a75e39bfdf82021ccdefb5f9613a17087040 /include
parent5cad61a6ba6f4956a218ffbb64cafcc1daefaca0 (diff)
xen: events: separate MSI PIRQ allocation from PIRQ binding to IRQ
Split the binding aspect of xen_allocate_pirq_msi out into a new xen_bind_pirq_to_irq function. In xen_hvm_setup_msi_irq when allocating a pirq write the MSI message to signal the PIRQ as soon as the pirq is obtained. There is no way to free the pirq back so if the subsequent binding to an IRQ fails we want to ensure that we will reuse the PIRQ next time rather than leak it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/xen/events.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/xen/events.h b/include/xen/events.h
index f70536af921c..18bf825bac66 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -75,7 +75,9 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name);
75int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); 75int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name);
76 76
77#ifdef CONFIG_PCI_MSI 77#ifdef CONFIG_PCI_MSI
78int xen_allocate_pirq_msi(char *name, int *pirq, int alloc_pirq); 78int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc);
79int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
80 int pirq, const char *name);
79int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); 81int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type);
80#endif 82#endif
81 83