This patch fixes the following build errors:
- when CONFIG_PCI_MSI is not set
- domid_t undefined in drivers/xen/pci.c
and warnings of unused function definitions
Signed-off-by: Qing He <qing.he@xxxxxxxxx>
---
diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h
index 714443b..cb84abe 100644
--- a/arch/x86/include/asm/xen/pci.h
+++ b/arch/x86/include/asm/xen/pci.h
@@ -7,24 +7,28 @@ int xen_create_msi_irq(struct pci_dev *dev,
struct msi_desc *msidesc,
int type);
int xen_destroy_irq(int irq);
-int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
#else
static inline int xen_register_gsi(u32 gsi, int triggering, int polarity)
{
return -1;
}
-static int xen_create_msi_irq(struct pci_dev *dev,
+static inline int xen_create_msi_irq(struct pci_dev *dev,
struct msi_desc *msidesc,
int type)
{
return -1;
}
-static int xen_destroy_irq(int irq)
+static inline int xen_destroy_irq(int irq)
{
return -1;
}
-static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
+#endif
+
+#if defined(CONFIG_PCI_MSI) && defined(CONFIG_XEN_DOM0_PCI)
+int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
+#else
+static inline int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
return -1;
}
diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index c0ef627..60bab67 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -87,6 +87,7 @@ void __init xen_setup_pirqs(void)
}
}
+#ifdef CONFIG_PCI_MSI
int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
unsigned int irq;
@@ -108,3 +109,4 @@ error:
xen_destroy_irq(irq);
return ret;
}
+#endif
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 409c300..007b1d7 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -574,6 +574,7 @@ out:
return irq;
}
+#ifdef CONFIG_PCI_MSI
int xen_destroy_irq(int irq)
{
struct irq_desc *desc;
@@ -659,6 +660,7 @@ out:
spin_unlock(&irq_mapping_update_lock);
return irq;
}
+#endif
int xen_vector_from_irq(unsigned irq)
{
diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
index 5156278..a7051f1 100644
--- a/drivers/xen/pci.c
+++ b/drivers/xen/pci.c
@@ -18,8 +18,11 @@
*/
#include <linux/pci.h>
+
+#include <xen/interface/xen.h>
#include <xen/interface/physdev.h>
#include <asm/xen/hypercall.h>
+
#include "../pci/pci.h"
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|