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] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] pv-ops: Fix missing 'ifdef CONFIG_XEN' in acpi
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2010 10:07:19 +0800
Cc:
Delivery-date: Thu, 15 Apr 2010 19:07:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
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@xxxxxxxxxxxxxx>
---
 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel