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] linux/x86: cleanup IO-APIC code

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: cleanup IO-APIC code
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 28 Nov 2008 10:20:43 +0000
Delivery-date: Fri, 28 Nov 2008 02:20:10 -0800
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
- get 32-bit code in sync with 64-bit wrt ExtINT pin detection being
  unnecessary
- eliminate build warnings resulting from c/s 725

As usual, written and tested on 2.6.27.7 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-11-25/arch/i386/kernel/io_apic-xen.c
===================================================================
--- head-2008-11-25.orig/arch/i386/kernel/io_apic-xen.c 2008-11-25 
14:34:12.000000000 +0100
+++ head-2008-11-25/arch/i386/kernel/io_apic-xen.c      2008-11-25 
14:35:31.000000000 +0100
@@ -87,8 +87,10 @@ static inline void xen_io_apic_write(uns
 int (*ioapic_renumber_irq)(int ioapic, int irq);
 atomic_t irq_mis_count;
 
+#ifndef CONFIG_XEN
 /* Where if anywhere is the i8259 connect in external int mode */
 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
+#endif
 
 static DEFINE_SPINLOCK(ioapic_lock);
 static DEFINE_SPINLOCK(vector_lock);
@@ -793,6 +795,7 @@ static int find_irq_entry(int apic, int 
        return -1;
 }
 
+#ifndef CONFIG_XEN
 /*
  * Find the pin to which IRQ[irq] (ISA) is connected
  */
@@ -842,6 +845,7 @@ static int __init find_isa_irq_apic(int 
 
        return -1;
 }
+#endif
 
 /*
  * Find a specific PCI IRQ entry.
@@ -1687,7 +1691,9 @@ void /*__init*/ print_PIC(void)
 static void __init enable_IO_APIC(void)
 {
        union IO_APIC_reg_01 reg_01;
+#ifndef CONFIG_XEN
        int i8259_apic, i8259_pin;
+#endif
        int i, apic;
        unsigned long flags;
 
@@ -1708,6 +1714,7 @@ static void __init enable_IO_APIC(void)
                spin_unlock_irqrestore(&ioapic_lock, flags);
                nr_ioapic_registers[apic] = reg_01.bits.entries+1;
        }
+#ifndef CONFIG_XEN
        for(apic = 0; apic < nr_ioapics; apic++) {
                int pin;
                /* See if any of the pins is in ExtINT mode */
@@ -1749,6 +1756,7 @@ static void __init enable_IO_APIC(void)
        {
                printk(KERN_WARNING "ExtINT in hardware and MP table differ\n");
        }
+#endif
 
        /*
         * Do not trust the IO-APIC being empty at bootup
@@ -2517,6 +2525,8 @@ static int __init io_apic_bug_finalize(v
 
 late_initcall(io_apic_bug_finalize);
 
+#ifndef CONFIG_XEN
+
 struct sysfs_ioapic_data {
        struct sys_device dev;
        struct IO_APIC_route_entry entry[0];
@@ -2570,10 +2580,8 @@ static int ioapic_resume(struct sys_devi
 
 static struct sysdev_class ioapic_sysdev_class = {
        set_kset_name("ioapic"),
-#ifndef CONFIG_XEN
        .suspend = ioapic_suspend,
        .resume = ioapic_resume,
-#endif
 };
 
 static int __init ioapic_init_sysfs(void)
@@ -2611,6 +2619,8 @@ static int __init ioapic_init_sysfs(void
 
 device_initcall(ioapic_init_sysfs);
 
+#endif /* CONFIG_XEN */
+
 /* --------------------------------------------------------------------------
                           ACPI-based IOAPIC Configuration
    -------------------------------------------------------------------------- 
*/
Index: head-2008-11-25/arch/x86_64/kernel/io_apic-xen.c
===================================================================
--- head-2008-11-25.orig/arch/x86_64/kernel/io_apic-xen.c       2008-11-25 
14:34:12.000000000 +0100
+++ head-2008-11-25/arch/x86_64/kernel/io_apic-xen.c    2008-11-25 
12:48:23.000000000 +0100
@@ -2054,6 +2054,8 @@ void __init setup_IO_APIC(void)
                print_IO_APIC();
 }
 
+#ifndef CONFIG_XEN
+
 struct sysfs_ioapic_data {
        struct sys_device dev;
        struct IO_APIC_route_entry entry[0];
@@ -2107,10 +2109,8 @@ static int ioapic_resume(struct sys_devi
 
 static struct sysdev_class ioapic_sysdev_class = {
        set_kset_name("ioapic"),
-#ifndef CONFIG_XEN
        .suspend = ioapic_suspend,
        .resume = ioapic_resume,
-#endif
 };
 
 static int __init ioapic_init_sysfs(void)
@@ -2148,6 +2148,8 @@ static int __init ioapic_init_sysfs(void
 
 device_initcall(ioapic_init_sysfs);
 
+#endif /* CONFIG_XEN */
+
 /* --------------------------------------------------------------------------
                           ACPI-based IOAPIC Configuration
    -------------------------------------------------------------------------- 
*/




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: cleanup IO-APIC code, Jan Beulich <=