aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-26 16:39:17 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-27 12:28:43 -0400
commit6e15cf04860074ad032e88c306bea656bbdd0f22 (patch)
treec346383bb7563e8d66b2f4a502f875b259c34870 /drivers/net/sfc/efx.c
parentbe0ea69674ed95e1e98cb3687a241badc756d228 (diff)
parent60db56422043aaa455ac7f858ce23c273220f9d9 (diff)
Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c17
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)
894 * interrupts across them. */ 894 * interrupts across them. */
895static int efx_wanted_rx_queues(void) 895static int efx_wanted_rx_queues(void)
896{ 896{
897 cpumask_t core_mask; 897 cpumask_var_t core_mask;
898 int count; 898 int count;
899 int cpu; 899 int cpu;
900 900
901 cpus_clear(core_mask); 901 if (!alloc_cpumask_var(&core_mask, GFP_KERNEL)) {
902 printk(KERN_WARNING
903 "efx.c: allocation failure, irq balancing hobbled\n");
904 return 1;
905 }
906
907 cpumask_clear(core_mask);
902 count = 0; 908 count = 0;
903 for_each_online_cpu(cpu) { 909 for_each_online_cpu(cpu) {
904 if (!cpu_isset(cpu, core_mask)) { 910 if (!cpumask_test_cpu(cpu, core_mask)) {
905 ++count; 911 ++count;
906 cpus_or(core_mask, core_mask, 912 cpumask_or(core_mask, core_mask,
907 topology_core_siblings(cpu)); 913 topology_core_cpumask(cpu));
908 } 914 }
909 } 915 }
910 916
917 free_cpumask_var(core_mask);
911 return count; 918 return count;
912} 919}
913 920