All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qing He <qing.he@intel.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Schroeder <sec@dschroeder.info>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH][RESEND] xen: fix msi build errors
Date: Tue, 25 Aug 2009 17:11:30 +0800	[thread overview]
Message-ID: <20090825091130.GA2948@ub-qhe2> (raw)
In-Reply-To: <4A932429.4080309@goop.org>

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@intel.com>

---
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"

      reply	other threads:[~2009-08-25  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21  9:41 pvops dom0 20090821 issue (msi) Daniel Schroeder
2009-08-21 22:47 ` Jeremy Fitzhardinge
     [not found] ` <20090824094357.GA32567@ub-qhe2>
2009-08-24 11:27   ` Daniel Schroeder
2009-08-24 23:37   ` Jeremy Fitzhardinge
2009-08-25  9:11     ` Qing He [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090825091130.GA2948@ub-qhe2 \
    --to=qing.he@intel.com \
    --cc=jeremy@goop.org \
    --cc=sec@dschroeder.info \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.