[Xen-devel] [PATCH] linux/x86: Reduce delta to native IO-APIC code

Jan Beulich
Thu, 06 Dec 2007 15:45:56 -0000

.. again making applying other patches easier.

As usual, written and tested against 2.6.24-rc3 and made apply against
2.6.18 without further testing.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

Index: head-2007-11-30/arch/i386/kernel/io_apic-xen.c
==================================================================---
head-2007-11-30.orig/arch/i386/kernel/io_apic-xen.c	2007-12-05
12:06:21.000000000 +0100
+++ head-2007-11-30/arch/i386/kernel/io_apic-xen.c	2007-12-05 12:09:28.000000000
+0100
@@ -1542,8 +1542,6 @@ void __init print_IO_APIC(void)
 	return;
 }

-#if 0
-
 static void print_APIC_bitfield (int base)
 {
 	unsigned int v;
@@ -1684,11 +1682,6 @@ void /*__init*/ print_PIC(void)
 	v = inb(0x4d1) << 8 | inb(0x4d0);
 	printk(KERN_DEBUG "... PIC ELCR: %04x\n", v);
 }
-
-#endif  /*  0  */
-
-#else
-void __init print_IO_APIC(void) { }
 #endif /* !CONFIG_XEN */

 static void __init enable_IO_APIC(void)
Index: head-2007-11-30/arch/x86_64/kernel/io_apic-xen.c
==================================================================---
head-2007-11-30.orig/arch/x86_64/kernel/io_apic-xen.c	2007-12-04
14:10:56.000000000 +0100
+++ head-2007-11-30/arch/x86_64/kernel/io_apic-xen.c	2007-12-05
11:58:19.000000000 +0100
@@ -1022,8 +1022,6 @@ void __apicdebuginit print_IO_APIC(void)
 	return;
 }

-#if 0
-
 static __apicdebuginit void print_APIC_bitfield (int base)
 {
 	unsigned int v;
@@ -1158,11 +1156,6 @@ void __apicdebuginit print_PIC(void)
 	v = inb(0x4d1) << 8 | inb(0x4d0);
 	printk(KERN_DEBUG "... PIC ELCR: %04x\n", v);
 }
-
-#endif  /*  0  */
-
-#else
-void __init print_IO_APIC(void) { }
 #endif /* !CONFIG_XEN */

 static void __init enable_IO_APIC(void)
Index: head-2007-11-30/include/asm-i386/mach-xen/asm/hw_irq.h
==================================================================---
head-2007-11-30.orig/include/asm-i386/mach-xen/asm/hw_irq.h	2007-12-04
14:10:56.000000000 +0100
+++ head-2007-11-30/include/asm-i386/mach-xen/asm/hw_irq.h	2007-12-05
11:58:49.000000000 +0100
@@ -49,7 +49,7 @@ void FASTCALL(send_IPI_self(int vector))
 void init_VISWS_APIC_irqs(void);
 void setup_IO_APIC(void);
 void disable_IO_APIC(void);
-void print_IO_APIC(void);
+#define print_IO_APIC()
 int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
 void send_IPI(int dest, int vector);
 void setup_ioapic_dest(void);
Index: head-2007-11-30/include/asm-x86_64/mach-xen/asm/hw_irq.h
==================================================================---
head-2007-11-30.orig/include/asm-x86_64/mach-xen/asm/hw_irq.h	2007-12-04
14:10:56.000000000 +0100
+++ head-2007-11-30/include/asm-x86_64/mach-xen/asm/hw_irq.h	2007-12-05
11:59:03.000000000 +0100
@@ -137,7 +137,7 @@ extern void send_IPI_self(int vector);
 extern void init_VISWS_APIC_irqs(void);
 extern void setup_IO_APIC(void);
 extern void disable_IO_APIC(void);
-extern void print_IO_APIC(void);
+#define print_IO_APIC()
 extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
 extern void send_IPI(int dest, int vector);
 extern void setup_ioapic_dest(void);




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com