Patch from "Martin J. Bligh" <mbligh@aracnet.com>

There was a working irq disablement routing before kirq, which is now broken.
 The problem seems to be that there are two different switches:
irqbalance_disable and no_balance_irq, and each is respected in different
places.  The following patch fixes that ...  it's now off by default for
subarches that desire that, and can be disabled by a command line options for
others.  I renamed no_balance_irq to NO_BALANCE_IRQ as it's no longer
pretending to be a switch, just a define.

Seems like a perfectly simple fix to me, however, such some more testing
would probably be prudent ...  could you add this to -mm?



 i386/kernel/io_apic.c             |    4 ++--
 asm-i386/mach-bigsmp/mach_apic.h  |    2 +-
 asm-i386/mach-default/mach_apic.h |    2 +-
 asm-i386/mach-numaq/mach_apic.h   |    2 +-
 asm-i386/mach-summit/mach_apic.h  |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff -puN arch/i386/kernel/io_apic.c~irq-balance-disable-fix arch/i386/kernel/io_apic.c
--- 25/arch/i386/kernel/io_apic.c~irq-balance-disable-fix	2003-02-23 11:47:20.000000000 -0800
+++ 25-akpm/arch/i386/kernel/io_apic.c	2003-02-23 11:47:20.000000000 -0800
@@ -223,7 +223,7 @@ static void set_ioapic_affinity (unsigne
 
 extern unsigned long irq_affinity [NR_IRQS];
 int __cacheline_aligned pending_irq_balance_apicid [NR_IRQS];
-static int irqbalance_disabled __initdata = 0;
+static int irqbalance_disabled = NO_BALANCE_IRQ;
 static int physical_balance = 0;
 
 struct irq_cpu_info {
@@ -492,7 +492,7 @@ static inline void balance_irq (int cpu,
 	unsigned long allowed_mask;
 	unsigned int new_cpu;
 		
-	if (no_balance_irq)
+	if (irqbalance_disabled)
 		return;
 
 	allowed_mask = cpu_online_map & irq_affinity[irq];
diff -puN include/asm-i386/mach-bigsmp/mach_apic.h~irq-balance-disable-fix include/asm-i386/mach-bigsmp/mach_apic.h
--- 25/include/asm-i386/mach-bigsmp/mach_apic.h~irq-balance-disable-fix	2003-02-23 11:47:20.000000000 -0800
+++ 25-akpm/include/asm-i386/mach-bigsmp/mach_apic.h	2003-02-23 11:47:20.000000000 -0800
@@ -10,7 +10,7 @@
 		((phys_apic) & (~0xf)) )
 #endif
 
-#define no_balance_irq (1)
+#define NO_BALANCE_IRQ (1)
 #define esr_disable (1)
 
 static inline int apic_id_registered(void)
diff -puN include/asm-i386/mach-default/mach_apic.h~irq-balance-disable-fix include/asm-i386/mach-default/mach_apic.h
--- 25/include/asm-i386/mach-default/mach_apic.h~irq-balance-disable-fix	2003-02-23 11:47:20.000000000 -0800
+++ 25-akpm/include/asm-i386/mach-default/mach_apic.h	2003-02-23 11:47:20.000000000 -0800
@@ -9,7 +9,7 @@
  #define TARGET_CPUS 0x01
 #endif
 
-#define no_balance_irq (0)
+#define NO_BALANCE_IRQ (0)
 #define esr_disable (0)
 
 #define INT_DELIVERY_MODE dest_LowestPrio
diff -puN include/asm-i386/mach-numaq/mach_apic.h~irq-balance-disable-fix include/asm-i386/mach-numaq/mach_apic.h
--- 25/include/asm-i386/mach-numaq/mach_apic.h~irq-balance-disable-fix	2003-02-23 11:47:20.000000000 -0800
+++ 25-akpm/include/asm-i386/mach-numaq/mach_apic.h	2003-02-23 11:47:20.000000000 -0800
@@ -5,7 +5,7 @@
 
 #define TARGET_CPUS (0xf)
 
-#define no_balance_irq (1)
+#define NO_BALANCE_IRQ (1)
 #define esr_disable (1)
 
 #define INT_DELIVERY_MODE dest_LowestPrio
diff -puN include/asm-i386/mach-summit/mach_apic.h~irq-balance-disable-fix include/asm-i386/mach-summit/mach_apic.h
--- 25/include/asm-i386/mach-summit/mach_apic.h~irq-balance-disable-fix	2003-02-23 11:47:20.000000000 -0800
+++ 25-akpm/include/asm-i386/mach-summit/mach_apic.h	2003-02-23 11:47:20.000000000 -0800
@@ -4,7 +4,7 @@
 extern int x86_summit;
 
 #define esr_disable (x86_summit ? 1 : 0)
-#define no_balance_irq (0)
+#define NO_BALANCE_IRQ (0)
 
 #define XAPIC_DEST_CPUS_MASK    0x0Fu
 #define XAPIC_DEST_CLUSTER_MASK 0xF0u

_