diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-29 12:40:34 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-29 12:40:34 +0400 |
commit | 13223cb02ccfa375f2d683d08d30db5b72264f1e (patch) | |
tree | d3fc7d803d22bbfe03b96cf0ba38041d42c8a1c2 /drivers/net/sfc/efx.c | |
parent | 1383bdb98c01bbd28d72336d1bf614ce79114d29 (diff) | |
parent | 07d43ba98621f08e252a48c96b258b4d572b0257 (diff) | |
download | linux-13223cb02ccfa375f2d683d08d30db5b72264f1e.tar.xz |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r-- | drivers/net/sfc/efx.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 6eff9ca6c6c8..00c23b1babca 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -894,20 +894,27 @@ static void efx_fini_io(struct efx_nic *efx) * interrupts across them. */ static int efx_wanted_rx_queues(void) { - cpumask_t core_mask; + cpumask_var_t core_mask; int count; int cpu; - cpus_clear(core_mask); + if (!alloc_cpumask_var(&core_mask, GFP_KERNEL)) { + printk(KERN_WARNING + "efx.c: allocation failure, irq balancing hobbled\n"); + return 1; + } + + cpumask_clear(core_mask); count = 0; for_each_online_cpu(cpu) { - if (!cpu_isset(cpu, core_mask)) { + if (!cpumask_test_cpu(cpu, core_mask)) { ++count; - cpus_or(core_mask, core_mask, - topology_core_siblings(cpu)); + cpumask_or(core_mask, core_mask, + topology_core_cpumask(cpu)); } } + free_cpumask_var(core_mask); return count; } |