[PATCH] affinity is not defined in non-smp kernels - x86_64

Fernando Luis Vázquez Cao
2007-02-28T07:40:01Z

Initialize affinity only when building SMP kernels.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
---

--- linux-2.6.21-rc2-dtt/arch/x86_64/kernel/io_apic.c 2007-03-06 15:20:14.000000000 +0900
+++ linux-2.6.21-rc2-kdump/arch/x86_64/kernel/io_apic.c 2007-03-06 15:48:52.000000000 +0900
@@ -832,7 +832,9 @@ static void setup_IO_APIC_irq(int apic,
ioapic_write_entry(apic, pin, entry);

spin_lock_irqsave(&ioapic_lock, flags);
+#ifdef CONFIG_SMP
irq_desc[irq].affinity = TARGET_CPUS;
+#endif
spin_unlock_irqrestore(&ioapic_lock, flags);
}