aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-02-23 06:20:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 13:34:08 -0500
commit5ff5115efafb08b49cbc8abdea9726884fba0b5a (patch)
tree178a64ae41473e353f9c028067da827731f8cb52 /arch
parenta8c8a36736c00b261fd5dd01400c41726f2f19eb (diff)
[PATCH] x86_64 irq: Simplfiy the set_affinity logic.
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/io_apic.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index e0648380fdde..74671defbbe3 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -244,9 +244,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
244 244
245 cpus_and(tmp, mask, cpu_online_map); 245 cpus_and(tmp, mask, cpu_online_map);
246 if (cpus_empty(tmp)) 246 if (cpus_empty(tmp))
247 tmp = TARGET_CPUS; 247 return;
248
249 cpus_and(mask, tmp, CPU_MASK_ALL);
250 248
251 vector = assign_irq_vector(irq, mask, &tmp); 249 vector = assign_irq_vector(irq, mask, &tmp);
252 if (vector < 0) 250 if (vector < 0)
@@ -1890,9 +1888,7 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
1890 1888
1891 cpus_and(tmp, mask, cpu_online_map); 1889 cpus_and(tmp, mask, cpu_online_map);
1892 if (cpus_empty(tmp)) 1890 if (cpus_empty(tmp))
1893 tmp = TARGET_CPUS; 1891 return;
1894
1895 cpus_and(mask, tmp, CPU_MASK_ALL);
1896 1892
1897 vector = assign_irq_vector(irq, mask, &tmp); 1893 vector = assign_irq_vector(irq, mask, &tmp);
1898 if (vector < 0) 1894 if (vector < 0)
@@ -1985,9 +1981,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
1985 1981
1986 cpus_and(tmp, mask, cpu_online_map); 1982 cpus_and(tmp, mask, cpu_online_map);
1987 if (cpus_empty(tmp)) 1983 if (cpus_empty(tmp))
1988 tmp = TARGET_CPUS; 1984 return;
1989
1990 cpus_and(mask, tmp, CPU_MASK_ALL);
1991 1985
1992 vector = assign_irq_vector(irq, mask, &tmp); 1986 vector = assign_irq_vector(irq, mask, &tmp);
1993 if (vector < 0) 1987 if (vector < 0)