]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64 irq: Simplfiy the set_affinity logic.
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 23 Feb 2007 11:20:59 +0000 (04:20 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 18:34:08 +0000 (10:34 -0800)
For some reason the code has been picking TARGET_CPUS when asked to
set the affinity to an empty set of cpus.  That is just silly it's
extra work.  Instead if there are no cpus to set the affinity to we
should just give up immediately.  That is simpler and a little more
intuitive.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/io_apic.c

index e0648380fddeb46b24aacdd9a93173a44633d9b5..74671defbbe3d145b8b1d4401728a7e21223a86d 100644 (file)
@@ -244,9 +244,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
 
        cpus_and(tmp, mask, cpu_online_map);
        if (cpus_empty(tmp))
-               tmp = TARGET_CPUS;
-
-       cpus_and(mask, tmp, CPU_MASK_ALL);
+               return;
 
        vector = assign_irq_vector(irq, mask, &tmp);
        if (vector < 0)
@@ -1890,9 +1888,7 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
 
        cpus_and(tmp, mask, cpu_online_map);
        if (cpus_empty(tmp))
-               tmp = TARGET_CPUS;
-
-       cpus_and(mask, tmp, CPU_MASK_ALL);
+               return;
 
        vector = assign_irq_vector(irq, mask, &tmp);
        if (vector < 0)
@@ -1985,9 +1981,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
 
        cpus_and(tmp, mask, cpu_online_map);
        if (cpus_empty(tmp))
-               tmp = TARGET_CPUS;
-
-       cpus_and(mask, tmp, CPU_MASK_ALL);
+               return;
 
        vector = assign_irq_vector(irq, mask, &tmp);
        if (vector < 0)