All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhiguo <yuzg@cn.fujitsu.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi
Date: Fri, 16 Apr 2010 10:07:19 +0800	[thread overview]
Message-ID: <4BC7C657.3010609@cn.fujitsu.com> (raw)


routines 'xen_register_gsi' and 'xen_teardown_msi_dev' cannot be used
unless macro 'CONFIG_XEN' is defined, otherwise build error occurs.

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
---
 arch/x86/kernel/acpi/boot.c    |    2 ++
 arch/x86/kernel/apic/io_apic.c |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 144b7d7..e2cd426 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -472,9 +472,11 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
 	int irq;
 	unsigned int plat_gsi = gsi;
 
+#ifdef CONFIG_XEN
 	irq = xen_register_gsi(gsi, trigger, polarity);
 	if (irq >= 0)
 		return irq;
+#endif
 
 #ifdef CONFIG_PCI
 	/*
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index eb263ec..123e554 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3564,8 +3564,10 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 	if (type == PCI_CAP_ID_MSI && nvec > 1)
 		return 1;
 
+#ifdef CONFIG_XEN
 	if (xen_domain())
 		return xen_setup_msi_irqs(dev, nvec, type);
+#endif
 
 	node = dev_to_node(&dev->dev);
 	irq_want = nr_irqs_gsi;
@@ -3626,10 +3628,12 @@ void arch_teardown_msi_irqs(struct pci_dev *dev)
 {
 	struct msi_desc *entry;
 
+#ifdef CONFIG_XEN
 	/* If we are non-privileged PV domain, we have to
 	* to call xen_teardown_msi_dev first. */
 	if (xen_domain())
 		xen_teardown_msi_dev(dev);
+#endif
 
 	list_for_each_entry(entry, &dev->msi_list, list) {
 		int i, nvec;
-- 
1.5.4.2

             reply	other threads:[~2010-04-16  2:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  2:07 Yu Zhiguo [this message]
2010-04-16 14:56 ` [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi Konrad Rzeszutek Wilk
2010-04-18  3:56   ` Yu Zhiguo
2010-04-18  4:46     ` Jeremy Fitzhardinge
2010-04-19 13:30       ` Konrad Rzeszutek Wilk
2010-04-19 16:22         ` Jeremy Fitzhardinge
2010-04-20  5:31         ` Yu Zhiguo
2010-04-20 18:33           ` Konrad Rzeszutek Wilk
2010-04-21  3:29             ` Yu Zhiguo
2010-04-21 13:00               ` Konrad Rzeszutek Wilk
2010-04-21 13:53                 ` Yu Zhiguo
2010-04-21 16:33                   ` Jeremy Fitzhardinge
2010-04-22  4:05                     ` Yu Zhiguo
2010-04-22 16:27                       ` Jeremy Fitzhardinge
2010-04-25  4:24                         ` Yu Zhiguo
2010-04-21 16:31               ` Jeremy Fitzhardinge
2010-04-19 11:23   ` Failure to load the most recent kernel 2.6.10 ( xen/stable) under Xen 4.0 on Ubuntu 9.10 Boris Derzhavets
2010-04-20 10:44     ` Failure to load the most recent kernel 2.6.32.10 " Boris Derzhavets
2010-04-20 12:46       ` Boris Derzhavets
2010-04-20 18:21       ` Jeremy Fitzhardinge
2010-04-20 21:25         ` Boris Derzhavets
2010-04-21  8:05           ` Yu, Ke
2010-04-21 12:19             ` Boris Derzhavets

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=4BC7C657.3010609@cn.fujitsu.com \
    --to=yuzg@cn.fujitsu.com \
    --cc=jeremy@goop.org \
    --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.