WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][RESEND] xen: fix msi build errors

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] [PATCH][RESEND] xen: fix msi build errors
From: Qing He <qing.he@xxxxxxxxx>
Date: Tue, 25 Aug 2009 17:11:30 +0800
Cc: Daniel Schroeder <sec@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 Aug 2009 02:07:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A932429.4080309@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4A8E6BDA.2080600@xxxxxxxxxxxxxxx> <20090824094357.GA32567@ub-qhe2> <4A932429.4080309@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
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

<Prev in Thread] Current Thread [Next in Thread>