x86: rename MSI option
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 24 Jul 2008 13:18:05 +0000 (14:18 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 24 Jul 2008 13:18:05 +0000 (14:18 +0100)
Also rename the variable and move its declaration to a header.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/io_apic.c
xen/arch/x86/msi.c
xen/arch/x86/physdev.c
xen/include/asm-x86/io_apic.h

index c66132066394d507b699689c9cede10e7c345366..643f61f66927101674189948c0e08aba0d668aaf 100644 (file)
 int (*ioapic_renumber_irq)(int ioapic, int irq);
 atomic_t irq_mis_count;
 
-int msi_irq_enable = 0;
-boolean_param("msi_irq_enable", msi_irq_enable);
+int msi_enable = 0;
+boolean_param("msi", msi_enable);
 
 int domain_irq_to_vector(struct domain *d, int irq)
 {
-    if ( !msi_irq_enable )
+    if ( !msi_enable )
         return irq_to_vector(irq);
     else
         return d->arch.pirq_vector[irq];
@@ -58,7 +58,7 @@ int domain_irq_to_vector(struct domain *d, int irq)
 
 int domain_vector_to_irq(struct domain *d, int vector)
 {
-    if ( !msi_irq_enable )
+    if ( !msi_enable )
         return vector_to_irq(vector);
     else
         return d->arch.vector_pirq[vector];
index c0ccba6d9a459e35ac9faaf0473a92e9f8284026..d6c4d0b1e61963b4efcae72ed69369e9b0282312 100644 (file)
@@ -27,8 +27,6 @@
 #include <public/physdev.h>
 #include <xen/iommu.h>
 
-extern int msi_irq_enable;
-
 /* bitmap indicate which fixed map is free */
 DEFINE_SPINLOCK(msix_fixmap_lock);
 DECLARE_BITMAP(msix_fixmap_pages, MAX_MSIX_PAGES);
index d1e4f39e757c88066d72a9dfe1e490d31d6c1606..acb46cbac05661d6f0dd253b21320a52d1e4bc4d 100644 (file)
@@ -184,15 +184,14 @@ static int unmap_domain_pirq(struct domain *d, int pirq)
     return ret;
 }
 
-extern int msi_irq_enable;
 static int physdev_map_pirq(struct physdev_map_pirq *map)
 {
     struct domain *d;
     int vector, pirq, ret = 0;
     unsigned long flags;
 
-    /* if msi_irq_enable is not enabled,map always success */
-    if ( !msi_irq_enable )
+    /* if msi_enable is not enabled, map always succeeds */
+    if ( !msi_enable )
         return 0;
 
     if ( !IS_PRIV(current->domain) )
@@ -304,7 +303,7 @@ static int physdev_unmap_pirq(struct physdev_unmap_pirq *unmap)
     unsigned long flags;
     int ret;
 
-    if ( !msi_irq_enable )
+    if ( !msi_enable )
         return 0;
 
     if ( !IS_PRIV(current->domain) )
@@ -455,7 +454,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
 
         ret = 0;
 
-        if ( msi_irq_enable )
+        if ( msi_enable )
         {
             spin_lock_irqsave(&dom0->arch.irq_lock, flags);
             if ( irq != AUTO_ASSIGN )
index 72b6defb972dde631902a2e5c2d6cd3d78b5a4b0..b364e38d7ffa1e48b0aaade2f4d2810019bd580c 100644 (file)
@@ -160,6 +160,8 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned
 /* 1 if "noapic" boot option passed */
 extern int skip_ioapic_setup;
 
+extern int msi_enable;
+
 /*
  * If we use the IO-APIC for IRQ routing, disable automatic
  * assignment of PCI IRQ's.